Trouble using analog inputs

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! :smiley:

#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. :cry:

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.

There are many 'Arduino motor shields'.

The one with the big L298 flat on the board uses two analogue pins to sense motor current draw.
Look at the .pdf diagram on the product page which pins are still free. Could be D2,4,7,10,A4,A5.
Leo..

Wawa, you are so right!

I'm using the Arduino motor shield rev3.

https://store.arduino.cc/usa/arduino-motor-shield-rev3

Which uses A0 and A1 for current sensing.

Thanks!

Please post your entire code in </> tags and a list of which analog pins YOU are trying to use.