This little project is to make your arduino board display words on LCD1602,
#include <LiquidCrystal.h>
// LiquidCrystal display with:
// rs on pin 12
// rw on pin 11
// enable on pin 10
// d4, d5, d6, d7 on pins 5, 4, 3, 2
LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2);
int ledPin = 13; // LED connected to digital pin 13
int recvPin=0;
int wait=1000;
int val=0;
void setup()
{
// Print a message to the LCD.
pinMode(ledPin, OUTPUT); // sets the digital pin as output
Serial.begin(9600);
lcd.print(" Hello,GE-TH!!");
}
void loop()
{
digitalWrite(ledPin, HIGH); // sets the LED on
delay(wait); // waits for a second
digitalWrite(ledPin, LOW); // sets the LED off
delay(wait); // waits for a second
val=analogRead(recvPin);
Serial.print("DETECT:");
Serial.println(val);
}
Note: this is different from the diagram on arduino.cc(just a little bit)
// rs on pin 12
// rw on pin 11
// enable on pin 10
More info from ww.ge-th.com