Serial CLI and Plotter is an advanced web-based tool designed for engineers and developers working with microcontrollers. It provides real-time data visualization and serial communication capabilities, making it an essential tool for debugging and monitoring embedded systems. Currently the application is only supported on browsers that support Web Serial API
Features
Real-time data visualization
Interactive command-line interface
JSON data plotting
Multiple theme options
Data export capabilities
Use Cases
IoT device development
Sensor data monitoring
Microcontroller debugging
Protocol testing
Educational projects
Supported Devices
Arduino boards
ESP32/ESP8266
STM32 controllers
Any serial-enabled device
CLI Output
Raw Serial
Setup & About
×
Quick Start Guide
Serial CLI and Plotter - an all-in-one development tool for microcontroller projects!
This application combines three essential tools:
A real-time plotting interface that visualizes JSON data from your device
A command-line interface (CLI) for sending commands and viewing responses
A raw serial monitor for detailed debugging
Perfect for Arduino, STM32, ESP32, or any other microcontroller project that needs real-time data
visualization
and interactive command control. Simply send JSON-formatted data from your device to create
dynamic plots,
while maintaining full CLI functionality for configuration and debugging.
1. Connect to Your Device
Set your baud rate (default: 115200)
Click "Select Port" to choose your serial device
2. Send Commands
Run a simple UART echo on Arduino or any other microcontroller
Type commands in the command input field
Use NL (newline) and CR (carriage return) checkboxes as needed
Press Enter or click Send to execute commands
Use Up/Down arrows to navigate command history
3. View Output
CLI Output: Shows formatted commands and responses
Raw Serial: Shows unformatted serial data (can be collapsed)
Real-time Plot: Displays JSON data graphically
4. Plot Controls
Use Pause/Resume to control real-time updates
Clear button resets the plot
Points field controls how many data points to display
JSON Data Format
Here are two examples showing how to generate compatible JSON data:
The application will parse multiple key value pairs and plot them
C Example (General Purpose)
#include <stdio.h>
#include <stdarg.h>
#include <math.h>
#include <string.h>
#include <stdio.h>
// Ensure the UART is setup for your device via configurator voidformat_json(char *buffer, size_t buffer_size, int num_pairs, ...) {
va_list args;
va_start(args, num_pairs);
size_t offset = snprintf(buffer, buffer_size, "{");
for (int i = 0; i < num_pairs; i++) {
const char *key = va_arg(args, const char *);
double value = va_arg(args, double);
offset += snprintf(buffer + offset, buffer_size - offset,
"\"%s\": %.2f%s", key, value,
(i < num_pairs - 1) ? ", " : "");
}
snprintf(buffer + offset, buffer_size - offset, "}\n");
va_end(args);
}
intmain() {
char buffer[256];
int num_pairs = 5;
double sine_value = 0.0;
// Simulate dynamic data changing over timefor (int i = 0; i < 20; i++) {
sine_value = sin(i * 0.1);
format_json(buffer, sizeof(buffer), num_pairs,
"temp", sine_value,
"hum", (sine_value * 2),
"press", (sine_value * 2.5),
"press2", (sine_value * 4),
"press3", (sine_value * 3));
// Use printf if implemented or HAL_UART_Transmit// HAL_UART_Transmit(&huart2, (uint8_t *)buffer, strlen(buffer), HAL_MAX_DELAY);
printf("%s", buffer);
HAL_Delay(100);
}
return0;
}
Arduino Example
// Arduino example that sends sensor data as JSONvoidsetup() {
Serial.begin(115200);
}
voidloop() {
// Simulate sensor readingsfloat temp = analogRead(A0) * 0.1; // Example temp sensorfloat humid = analogRead(A1) * 0.1; // Example humidity sensor// Create JSON string
Serial.print("{");
Serial.print("\"temperature\":");
Serial.print(temp);
Serial.print(",");
Serial.print("\"humidity\":");
Serial.print(humid);
Serial.println("}");
delay(1000); // Update every second
}
Both examples will generate JSON data that can be plotted in real-time.
Example output format:
{
"temperature": 25.4,
"humidity": 65.2
}
About Serial CLI and Plotter
This application is designed to help engineers visualize real-time data and manage their microcontroller projects efficiently. Our tool is built with user experience and performance in mind.