Project #3 - Love-O-Meter

If you open the serial monitor you will see the value being returned from the temperature sensor, go to line two of your code -"const float baselineTemp = 20.0;" and change the 20.0 to the value shown in the serial monitor. This will calibrate your program correctly.

If you want the code to calibrate itself simply remove the "const" from line 2 and ad the line "baselineTemp = analogRead(sensorPin);" to your setup void. This will record the initial value returned from the sensor and use that as your base line. Since you will be doing this in the setup void it will happen only once each time the arduino is reset or turned on.

Another option is to add a push button to your setup and add the appropriate code to set your baseline when the button is pressed. This can turn your Love-o-meter into a Who's Hotter game!