Arduino Serial Plotter, pyqtgraph
- Python 3.8+
pip install PyQt5 pyqtgraph qdarkstyle qtawesome
python qtArduinoSerialPlotter.py
- Only data
String data ="pltr#["+String(x)+","+String(y)+"]";
- Add label
String data ="pltr#["+String(x)+","+String(y)+",lbl1]";
- Add Color (#f00)
String data ="pltr#["+String(x)+","+String(y)+",lbl1,f00]";
- Arduino Example
void setup() {
Serial.begin(115200);
}
float x=0.0;
char buffer[200];
void loop() {
float y=x*x*x;
y=y/100.0;
//"pltr#[xValue,yValue,Label]"
String data="pltr#["+String(x)+","+String(y)+",Lbl1]";
Serial.println(data);
x++;
delay(200);
while (Serial.available() > 0) {
if (Serial.read() == '\n') {
Serial.println("ok");
}
}
}
- One graph scene multi line
String data ="pltr#["+String(x)+","+String(y)+",lbl1:"+String(x)+","+String(y+5)+",lbl2]";
- Multi graph scene multi line
String data ="pltr#["+String(x)+","+String(y)+",lbl1:"+String(x)+","+String(y+5)+",lbl2]#["+String(x)+","+String(y+20)+",lbl3]";