UNO + ETHERNET SHIELD and SD + LCD KEYPAD

Hello there!
I'm having some trouble with my project, I have tried everything but now I'm stuck!!

I'm trying to build a temperature logger, so far I have managed to work it out:

  • Solved a pin conflict between lcd shield and ethernet + sd shield
  • Can write in SD (while not using ethernet) and built a server to access registered files (while SD is disabled)
  • Print temperature in LCD (1st line)

Everything worked fine until I tried to write in the LCDs 2nd line, lcd.setCursor(0,1), I can't access SD card and save temperature data anymore. Strange things start to happen, if i change the text showed in the LCD, I can't save... By the way, to get the cursor to the 1st spot in the 2nd line I have to use lcd.setCursor(-4,1)...

Any idea? Anyone has come across a similar problem?
I'll post the code as soon as I clean it up a little

Thanks

I'll post the code as soon as I clean it up a little

I guess I'll never understand this. You should be keeping the code "clean" as you go. Develop small sketches to test functionality. When some function works, or some hardware interaction works, add to the main sketch. At most, all you'd need to do would be to comment out some debug stuff.

Paul thanks for the tip, I'm a newbie and I'm still learning!!

Here is the code attached, can't find what I'm doing wrong.

CEU_v13B.ino (12.1 KB)