[3/Love-o-meter] it seems TMP36 doesn't work (volts: 0.00 ; degrees: -50.00)

hiduino:

Garmien:
EDIT: Something is very wrong, if i change the sensors position on the breadboard i get different values..

It might be that the Arduino input port is bad? Can you try changing to another analog input port? (make sure you update your code to match) Also some times if the wire leads are too long they can affect the sensor measurements.

I tried some of the other projects before going back to this, now i get these numbers(again with 100ms delay):

Sensor Value: 0, Volts: 0.00, Degrees: -50.00
Sensor Value: 0, Volts: 0.00, Degrees: -50.00
Sensor Value: 0, Volts: 0.00, Degrees: -50.00
Sensor Value: 0, Volts: 0.00, Degrees: -50.00
Sensor Value: 0, Volts: 0.00, Degrees: -50.00
Sensor Value: 35, Volts: 0.17, Degrees: -32.91
Sensor Value: 92, Volts: 0.45, Degrees: -5.08
Sensor Value: 96, Volts: 0.47, Degrees: -3.13
Sensor Value: 97, Volts: 0.47, Degrees: -2.64
Sensor Value: 89, Volts: 0.43, Degrees: -6.54
Sensor Value: 74, Volts: 0.36, Degrees: -13.87
Sensor Value: 0, Volts: 0.00, Degrees: -50.00
Sensor Value: 0, Volts: 0.00, Degrees: -50.00
Sensor Value: 0, Volts: 0.00, Degrees: -50.00
Sensor Value: 0, Volts: 0.00, Degrees: -50.00
Sensor Value: 0, Volts: 0.00, Degrees: -50.00

with this code:

const int sensorPin = A0;
const float baselineTemp = 20.0;

void setup(){
  Serial.begin(9600);
  for(int pinNumber = 2; pinNumber < 5; pinNumber++){
    pinMode(pinNumber, OUTPUT);
    digitalWrite(pinNumber, LOW);
  }
}


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: ");
  float temperature = (voltage - .5)*100;
  Serial.println(temperature);
  
  if(temperature < baselineTemp){
    digitalWrite(2, LOW);
    digitalWrite(3, LOW);
    digitalWrite(4, LOW);
  }
  else if(temperature >= baselineTemp+2 && temperature < baselineTemp+4){
    digitalWrite(2, HIGH);
    digitalWrite(3, LOW);
    digitalWrite(4, LOW);
  }
  else if(temperature >= baselineTemp+4 && temperature < baselineTemp+6){
    digitalWrite(2, HIGH);
    digitalWrite(3, HIGH);
    digitalWrite(4, LOW);
  }
  else if(temperature >= baselineTemp +6){
    digitalWrite(2, HIGH);
    digitalWrite(3, HIGH);
    digitalWrite(4, HIGH);
  }
  delay(100);
}

I've noticed the numbers are the same whether i have the + connected or not, so i guess there's something wrong with the power? Or the sensor(s)?