Simple 'Hello World' On a LCD Display with nano Arduino

Posted by IEE Engineer On mardi 14 février 2017 0 commentaires



This project is for beginners who just bought a 16x2 LCD display.
if you want to make a simple and small project of this LCD,then...
"HELLO WORLD" Is perfect for you!
see the schematic and build the circuit then copy paste the program on your Arduino IDE software
And then you have a simple LCD display circuit,displaying "HELLO WORLD!"

Step 1: Order your components:





the components required for this build are:
1xLCD Display(16x2)
1x220 ohm resistor
1xArduino Nano
1xBreadboard
1x10K Potentiometer
some jumper wires or single strand wires.
You can buy all your components from Amazon.com.







Build this small schematic...
the connections:
LCD RS pin to digital pin 12
LCD Enable pin to digital pin 11
LCD D4 pin to digital pin 5
LCD D5 pin to digital pin 4
LCD D6 pin to digital pin 3
LCD D7 pin to digital pin 2
then wire a 10k pot to +5V and GND, with it's wiper (output) to LCD screens VO pin (pin3). A 220 ohm resistor is used to power the backlight of the display, usually on pin 15 and 16 of the LCD connector.

Step 3: The code:

The code:
#include <LiquidCrystal.h>//Don't forget to enter this library
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("HELLO WORLD!");
}
void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// print the number of seconds since reset:
lcd.setCursor(0, 1); // print the number of seconds since reset: lcd.print(millis() / 1000);
}

Step 4: SUCCESS!















0 commentaires:

Enregistrer un commentaire