Sorgente di partenza per sviluppare i Timer V2.0

Dependencies:   TextLCD mbed

Fork of TimerFiera by Fabio Dal Forno

Revision:
2:9fc2b9475b38
Parent:
1:289167b04f0d
Child:
3:b96d23930bf8
--- a/main.cpp	Fri Apr 22 07:21:35 2016 +0000
+++ b/main.cpp	Fri Apr 22 07:25:05 2016 +0000
@@ -4,7 +4,7 @@
 #include "TextLCD.h"
 
 #define NUM_LAP 3
-#define VBAT_MIN 7
+#define VBAT_MIN 7.2
 
 typedef struct time_screen {
    int cents;
@@ -86,7 +86,7 @@
     proximity.rise(&measure_time);    
     user_button.fall(&reset_measure);
     
-    //Controllo batteria
+  
    
     
     while(true) {
@@ -111,7 +111,8 @@
             wait(0.1);
         }else{
             if(lap == 0){
-                double battery =  ((3.3 * vbat) * 57) / 10;
+                //Controllo batteria con partitore resistivo
+                double battery =  ((3.3L * vbat) * 57) / 10;
                 if(battery < VBAT_MIN){
                     lcd.locate(0,1);
                     lcd.printf("LOW BAT %2.1f",battery);