Problem with logging temperatures

This is my first project using an Arduino.

The first thing I did was to create a set of code to take four temperature readings and display them on the serial monitor. This uses a function that creates a temperature from a pin number.

Code - See attachment Circuit_07d.txt

This works although I get slight (2nd dp) differences in readings.

I then took the sample Adafruit code for the SD logging card and modified it to log the four temperatures.

Code - See attachment _2014_10_24_4_channel_temerature_logger_v0_3.txt

I have exactly the same circuit in both cases and the same function but with the logging code I only get a room temperature of 450C for all four sensors.

Can anyone guide me towards a solution?

Many thanks

Steve

Circuit_07d.txt (3.87 KB)

_2014_10_24_4_channel_temerature_logger_v0_3.txt (5.21 KB)

the text files have lost all formatting try using the code tags

 put your code here

Steve31530:
Can anyone guide me towards a solution?

Try adding some Serial.println() statements to show the raw values being collected by analogRead().

Try commenting out ALL of the code related to the SD card (without deleting any of it) and see if the sketch works.

...R