Created
August 18, 2014 00:29
-
-
Save benphelps/fc023c82c72fd1e5d033 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <serLCD.h> | |
#include <SoftwareSerial.h> | |
SoftwareSerial mySerial(10, 11); | |
serLCD lcd(11); | |
int tmp; | |
void setup() | |
{ | |
Serial.begin(9600); | |
mySerial.begin(9600); | |
lcd.clear(); | |
lcd.home(); | |
} | |
void loop() | |
{ | |
if (Serial.available()) { | |
tmp = Serial.read(); | |
switch(tmp) { | |
case 0x11: | |
lcd.clear(); | |
break; | |
case 0x12: | |
lcd.home(); | |
break; | |
case 0x13: | |
lcd.selectLine(1); | |
break; | |
case 0x14: | |
lcd.selectLine(2); | |
break; | |
default: | |
lcd.write(tmp); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment