SerialFlow needs no library on your board: a few printed lines draw status windows, graphs and dashboards. An AI assistant doesn’t know those lines, though, and when it guesses, it guesses wrong. This file tells it everything: every command and field, the mistakes that fail without an error, every menu path, what this beta can’t do yet, and tested code for the common microcontrollers. With it, the assistant can write your firmware side, a test file and a dashboard, and tell you why a graph stays empty.
How to use it
- Download the file with the button above. It is plain text (Markdown).
- Start a new chat with your AI assistant (Claude, ChatGPT, Gemini, Copilot or the one in your IDE) and attach the file. If it takes no files, press Copy the text and paste it into your first message.
- Describe your board and what you want to see. The list below says what helps. One message is enough: the assistant asks if something is missing.
- Ask for the code and a test file. The reference tells the assistant to give you both.
- Try the test file first. In SerialFlow, ☰ → Test → Load Test File, with no board connected: you see the status windows and graphs before you flash anything.
- Flash, connect and look. If something is off, tell the assistant what you see. Raw Display (Ctrl+R) shows the lines as they arrive, and ☰ → Tools → RX Error Collector… → Copy All lists rejected graph lines with the reason. Paste both into the chat.
An assistant in your editor? Save the file in your project, for example as docs/serialflow-ai-reference.md,
and point the assistant to it, or mention it in the project’s instructions for the assistant.
What to tell the assistant
- Your MCU and board: an STM32F401 Nucleo, an ESP32-S3 DevKit, a Raspberry Pi Pico, an Arduino Uno …
- Your framework: Arduino, STM32 HAL in CubeIDE, ESP-IDF, Zephyr or nRF Connect SDK, Pico SDK, MicroPython, bare metal
- The link: a UART through the debug probe or a USB-serial adapter, or native USB, and the baud rate
- How the board prints today:
printf,Serial.print, a logging macro, DMA - What you want to see: a colour log, a status table, live graphs, a long recording, an oscilloscope view, a dashboard
- How fast: how many values, how many times a second
- The cable: a long or noisy link wants a checksum on each line
- What goes back to the board: commands, buttons, automatic replies
Example requests
Write in your own words; these show the kind of detail that helps.
STM32 · status window and graph
I attached the SerialFlow reference. Board: STM32F401 Nucleo, STM32CubeIDE with HAL, UART2 through the ST-Link at
115 200 baud. My fan controller runs a 100 ms loop with set_rpm, rpm, duty and temp_c. I want a colour boot
log, a status window with speed, duty and temperature, and a live graph of speed against the set point with a limit
line at 3 000 rpm. Give me the code and a test file.
ESP32 and Arduino · a long run and a dashboard
ESP32-S3 DevKit, Arduino IDE, native USB. Once a second I read four temperatures and a pump on/off flag. I want a graph of the whole 8-hour run, recorded to a file, and a canvas dashboard with four gauges, an alarm above 80 °C and a lamp for the pump. Give me the sketch, the canvas text and the steps in SerialFlow.
Zephyr · fast data
nRF52840 DK with Zephyr, UART at 921 600 baud. I sample a 3-axis accelerometer at 1 kHz. Text lines or packed binary? Write the sender, and tell me how to check that no samples are lost.
Pico and MicroPython · oscilloscope
Raspberry Pi Pico with MicroPython over USB. Capture 200 ADC samples at 10 kHz and show them as an oscilloscope frame, twice a second, on a fixed 0 to 3.3 V axis.
Any board · keep the data around a fault
My motor controller streams phase current at 500 samples a second. When the current passes 40 A, I want SerialFlow to save the last two seconds of the current graph and the log, named after the fault, so I can open them later. What do I print, and what do I switch on in SerialFlow?
When something is wrong
My graph lines show up as text in the SerialFlow log, like ~{A:1:23.5:67.2}, and the graph stays empty. Here is my
code, and what Raw Display and the RX Error Collector show: …
After the run
I recorded last night’s run with the Data Collector (SQLite). Write a Python script that plots speed and temperature and lists every event marker with its time.
What the assistant can make for you
| Ask for | You get |
|---|---|
| Firmware output | C, C++ or Python for your board: a colour log, status windows, graph lines with an optional CRC-8, packed binary for high rates, and the lines that save a graph or the log when something happens |
| A test file | The lines your firmware will print, to load in SerialFlow before you flash |
| A canvas dashboard | Text you paste with Import/Export ▾ → Paste AI Text… on the canvas |
| Rules and buttons | Keyword colours, auto-reply rules (JSON), Quick Send buttons, macro steps |
| Analysis | Python that reads the Data Collector’s SQLite, CSV or JSON Lines files |
| Answers | Why a graph stays empty, which baud rate to pick, text or binary, which setting does what |
What’s in the file
- Instructions for the AI assistant
- What to find out before writing code
- Hard rules: the mistakes that fail silently
- What SerialFlow can do: the capability map
- Ports and connection
- Terminal output: text, colour and characters
- Status windows
- Graph commands (text protocol)
- Device commands: save captures, start and stop logging
- CRC-8 on graph lines
- Packed binary graph data
- Speed and timing
- Firmware: a portable helper and per-platform recipes
- Test files: try it without hardware
- PC side: everything the user does in SerialFlow
- Files an AI can write for SerialFlow
- Troubleshooting
- Known limits in beta 2, and what changed since beta 1
- A complete worked example
Good to know
- It describes SerialFlow 0.9.0 beta 2, including what doesn’t work yet and what changed since beta 1, such as the X-axis commands that beta 1 reads as “delete the graph”. The assistant is told to work around the limits, not to promise them. When a new version comes out, download the file again: the link stays the same.
- Assistants still make mistakes. Try the test file before you flash, and look in the manual when something seems odd. If the reference itself is wrong, please tell us.
- Your data: the file holds nothing of yours. What you paste into a chat goes to that AI service, so think before you paste code or logs you may not share. SerialFlow itself sends no serial data anywhere.
- Built into SerialFlow: the canvas dashboard has a short description of its text format (Import/Export ▾ → AI Format Reference), and the toolbar and ☰ menu settings pages have Copy Format Reference for their layout files. This file already holds the canvas format.