A demonstration of the telemetry library (https://github.com/Overdrivr/Telemetry) to transfert to the desktop various data from the FRDM-TFC shield
Dependencies: BufferedSerial FRDM-TFC-HBRIDGE mbed telemetry
Example of the 'Telemetry' library, a portable communication library for embedded devices.
This code fetches all the data from the Freescale Cup RC-car. It relies on a more advanced shield library that is able to read current feedback from HBridges.
The available data is the following :
- Potentiometer 0
- Potentiometer 1
- 4-bit DIP switch
- Battery level
- current inside HBridge A
- current inside HBridge B
You can use the Pytelemetry Command Line Interface to open plots, visualize the received data, and communicate with the car.
See https://github.com/Overdrivr/pytelemetrycli
Diff: main.cpp
- Revision:
- 2:9f07b14821b0
- Parent:
- 1:eeaf7cbb5582
- Child:
- 3:ddf88c34c61d
--- a/main.cpp Mon Feb 22 21:40:09 2016 +0000 +++ b/main.cpp Mon Feb 22 21:40:44 2016 +0000 @@ -63,7 +63,7 @@ tm.pub_f32("pot0",TFC_ReadPot(0)); tm.pub_f32("pot1",TFC_ReadPot(1)); tm.pub_f32("bat",TFC_ReadBatteryVoltage()); - tm_pub_u8("dip",TFC_GetDIP_Switch()); + tm.pub_u8("dip",TFC_GetDIP_Switch()); tm.pub_f32("throttle",state.throttle); TFC_SetMotorPWM(state.throttle ,state.throttle);