Example #1
0
 @Test
 public void testSimpleText() throws Exception {
   try {
     lcd.backlightOff();
     Thread.sleep(500);
     lcd.backlightOn();
     Thread.sleep(500);
     lcd.backlightPercent(30);
     Thread.sleep(500);
     lcd.backlightPercent(70);
     Thread.sleep(500);
     for (int i = 0; i < 32; i++) {
       lcd.clearDisplay();
       lcd.moveCursorTo(i);
       lcd.sendByte(("" + i).charAt(0));
       Thread.sleep(300);
     }
     lcd.clearDisplay();
     lcd.send2LineMessage("boo!", "yah!");
     Thread.sleep(500);
     lcd.clearDisplay();
     lcd.sendWrappedMessage("A wrapped message...Yeah that's it!");
   } catch (Exception e) {
     e.printStackTrace();
     throw e;
   }
 }
Example #2
0
 private void setupLcd(String port) throws Exception {
   lcd = new SparkFunLcd(port);
   lcd.connect();
 }
Example #3
0
 private void shutdownLcd() throws Exception {
   lcd.disconnect();
   lcd = null;
 }