This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tutorials:learn:sensors:tmp36.html [2011/05/27 22:00] unwin missing word |
tutorials:learn:sensors:tmp36.html [2016/01/28 18:05] (current) |
||
---|---|---|---|
Line 172: | Line 172: | ||
float temperatureC = (voltage - 0.5) * 100 ; //converting from 10 mv per degree wit 500 mV offset | float temperatureC = (voltage - 0.5) * 100 ; //converting from 10 mv per degree wit 500 mV offset | ||
//to degrees ((volatge - 500mV) times 100) | //to degrees ((volatge - 500mV) times 100) | ||
- | Serial.print(temperatureC); Serial.println(" degress C"); | + | Serial.print(temperatureC); Serial.println(" degrees C"); |
// now convert to Fahrenheight | // now convert to Fahrenheight | ||
float temperatureF = (temperatureC * 9.0 / 5.0) + 32.0; | float temperatureF = (temperatureC * 9.0 / 5.0) + 32.0; | ||
- | Serial.print(temperatureF); Serial.println(" degress F"); | + | Serial.print(temperatureF); Serial.println(" degrees F"); |
delay(1000); //waiting a second | delay(1000); //waiting a second | ||
Line 238: | Line 238: | ||
float temperatureC = (voltage - 0.5) * 100 ; //converting from 10 mv per degree wit 500 mV offset | float temperatureC = (voltage - 0.5) * 100 ; //converting from 10 mv per degree wit 500 mV offset | ||
//to degrees ((volatge - 500mV) times 100) | //to degrees ((volatge - 500mV) times 100) | ||
- | Serial.print(temperatureC); Serial.println(" degress C"); | + | Serial.print(temperatureC); Serial.println(" degrees C"); |
// now convert to Fahrenheight | // now convert to Fahrenheight | ||
float temperatureF = (temperatureC * 9.0 / 5.0) + 32.0; | float temperatureF = (temperatureC * 9.0 / 5.0) + 32.0; | ||
- | Serial.print(temperatureF); Serial.println(" degress F"); | + | Serial.print(temperatureF); Serial.println(" degrees F"); |
delay(1000); | delay(1000); |