Moderators: adafruit_support_bill, adafruit
Well it's a bit embarrassing, but the original LCD I had seems to be working now. I was going ahead with trying to develop a sketch and had occasion to change the Arduino pin assignments that the LCD uses. (I intend to use Adafruit's data logger shield and I believe that pins 10-13 are needed for the SD card interface.) So, I moved the LCD to pins 4-9 and now when I reboot the Arduino, the LCD comes back alive. I'm not sure why the pin assignments should make a difference. There probably were (and still are?) subtle problems with my wiring.

#include <digitalWriteFast.h>
#include <LiquidCrystal.h>
#define LED 13
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
void setup() {
pinMode(LED, OUTPUT);
digitalWrite(LED, HIGH);
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("Sad Arduino!");
}
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);
}but weird, right?
So I reassigned RS to 6, and now the sketch and LCD run perfectly every time:
LiquidCrystal lcd(6, 8, 9, 10, 11, 12);
void setup() {
delay(20);
lcd.begin(16, 4);
}Return to Other Arduino products from Adafruit
Users browsing this forum: No registered users and 5 guests