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: MODSERIAL mbed-rtos mbed
Fork of Master by
Diff: bluetooth.cpp
- Revision:
- 9:6057314dc8ec
- Parent:
- 8:bfcfda6b38fe
- Child:
- 10:a90935ea0a4b
--- a/bluetooth.cpp Sat Sep 13 09:42:55 2014 +0000
+++ b/bluetooth.cpp Sat Sep 13 11:03:52 2014 +0000
@@ -85,7 +85,7 @@
//PACK: [option/function/pwm*4]
//pwm
for( int i=0 ; i<4 ; i++ ){
- temp.byte[i]=buf[1+i];
+ temp.byte[i]=buf[2+i];
}
motor( buf[1], temp.fl );
}
@@ -192,4 +192,12 @@
pc.printf( "%f %f\n", *_ir, *_fsr );
+}
+
+void sendMotor( char function, float power ){
+ char f[1];
+ float p[1];
+ f[0] = function;
+ p[0] = power;
+ sync( SYNC_MOTOR, f, p );
}
\ No newline at end of file
