Telemetry
provides powerful communication and data visualization between a computer and any embedded device. This framework is fully compatible and supported on ARM Mbed and Arduino.
Telemetry is a lightweight, portable, fast and error-resilient point-to-point protocol. It is implemented in C language and Python (Pytelemetry
).
Data is exchanged on named channels, called topics. foo
, bar
and qux
are all topics on the figure above.
Telemetry
lets you attach your own C function to be notified each time a new frame is received. A collection of functions in the library can then help you update program parameters, or execute specific code when a specific topic is received, etc.
This tool was designed with five objectives in mind.
- Fast prototyping and debugging. Set everything up in a few minutes and start debugging any embedded device efficiently. Forget about printf. Forever.
- Communication-based applications. Stop re-writing custom protocols for each new project.
- Remote update of parameters. Tune your embedded application without loosing time compiling & flashing just for parameter tuning.
- Data plotting. Plot data from the device in no time. Standard linear data is supported, but also arrays, sparse arrays. In the future, also Matrices, XYZ, and RGB-type codes.
- Reusability. The protocol is highly flexible, loosely coupled to your application. It can be used in a wide number of application scenarios.
Send an incrementing value on topic count
and update variable throttle when receiving a new float value on topic throttle
. Reset counter when throttle value is updated.
#include <Telemetry.h>
Telemetry TM;
int32_t i = 0;
float throttle;
void setup() {
TM.begin(9600);
TM.attach_f32_to("throttle", &throttle);
}
void loop() {
TM.pub_i32("count",i++);
delay(50);
}
pytelemetry
is the python equivalent of this protocol, and is 100% compatible.
You can use it to write simple python scripts that communicate with the device, to send commands and update parameters in real time.
It is highly suitable for remote control of robots, RC cars, etc.
pytelemetrycli
is an awesome command line interface that allows direct communication with the device and immediate data visualization.
Directly in a terminal, with a few commands, you can :
- list all received topics
- print samples from a given topic
- publish data on a topic
- open high-performance graphs that plots data from the device in real-time
- full logging of a communication session
- (to be done) replay step-by-step of a session for deep analysis
All the information can be found from the Wiki Home.