RC-car remotely controlled from a computer. A demonstration of the power of Pytelemetry/telemetry. MIT Licensing.

Dependencies:   BufferedSerial FRDM-TFC mbed telemetry

Example of the 'Telemetry' library, a portable communication library for embedded devices. The PC-side of this code is hosted a github.com/Overdrivr/telemetry-examples

This code uses the car from the Freescale Cup competition initially dedicated to be a line-following racing car, and turns it into a full-blown radio-controlled car.

It is using a Bluetooth serial module to provide wireless connectivity. See the repository at github.com/Overdrivr/telemetry-examples for complete instructions on wiring everthing together.

Repo : TO BE DONE

Files at this revision

API Documentation at this revision

Comitter:
Overdrivr
Date:
Wed Mar 09 15:45:28 2016 +0000
Parent:
1:5a07069e17b6
Commit message:
headers include update

Changed in this revision

FRDM-TFC-HBRIDGE.lib Show annotated file Show diff for this revision Revisions of this file
FRDM-TFC.lib Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
telemetry.lib Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/FRDM-TFC-HBRIDGE.lib	Wed Mar 09 15:45:28 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/emh203/code/FRDM-TFC/#24430a0d7fd8
--- a/FRDM-TFC.lib	Mon Feb 22 21:24:52 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-http://mbed.org/users/emh203/code/FRDM-TFC/#24430a0d7fd8
--- a/main.cpp	Mon Feb 22 21:24:52 2016 +0000
+++ b/main.cpp	Wed Mar 09 15:45:28 2016 +0000
@@ -1,6 +1,6 @@
 #include "mbed.h"
-#include "FRDM-TFC/TFC.h"
-#include "telemetry/Telemetry.h"
+#include "TFC.h"
+#include "Telemetry.hpp"
 
 /*
     Example of the 'Telemetry' library, a portable communication library for embedded devices.
@@ -15,8 +15,6 @@
     Repo : TO BE DONE  
 */
 
-DigitalOut led(LED1);
-
 struct TM_state {
   float direction;
   float throttle;  
@@ -42,6 +40,7 @@
     // and pass the TM_state data structure to it.
     TM.sub(process, &carState);
     
+    DigitalOut led(LED1);
     led = 1;
     
     // Init the TheFreescaleCup shield
@@ -63,12 +62,7 @@
     
     for(;;)
     {       
-        // update telemetry
-        if(tm_timer.read_ms() > 50)
-        {
-            tm_timer.reset();
-            TM.update();   
-        }
+        TM.update();   
         
         // update servo control
         if(servo_timer.read_ms() > 10)
@@ -85,7 +79,7 @@
         }
         
         // publish car state & blink a led
-        if(print_timer.read_ms() > 500)
+        if(print_timer.read_ms() > 200)
         {
             print_timer.reset();
             // Publish the car parameters, so we can access them from the computer
--- a/telemetry.lib	Mon Feb 22 21:24:52 2016 +0000
+++ b/telemetry.lib	Wed Mar 09 15:45:28 2016 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/Overdrivr/code/telemetry/#8e3de1a314e1
+http://mbed.org/users/Overdrivr/code/telemetry/#f5e1b079bffd