Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: main.cpp
- Revision:
- 1:06b0309330c5
- Parent:
- 0:6fe0fbc55b6f
- Child:
- 2:2580959cb1f9
--- a/main.cpp Tue Oct 23 08:55:58 2018 +0000
+++ b/main.cpp Thu Oct 25 12:43:37 2018 +0000
@@ -23,47 +23,47 @@
while(1)
{
- if(xbee.readable());
+ if(xbee.readable())
{
data = xbee.getc();
}
- if(data == 'F')
+ /*if(data == 'F')
{
+ motor_A.pulsewidth(0.015);
+ motor_B.pulsewidth(0.015);
+ pc.printf("F:%c",data);
+ }*/
+
+ if(data == 'A')
+ {
motor_A.pulsewidth(0.018);
motor_B.pulsewidth(0.018);
- pc.printf("F:%c",data);
+ pc.printf("A:%c",data);
}
- else if(data == 'B')
+ if(data == 'R')
{
- motor_A.pulsewidth(0.00);
- motor_B.pulsewidth(0.00);
- pc.printf("B:%c",data);
- }
-
- else if(data == 'R')
- {
- motor_A.pulsewidth(0.018);
+ motor_A.pulsewidth(0.020);
motor_B.pulsewidth(0.00);
pc.printf("R:%c",data);
}
- else if(data == 'L')
+ if(data == 'L')
{
motor_A.pulsewidth(0.00);
motor_B.pulsewidth(0.018);
pc.printf("L:%c",data);
}
- else
+ if(data == 'N')
{
motor_A.pulsewidth(0.00);
motor_B.pulsewidth(0.00);
pc.printf("N:%c",data);
}
- data = 'N';
+ //data = 'N';
}
}