I already found very useful code to display the character with the LCD.
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
//I've got nice code from the instructable (http://www.instructables.com/id/Arduino-LCD/) | |
//And I modified into my name | |
//The code: | |
#include <LiquidCrystal.h> | |
LiquidCrystal lcd(8, 9, 4, 5, 6, 7); | |
int readkey; | |
void setup() { | |
lcd.begin(16, 2); | |
lcd.print("Hello World!"); | |
} | |
void loop() { | |
lcd.setCursor(0, 1); //start from coloumn 0 and row 1 | |
lcd.print("My name is Hani"); | |
readkey=analogRead(0); | |
if (readkey<50) { | |
lcd.clear(); | |
lcd.print("Button Right"); | |
} | |
else if(readkey<195) { | |
lcd.clear(); | |
lcd.print("Button Up"); | |
} | |
else if(readkey<380) { | |
lcd.clear(); | |
lcd.print("Button Down"); | |
} | |
else if(readkey<790) { | |
lcd.clear(); | |
lcd.print("Button Left"); | |
} | |
} |
Happy share :)
3 comments:
Ngoh, mantab, dah bisa basa apa aja sekarang jreng? :)
Hallo jreng Irma Rawit...masih beginner jreng :D, makasi ya jreng atas saran lo. Sangat membekas :)
terus berkarya jreng ;)
Post a Comment