![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Test code for motors, sensors and leds
Diff: main.cpp
- Revision:
- 2:dfd136e31aaf
- Parent:
- 1:17d31177e3c0
- Child:
- 3:d42f51bcf883
diff -r 17d31177e3c0 -r dfd136e31aaf main.cpp --- a/main.cpp Sat Nov 26 21:44:03 2016 +0000 +++ b/main.cpp Sat Nov 26 21:50:27 2016 +0000 @@ -1,17 +1,15 @@ #include "mbed.h" #include "robot.h" -DigitalOut myled(LED1); Robot robot; - int main() { robot.init(); motors.init(); led.start_test(); while(1) { - myled = 1; + mbed_led1 = 1; /* for(int i=0;i<8;i++){ pc.printf("Sensor %d: %d\n",i,sensors.read_adc_value(i)); @@ -21,7 +19,7 @@ robot.debug("Sensor 2: %d\n",sensors.get_adc_value(2)); wait(0.1); - myled = 0; + mbed_led1 = 0; wait(0.1); // pc.printf("V: %3.3f\n",robot.get_battery_voltage()); }