First release.
Dependencies: FXOS8700CQ SDFileSystem mbed
Final program
- Controling a robot by Bluetooth, it is capable of making 90° turns and move pre-defined distances.
Code by:
- Mayumi Hori
- Sarahí Morán
- Gerardo Carmona
Diff: main.cpp
- Revision:
- 5:b384cf06de76
- Parent:
- 4:c60636c95b80
--- a/main.cpp Fri Oct 17 09:08:06 2014 +0000 +++ b/main.cpp Fri Nov 07 05:12:50 2014 +0000 @@ -55,7 +55,6 @@ #include "mbed.h" #include "motors.h" #include "magnometer.h" -#include "encoder.h" #include "sd_card.h" #include "xbee.h" #include "encoders.h" @@ -132,7 +131,7 @@ c = bt.getc(); bt.printf("%c\n\r", c); //} - //if (c != ' '){ + //if (c != '\n'){ command_bt(c); } } @@ -182,17 +181,17 @@ send_all_data(); break; default: - motor_stop(); + //motor_stop(); // bt.printf("%f\r\n", get_mag_angle()); break; } } void send_all_data(){ - bt.printf("sending all data...\n"); - bt.printf("Right encoder: %f cms\tLeft encoder: %f cms\n", encoder(encoder_rigth), encoder(encoder_rigth)); - bt.printf("Rigt distance: %fcms\tLeft distance: %fcms\n", ultrasonicos(ULTRA_R), ultrasonicos(ULTRA_L)); - bt.printf("Angle: %f\n", get_mag_angle()); + pc.printf("sending all data...\r\n"); + pc.printf("Right encoder: %f cms\tLeft encoder: %f cms\r\n", encoder(encoder_rigth), encoder(encoder_rigth)); + pc.printf("Rigt distance: %fcms\tLeft distance: %fcms\r\n", ultrasonicos(ULTRA_R), ultrasonicos(ULTRA_L)); + pc.printf("Angle: %f\r\n", get_mag_angle()); } void gps_data(){