Hi all,
I am trying to interface a Serial Enabled 16x2 LCD from sparkfun with my arduino mega but am having some trouble. I can't work out how to simply write commands to the LCD, i use the Serial.print() or Serial.write() functions and type in the command but all it does is print the ASCII character equivalent to that number. Can anyone tell me how to simply send a command?
Here is the code I am using at the moment.
#define CLR_DISP (0x01) //Clear display
#define CUR_HOME (0x02)
#define DISP_OFF (0x10)
#define RANDOM (0x63)
void setup(){
Serial1.begin(9600);
}
void loop(){
Serial1.print(CLR_DISP);
delay(100);
}