HELLO THERE!!!
How are you guys? I hope everyone is fine and in good condition always. This week, I would like to share with you guys a simple experiment I made over the weekend.The objective of this experiment is to print out characters typed from keyboard to LCD keypad Shield attached on top Arduino.
Let's get straight to the items used:
HARDWARE:
1.Arduino UNO
How are you guys? I hope everyone is fine and in good condition always. This week, I would like to share with you guys a simple experiment I made over the weekend.The objective of this experiment is to print out characters typed from keyboard to LCD keypad Shield attached on top Arduino.
Let's get straight to the items used:
HARDWARE:
1.Arduino UNO
2.LCD Keypad Shield
SOFTWARE:
1.Arduino IDE
1.Arduino IDE
The assembly for the circuit is fairly simple. Just carefully attach the lcd keypad shield on top of the Arduino. Make sure all of the shield pins were correctly connected into the Arduino pins. After assembly, power up your arduino, if everything is connected correctly, the PWR led of the shield will light up.
Now that the assembly is done, let's view the code:
#include<LiquidCrystal.h> // import the liquid crystal lib
LiquidCrystal lcd(8, 9, 4, 5, 6, 7); //the lcd pins in order
char value ;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
lcd.begin(16,2);// lcd begin for all pixels(col,rows)
lcd.setCursor(0,0);//start in position 0,0(beginning of the lcd)
}
void loop() {
// put your main code here, to run repeatedly:
while(Serial.available()){//if serial reading is available
delay(1000);//delay for a second, avoid overloading
value = Serial.read(); //value = serial value(led value)
lcd.print(value);
}
}
The above code take the input of the keyboard and produces it in the LCD. The code above can read all characters, from numbers to alphabets( even spacing). Upload the code to your arduino, open your serial monitor and start testing!!
Before I end this post, I would like to show you guys my demo video on this experiment;
You can also modify this experiment by changing the input from Keyboard to Handphone (send the data through bluetooth). Well that's all from me guys. See you next week. Till then, HAPPY TINKERING!!!
Comments
Post a Comment