![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
ft. button press reset
Fork of BeaconDemo_RobotCode by
Diff: PsiSwarm/psiswarm.cpp
- Revision:
- 2:a6214fd156ff
- Parent:
- 1:f6356cf1cefc
- Child:
- 3:cd048f6e544e
--- a/PsiSwarm/psiswarm.cpp Sat Oct 03 23:09:10 2015 +0000 +++ b/PsiSwarm/psiswarm.cpp Mon Oct 05 14:42:16 2015 +0000 @@ -12,25 +12,27 @@ #include "psiswarm.h" -Display display; +//Setup MBED connections to PsiSwarm Robot Serial pc(USBTX,USBRX); +I2C primary_i2c (p9, p10); +InterruptIn gpio_interrupt (p12); Serial bt(p13, p14); - -DigitalOut mbed_led1(LED1); -DigitalOut mbed_led2(LED2); -DigitalOut mbed_led3(LED3); -DigitalOut mbed_led4(LED4); AnalogIn vin_current(p15); AnalogIn vin_battery(p16); AnalogIn vin_dc(p17); -I2C primary_i2c (p9, p10); -InterruptIn gpio_interrupt (p12); PwmOut motor_left_f (p21); PwmOut motor_left_r (p22); PwmOut motor_right_f(p23); PwmOut motor_right_r(p24); PwmOut center_led_red(p25); PwmOut center_led_green(p26); +Display display; //Connects to i2c(p28,p27), reset(p29), backlight(p30) +DigitalOut mbed_led1(LED1); +DigitalOut mbed_led2(LED2); +DigitalOut mbed_led3(LED3); +DigitalOut mbed_led4(LED4); + + float center_led_brightness; float backlight_brightness; @@ -57,7 +59,7 @@ char debug_mode = DEBUG_MODE; char debug_output = DEBUG_OUTPUT_STREAM; -char firmware_bytes[20]; +char firmware_bytes[21]; int base_colour_sensor_raw_values [4]; int top_colour_sensor_raw_values [4];