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 MultiSerial
Revision 11:8b1a63a1172a, committed 2014-09-04
- Comitter:
- Hatter
- Date:
- Thu Sep 04 04:51:51 2014 +0000
- Parent:
- 10:5b67d18f30a9
- Child:
- 12:6e2ee1c83ac1
- Commit message:
- ????OK
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Sep 04 02:53:40 2014 +0000
+++ b/main.cpp Thu Sep 04 04:51:51 2014 +0000
@@ -46,12 +46,10 @@
xbee_packet *pt_packet=&packet;
xbee.read_data(get_data,XBEE_KEY);
-
+ int i=0;
for(;;){
- wait(0.1);
-
- check = !check;
+ wait_ms(0.1);
// get_data[0]=0xFF;
// get_data[1]=0x01;
@@ -69,9 +67,13 @@
if(packet.leg&0x4) motors = 0x50; //p25,p27
if(packet.leg&0x8) motors = 0xA0; //p26,p28
- pc.printf(" arm = %d" ,packet.arm[0]);
- pc.printf(" leg = %d" ,packet.leg);
+ if(i==10e3){
+ pc.printf(" arm = %d" ,packet.arm[0]);
+ pc.printf(" leg = %d" ,packet.leg);
+ i=0;
+ }
armMbed.write_data(pt_packet->arm,ARM_KEY);
+ i++;
}
}
\ No newline at end of file