2015-09-08 21:58:36 +03:00
|
|
|
/*
|
|
|
|
* Author: Stefan Andritoiu <stefan.andritoiu@intel.com>
|
|
|
|
* Copyright (c) 2015 Intel Corporation.
|
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining
|
|
|
|
* a copy of this software and associated documentation files (the
|
|
|
|
* "Software"), to deal in the Software without restriction, including
|
|
|
|
* without limitation the rights to use, copy, modify, merge, publish,
|
|
|
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
|
|
* permit persons to whom the Software is furnished to do so, subject to
|
|
|
|
* the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice shall be
|
|
|
|
* included in all copies or substantial portions of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
|
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
|
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
|
|
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
|
|
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
|
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
2018-02-27 12:12:09 -08:00
|
|
|
public class Jhd1313m1_lcd_Example{
|
2015-08-26 17:51:07 +03:00
|
|
|
|
lcd/lcm1602/jhd1313m1: remove lcm1602 and jhd1313m1 from lcd library
The lcm1602 and jhd1313m1 drivers had been rewritten in C with a C++
wrapper some time ago, however the original lcm and jhd drivers were
still present in the lcd library. In addition, to avoid header file
conflicts, the new, separated lcm and jhd header files were renamed
with a .hxx prefix.
This patch:
- renames the new lcm1602/ and jhd1313m1/ header files to have the
usual .hpp prefix.
- removes the lcm1602, jhd1313m1, and sainsmartks drivers from the
lcd/ (i2clcd) library.
- fixes the examples to use the "new" libraries (lcm1602 and
jhd1313m1)
- changes the argument type for the createChar() (C++) to use a byte
vector (std::vector<uint8_t>) rather than a typedef'd char array.
The lcm1602_create_char() function (C) uses a standard char *. The
use of std::vector is well supported by SWIG.
- SWIG interface files changed to use upm_vectortypes.i, and removes
the carrays helpers, which should no longer be needed for these
drivers.
- removes the inclusion of the driver C .h header files into the SWIG
interface files - this should not be needed for these drivers.
- the sainsmartks driver will be placed into it's own new lcdks (LCD
Keypad Shield) library. This library should support the
SainsmartKS, DFRobot LCD Keypad Shield, and similar products from
other manufacturers in a future commit.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
2017-03-15 11:43:50 -06:00
|
|
|
public static void main(String[] args) throws InterruptedException {
|
|
|
|
//! [Interesting]
|
|
|
|
upm_jhd1313m1.Jhd1313m1 lcd =
|
|
|
|
new upm_jhd1313m1.Jhd1313m1(1, 0x3E, 0x62);
|
|
|
|
|
|
|
|
lcd.setCursor(0,0);
|
|
|
|
lcd.write("Hello World");
|
|
|
|
lcd.setCursor(1,2);
|
|
|
|
lcd.write("Hello World");
|
|
|
|
|
|
|
|
System.out.println("Sleeping for 5 seconds");
|
|
|
|
Thread.sleep(5000);
|
|
|
|
lcd.clear();
|
|
|
|
//! [Interesting]
|
|
|
|
}
|
2015-08-26 17:51:07 +03:00
|
|
|
|
2015-09-14 18:13:40 +03:00
|
|
|
}
|