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: FRDM-TFC mbed CBuffer XBEE mbed_angular_speed motor2 MMA8451Q
Fork of KL25Z_Camera_Test by
Revision 11:53de69b1840b, committed 2016-11-21
- Comitter:
- FatCookies
- Date:
- Mon Nov 21 16:57:53 2016 +0000
- Parent:
- 10:1bd0224093e4
- Child:
- 12:da96e2f87465
- Commit message:
- added hall sensor sending to jabba
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| motor2.lib | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Nov 16 16:31:46 2016 +0000
+++ b/main.cpp Mon Nov 21 16:57:53 2016 +0000
@@ -169,11 +169,29 @@
pc.putc((int8_t)(TFC_LineScanImage0[i] >> 4) & 0xFF);
}
+
+ }
+ frame_counter++;
+
wL=Get_Speed(Time_L);
wR=Get_Speed(Time_R);
- sendString("wL = %f, wR = %f",wL,wR);
- }
- frame_counter++;
+
+ union {
+ float a;
+ unsigned char bytes[4];
+ } thing;
+
+ pc.putc('B');
+ thing.a = wL;
+ pc.putc(thing.bytes[0]);
+ pc.putc(thing.bytes[1]);
+ pc.putc(thing.bytes[2]);
+ pc.putc(thing.bytes[3]);
+ thing.a = wR;
+ pc.putc(thing.bytes[0]);
+ pc.putc(thing.bytes[1]);
+ pc.putc(thing.bytes[2]);
+ pc.putc(thing.bytes[3]);
}
inline void handleComms() {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/motor2.lib Mon Nov 21 16:57:53 2016 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/teams/GDP-4/code/motor2/#b4346ef9fa04
