2017-06-26 16:49:13 +03:00
|
|
|
/*
|
|
|
|
|
* Author: Stefan Andritoiu <stefan.andritoiu@gmail.com>
|
|
|
|
|
* Copyright (c) 2017 Intel Corporation.
|
|
|
|
|
*
|
2019-07-30 19:41:32 -07:00
|
|
|
* This program and the accompanying materials are made available under the
|
|
|
|
|
* terms of the The MIT License which is available at
|
|
|
|
|
* https://opensource.org/licenses/MIT.
|
2017-06-26 16:49:13 +03:00
|
|
|
*
|
2019-07-30 19:41:32 -07:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-06-26 16:49:13 +03:00
|
|
|
*/
|
|
|
|
|
|
2018-02-27 12:12:09 -08:00
|
|
|
public class LCD_EBOLED_Example {
|
2017-06-26 16:49:13 +03:00
|
|
|
|
|
|
|
|
public static void main(String[] args) throws InterruptedException {
|
|
|
|
|
// ! [Interesting]
|
|
|
|
|
|
|
|
|
|
// Instantiate an Edison Block OLED using default values
|
2018-01-23 14:02:48 -08:00
|
|
|
upm_lcd.EBOLED lcd = new upm_lcd.EBOLED();
|
2017-06-26 16:49:13 +03:00
|
|
|
|
|
|
|
|
lcd.clear();
|
|
|
|
|
lcd.setCursor(10, 15);
|
|
|
|
|
lcd.write("Hello");
|
|
|
|
|
lcd.setCursor(30, 15);
|
|
|
|
|
lcd.write("World!");
|
|
|
|
|
lcd.refresh();
|
|
|
|
|
|
|
|
|
|
System.out.println("Sleeping for 5 secconds...");
|
|
|
|
|
Thread.sleep(5000);
|
|
|
|
|
|
|
|
|
|
lcd.delete();
|
|
|
|
|
|
|
|
|
|
// ! [Interesting]
|
|
|
|
|
}
|
|
|
|
|
}
|