First trial

Dependencies:   MPU6050 Motor ledControl2 mbed

Fork of BalancingRobotPS3 by Kristian Lauszus

Revision:
6:defe36ce2346
Parent:
5:fc6c7a059759
Child:
7:f1d24c6119ac
--- a/BalancingRobot.cpp	Sun Mar 04 02:11:58 2012 +0000
+++ b/BalancingRobot.cpp	Tue Mar 06 22:38:41 2012 +0000
@@ -89,7 +89,7 @@
             double analogVoltage = batteryVoltage.read()/1*3.3; // Convert to voltage
             analogVoltage *= 6.6; // The analog pin is connected to a 56k-10k voltage divider
             xbee.printf("analogVoltage: %f - timer: %i\n",analogVoltage,t.read_ms());
-            if (analogVoltage < 7.92 && pitch > 60 && pitch < 120) // Set buzzer on, if voltage gets critical low
+            if (analogVoltage < 9 && pitch > 60 && pitch < 120) // Set buzzer on, if voltage gets critical low
                 buzzer = 1; // The mbed resets at aproximatly 1V           
         }