Project 3

I'm currently doing Project 3 and i'm not sure what's going wrong. The temperature I get is always negative (-18.26 pretty much all the time) and my Sensor Value is always around 65. I think my installation is okay, but I can't find the flaw in my code. Could anyone help? I'll post my code here.

Thanks! :slight_smile:

vaisseau_spatial_1.ino (684 Bytes)

You need to call analogRead(), not digitalRead(). This is explained on p. 46, the paragraph second to the bottom of the page.

digitalRead will only check if the pin is high/low, whilst analogRead represents the voltage of the pin with a scale from 0 to 1023.