Psi Swarm robot library version 0.9

Dependents:   PsiSwarm_V9_Blank

Fork of PsiSwarmV9 by James Hilder

Revision:
10:e58323951c08
Parent:
9:dde9e21030eb
Child:
11:312663037b8c
--- a/psiswarm.cpp	Sun Oct 16 14:12:49 2016 +0000
+++ b/psiswarm.cpp	Sun Oct 16 16:00:20 2016 +0000
@@ -27,6 +27,7 @@
 Motors motors;
 Eprom eprom;
 Led led;
+Sensors sensors;
 
 //Setup MBED connections to PsiSwarm Robot
 Serial pc(USBTX,USBRX);
@@ -228,11 +229,11 @@
     debug("- Robot ID: %d\n",robot_id);
     char switchstate = IF_get_switch_state();
     debug("- Switch State   : %d\n",switchstate);
-    debug("- Battery Voltage: %1.3fV\n",get_battery_voltage());
-    debug("- DC Voltage     : %1.3fV\n",get_dc_voltage());
-    debug("- Current Draw   : %1.3fA\n",get_current());
+    debug("- Battery Voltage: %1.3fV\n",sensors.get_battery_voltage());
+    debug("- DC Voltage     : %1.3fV\n",sensors.get_dc_voltage());
+    debug("- Current Draw   : %1.3fA\n",sensors.get_current());
     if(has_temperature_sensor){
-    debug("- Temperature    : %1.3fC\n",get_temperature());
+    debug("- Temperature    : %1.3fC\n",sensors.get_temperature());
     }
     char demo = 0;
     if(ENABLE_DEMO == 1 && switchstate > 0) demo=1;