Read the teperature from the sensor. Show the results on the seriel port using 4 variables, Max_temp, Min_Temp, Avg_Temp and the temperature. Every day of use the values will reset
Revision 5:9b4c978eb424, committed 2016-04-09
- Comitter:
- mabenim
- Date:
- Sat Apr 09 16:22:39 2016 +0000
- Parent:
- 4:849a3ee29a49
- Commit message:
- a?adido el reinicio total despues de un dia;
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 849a3ee29a49 -r 9b4c978eb424 main.cpp --- a/main.cpp Tue Apr 05 23:32:44 2016 +0000 +++ b/main.cpp Sat Apr 09 16:22:39 2016 +0000 @@ -22,7 +22,7 @@ Temperatura_max=-100; Temperatura_min=100; Temperatura_acumulada=0; - while(1) { + while(contador<=contador_max) { contador=contador+1; voltage=analog_value.read()*3.3; Temperatura=(voltage-0.5)*100;