Hi All -
I have a project where I'm trying to add an Arduino motor shield to an existing 16x2 LCD project. Because the motor shield uses many of the pins I was using for the LCD I had to rewire it to use the analog pins.
To keep complexity to a minimum, I first rewired the LCD to use the analog ports on my Arduino Uno and changed my sketch. And it worked!
#include <LiquidCrystal.h>
LiquidCrystal lcd(19, 18, 17, 16, 15, 14); //analog pins as digital
void setup() {
Serial.begin(9600);
lcd.begin(16, 2);
lcd.setCursor(0, 0);
lcd.print("Stevenbot 9000");
lcd.setCursor(0, 1);
lcd.print("Ready for input");
}
Then I pulled the wires out of the analog pins on the Uno, pulled the 5v power and ground wires from the Uno, put the motor shield on top of the Uno, put the 5v power and ground wires into the shield, put the LCD wires in the same corresponding analog pin on the shield.
It didn't work. The LCD did not show the "Stevenbot 9000" text.
I even tried attaching the external battery pack to the Arduino motor shield to see if that would make a difference. It didn't.
Is there anything else I need to do, or missed, to use the analog pins on the shield?
Any help would be greatly appreciated.