Datalogger with 3.5 lcd touchscreen

Hi all, I am building a datalogger using the SD card on the 3.5 lcd touchscreen. I see a possible conflict with the tft_cs on pin 10 and the sd card chip select (ss) which also seems to want to use pin 10.

datalogger reads,
// On the Ethernet Shield, CS is pin 4. Note that even if it’s not
// used as the CS pin, the hardware CS pin (10 on most Arduino boards,
// 53 on the Mega) must be left as an output or the SD library
// functions will not work.

Line 46 pinMode(SS, OUTPUT);

“SS” appears to be a variable to describe SD card chip select but it is not declared anywhere. ???

My lcd sketch uses pin 10 as TFT_CS

Line 50 // The display uses hardware SPI, plus #9 & #10
Line 51 #define TFT_RST -1 // dont use a reset pin, tie to arduino RST if you like
Line 52 #define TFT_DC 9
Line 53 #define TFT_CS 10

I’ve attached both sketches. My VIZIO sketch is still being developed so it is incomplete. So the questions are where is SS defined and is it going to be a problem?

VIZIO_Power-up_V2B.ino (4.81 KB)

Datalogger.ino (1.75 KB)

datalogger reads,

None of that appears in the Datalogger.ino file you posted.

Line 46 in that code is a blank line.

So the questions are where is SS defined and is it going to be a problem?

No, the question is WTF are you talking about. Not the code you posted...

Ken_F: Note that even if it's not even if it's not// used as the CS pin, the hardware CS pin (10 on most Arduino boards, // 53 on the Mega) must be left as an output or the SD library // functions will not work.

It does no harm to retain it, but I understand this is no longer required with the later Arduino IDEs. I don't know if it is because of the IDE per se, or the SD library. You might try omitting it, or chasing the detail.

Further, you are not switching pin 10, so it may be possible to serve both purposes, i.e. not used as SD CS pin but is used as CS for something else..

Is it possible to use another pin for TFT CS and change the code accordingly?