A command-line interface for data vizualisation and communication with Arduino

Hello everyone,

I would like to share two open source projects I am working on that aim to facilitate data visualization and communication with Arduino boards.

On the Arduino side, the Telemetry library lets you, using a very simple API, publish data to the computer or attach a variable to a label so that it can be remotely updated.

An example of such a program :

#include <Telemetry.h>

Telemetry TM;
int32_t someParam = 0;

void setup() {
  TM.begin(115200);

  // Attach variable to topic "feedforward"
  TM.attach_i32_to("feedforward", &someParam);
}

void loop() {
  // Publish on topic "feedback"
  TM.pub_i32("feedback",someParam);
  TM.update();
  delay(10);
}

The nice perk of this library is that the communication protocol is natively understood by the Pytelemetry Command Line Interface (Github : Overdrivr/pytelemetrycli ).

This CLI lets you open graphs just by typing a command, write parameters on the Arduino, list all received channels, print received data, etc.

Here is a screenshot of a live plot :

Both these libraries are still in a pretty early development stage, but they are well tested and already very stable.

The communication protocol also supports some nice features, such as arrays and sparse arrays. If you send an array from the Arduino (using a technique called indexed topics), the CLI will automatically understand it is dealing with an array and not linear data, and will use array indexes for the x-axis (instead of time for linear-data).

I welcome and really appreciate all constructive feedback and contributions. Feel free to say hi if you are interested in this project. :slight_smile: