ArduinoGeneral

Relay Shield (DFR0144) and LCDKeypad Shield (DFR0009)

userHead Account cancelled 2013-05-21 01:52:54 3228 Views2 Replies
I have an Arduino UNO v3, a DFRobot Relay Shield and a DFRobot LCD Keypad Shield.

I have reconfigured the Relay Shield to use digital pins, D0 - D3.

Both shields work perfectly, by themselves.
In Other Words,
I load a sketch on the UNO that controls the LCD and the Relays.
If I plug in the LCDKeypad into the UNO, it works perfectly.
If I remove the LCDKeypad from the UNO and then plug in the Relay Shield, it works perfectly.
If I then plug the LCDKeypad into the Relay Shield, the LCDKeypad display does not work. The buttons still control the relays correctly.

Here are the lines in the sketch I use to declare/init the display / relays:
LiquidCrystal lcd (8, 9, 4, 5, 6, 7);
byte relayPin[4] = {0, 1, 2, 3};

And then in the setup() routine:
for(i = 0; i < 4; i++) pinMode(relayPin[i],OUTPUT);

delay(200);

for(i = 0; i < 4; i++) digitalWrite(relayPin[i],LOW);
delay(2000); // grasping at straws here

lcd.begin (16, 2);


* Initially, on powerup, the display backlight lights and the power LED on the LCDKeypad is on.
* After about a second, the backlight flickers a bit and then goes off. The power LED on the LCDKeypad turns off with the backlight.
* Then, if you press any button, the backlight and the power LED turns on, but no text is visible.
* The power LED on the UNO and the Relay Shield are on all the time.

The voltage provided by the USB port is not really adequate to power the Relay Shield. I am using a separate, 9V power supply to power the UNO and the shields. After I put the sketch on the UNO, I disconnected it from the computer.

I am not sure if this is relevant, but if I try to load a sketch on the UNO when the Relay Shield is plugged in, I get the dreaded:
"avrdude: stk500_getsync(): not in sync: resp=0x00" error.




PLEASE HELP!
2024-03-15 15:14:59

Hi Jose

I stumbled upon this post with interest but I am using a different shield by Adafruit also a big promoter of Arduino UNO.

As described above I have UNO R3, DFR0009 which work perfectly together. I also have Adafruit ADA1141 data logger shield which also works with the UNO R3 when fitted on it's own…

As soon as I attach the DFR0009 LCD the ONLY thing I can do with the screen is turn the backlight ON/OFF by calling pin 10 HIGH or LOW, absolutely nothing written to the LCD using lcd.print(****); will appear…

Would you like to start this post rolling again please

Thanks

Darryl

userHeadPic Darryl.Nissen
2013-05-21 20:31:37 Hi!

That is certainly strange, can you send a picture of how you changed the pin mapping and so on?
Also when you tried the boards one by one, did you use the same full code enabling all the pins for both boards together?

Best,
Jose
userHeadPic Jose