Character LCD
Overview
Parts
-Arduino microcontroller and carrier board
-LiPo battery
Program the Microcontroller
/*
LiquidCrystal Library - Hello World
LiquidCrystal library works with all LCD displays that are compatible with the
Hitachi HD44780 driver.
The circuit:
* LCD 1 to ground (black)
* LCD 2 VCC to 5V (red)
* LCD 3 contrast to ground (brown)
* LCD 4 (RS) pin to digital pin 12 (blue)
* LCD 5 (R/W) pin to ground (yellow)
* LCD 6 (Enable) pin to digital pin 11 (green)
* LCD 11 (D4) pin to digital pin 5 (white)
* LCD 12 (D5) pin to digital pin 4 (grey)
* LCD 13 (D6) pin to digital pin 3 (orange)
* LCD 14 (D7) pin to digital pin 2 (purple)
http://www.arduino.cc/en/Tutorial/LiquidCrystal
*/
// 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);
//--- Function: setup ()
void setup()
{
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("Time (s)");
}
//--- Function: loop ()
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);
}