A TMP35/36/37 is giving very high voltage readings, which results in high temperature readings. The serial monitor looks like this: 
As you can see, the sensor value is in the 900s, voltage is almost 5, and temp is in the 400s. The circuit is very simple, just a TMP connected to 5V and ground and pin A0. Here is my code:
const int sensorPin = A0;
const float baselineTemp = 20.0;
void setup() {
Serial.begin(9600);
}
void loop() {
int sensorVal = analogRead(sensorPin);
Serial.print("Sensor value: ");
Serial.print(sensorVal);
float voltage = (sensorVal / 1024.0) * 5.0;
Serial.print(", volts: ");
Serial.print(voltage);
Serial.print(", degrees C: ");
float temperature = (voltage - .5) * 100;
Serial.println(temperature);
delay(1000);
}
This is a very simple program and a very simple circuit, so I'm not sure what is going on. Maybe the problem is the sensor itself. I have also tried this sensor with multiple other circuits and programs and the same thing happens.
If anyone knows anything about this, help would be great.
- .5come from, infloat temperature = (voltage - .5) * 100;? TMP35 outputs 10mv/degC, with 0v at 0degC. (Not that it would help if this is a coding error; it would make your results look 50degC higher.)