- Fri Dec 26, 2008 10:55 pm
#62100
Ok, so I bought an arduino and LCD among other things from spark fun, but I just can't seem to get the lcd to work properly. It display's garbage at first, but if I unplug and replug pin 12 (DB5 according to GDM1602K data sh**t) at the right time, it starts working. As a side not, I had to censor that dirty word that comes after "data" because of the stupid filter. Here is a link to a video showing what happens http://www.youtube.com/watch?v=7UeiREZZI60 and here is the source code i'm running:
Code: Select all
Hopefully someone can tell me if I am messing up, or if I need a new LCD.#include <LiquidCrystal.h>
// LiquidCrystal display with:
// rs on pin 12
// rw on pin 11
// enable on pin 10
// d0, d1, d2, d3 on pins 5, 4, 3, 2
LiquidCrystal lcd(2, 3, 4, 8, 9, 10, 11);
int test = 0;
void setup()
{
Serial.begin(9600);
lcd.print("Hello World!!");
}
void loop()
{
// Print a message to the LCD.
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Hello");
//Serial.println(test);
delay(1000);
lcd.clear();
lcd.setCursor(0,1);
lcd.print("World");
delay(1000);
test++;
}