Guide · ESP32
Plot ESP32 sensor data live on your PC.
Two ways from an ESP32 to live curves in KymoStudio: flash the ready-made KymoProbe firmware in two commands, or add the KymoCore library to your own PlatformIO project.
What you need
- An ESP32 board (the examples use a NodeMCU-32S; ESP32-S3 and ESP32-C3 are covered too) and a USB cable.
- PlatformIO – in VS Code or on the command line.
- KymoStudio for Windows.
Option A: ready-made firmware in two commands
git clone --recurse-submodules https://github.com/CodeName-666/kymoprobe.git
cd kymoprobe
pio run -e nodemcu-32s -t upload
The board sends a sine and a sawtooth at 50 Hz each. Close the PlatformIO serial monitor, open the COM port in KymoStudio at 115200 baud, 8N1, and assign the two channels to a chart. Your own sensors go into src/kymo_config.cpp – see KymoProbe.
Option B: your own project with KymoCore
Add the library to platformio.ini:
[env:esp32]
platform = espressif32
board = nodemcu-32s
framework = arduino
lib_deps = codename666/KymoCore
Then describe your channels and provide three callbacks: the clock, the measurement and the write function. The complete Arduino and ESP32 example fits on one screen. The heart of it:
static uint8_t readSample(void *user, uint8_t id, KymoSample *out)
{
(void)user;
out->value = id == 0 ? readTemperature() : readPressure();
return 1U;
}
static const KymoChannel channels[] = {
{20U, 0U, 0U}, // channel 0 every 20 ms
{100U, 1U, 0U} // channel 1 every 100 ms
};
void setup() { Serial.begin(115200); lastStatus = Kymo_Init(&context, &config); }
void loop() { lastStatus = Kymo_Main(&context); }
KymoCore decides which channel is due, encodes a 9–21 byte frame and hands it to your write callback – it never waits for the UART, so your loop keeps its timing. Keep other Serial.print output off this port; it would mix text into the binary stream.
Wireless: Wi-Fi with MQTT or TCP
KymoProbe's wifi_mqtt_example sends the same frames through an MQTT broker, and the ESP32 main project has TCP and combined network demo modes. In KymoStudio, add an MQTT or TCP source instead of the serial port. KymoStudio also listens for UDP datagrams if you write your own UDP transport.
Next steps
- Draw X against Y or XYZ in 3D: build with
KYMO_ENABLE_X=1andKYMO_ENABLE_Z=1, setKYMO_FLAG_XandKYMO_FLAG_Zon the channel and fillxandzin the sample. - Open the measurement analysis (Ctrl+M) for cursors, step response, FFT and trigger.
- Enable KymoCore tracing and try the ESP32 trace demo to see tasks, functions and hotspots.