I got a arduino uno + ethernetshield + colorLcd shield (sparkfun) stacked together.
I am getting problems as soon as a try using the libraries sd.h and colorlcdshield.h in the same sketch. Seperate they work fine, just not together.
It seems the problem is the usage of pin 4. The colorlcd uses this pin as in input for a button, while it is the chip select for the sd card.
I can scratch the copper path of the button om the lcd shield without problems. The problem is I want to change the library so that it does not not use pin 4 at all. I hope that will do the trick.
I looked in the library but can't get around on how to do this. There are a lot of code i haven't used before.
Could someone help me out?
Ok,
The colorlcd libraryy can be found here : https://www.sparkfun.com/products/9363
The SD library is the one from arduino that comes with the software.
I Tried to make this change to the colorlcd lib yesterday but i stil got a error.
change :
//DDRD = 0x00; //Hier zit waarschijnlijk het probleem, alles staat op ingang
DDRD = DDRD | B00101000; //Nu enkel pinnen 3 en 5 als ingang zetten, de rest laten zoals ze zijn
//PORTD = 0xFF; //vermoedlijk ook probleem
PORTD = PORTD | B00101000; //enkel pinnen 3 en 5 op 1, rest laten
error:
In file included from C:\arduino-1.0.1\libraries\SD/utility/Sd2Card.h:26,
from C:\arduino-1.0.1\libraries\SD/utility/SdFat.h:27,
from C:\arduino-1.0.1\libraries\SD/SD.h:20,
from test_scherm_data_sd.cpp:7:
C:\arduino-1.0.1\libraries\SD/utility/Sd2PinMap.h:282: error: expected unqualified-id before numeric constant