by sitimariam » Tue Apr 15, 2014 11:09 am
the code for lcd;
/ / include the library code:
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
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.print(millis()/1000);
}
the hardware connections;
1 -> GND (Arduino)
2 -> +5V (Arduino)
3 -> 1KOHM potentiometer
4 -> Arduino pin 12
5 -> GND
6 -> Arduino pin 11
7 -> no connection
8 -> no connection
9 -> no connection
10 -> no connection
11 -> Arduino pin 5
12 -> Arduino pin 4
13 -> Arduino pin 3
14 -> Arduino pin 2
15 -> 5V
16 -> GND
- Attachments
-