![]() | sensortest.pde |
|
13 Aug 2010, 21:31
Tom de Grunt (5 posts) |
Hi, Just tried the sensortest example (with the TMP36 sensor), using the code from the book (download). I’m pretty sure that temperature is off by 20 degrees C. Any suggestions? Cheers, |
|
14 Aug 2010, 05:33
Maik Schmidt (110 posts) |
Hi Tom! Thank you very much for pointing this out! I could reproduce this behavior and it seems that something subtle has changed in the most recent versions of the Arduino IDE. So the bandgap trick to determine the Arduino’s supply voltage no longer works. I’ll try to fix it but in the meantime replace the get_supply_voltage() function with the following one:
const float get_supply_voltage() {
return 5.0;
}
This is not as accurate as determining the correct supply voltage, but it’s way more accurate than the buggy one. Hope this helps! Maik |
|
14 Aug 2010, 20:46
Tom de Grunt (5 posts) |
Hello Maik, Thanks for the quick answer. Cheers, |
| You must be logged in to comment |

