Serial communication with an ESP32-s3
Posted: Tue Sep 03, 2024 10:49 pm
Hi;
I have an esp32-s3 Feather development board, and have written a PID controller that I would like to tune. I imagine the way I'd like to do this is send PID coefficients to this esp32 as it's running, then be able to check the effects of my inputs.
I thought the way to do this was via serial communication, but after a day of trying and failing to get that working, I'd like to ask for advice as to how I might do this. I think ideally I could have a python script that I run, that prompts me for input, passes this to the esp, and allows me to see log output from the esp all within the same terminal. But I'm not picky, I need would like to be able to do this in a more efficient way than updating global variables, recompiling, reuploading, etc.
As an added bonus, I'm using a small VSCode extension called Teleplot (https://github.com/nesnes/teleplot) that lets me see realtime plots of data. It does this by reading the serial port output of the ESP (so, I can't have the ESP Monitor and Teleplot running at the same time, I've learned). Ideally I could provide input while being able to watch visual feedback about the effects of my tuning. But really any toehold to getting any of this to work would be great.
I have an esp32-s3 Feather development board, and have written a PID controller that I would like to tune. I imagine the way I'd like to do this is send PID coefficients to this esp32 as it's running, then be able to check the effects of my inputs.
I thought the way to do this was via serial communication, but after a day of trying and failing to get that working, I'd like to ask for advice as to how I might do this. I think ideally I could have a python script that I run, that prompts me for input, passes this to the esp, and allows me to see log output from the esp all within the same terminal. But I'm not picky, I need would like to be able to do this in a more efficient way than updating global variables, recompiling, reuploading, etc.
As an added bonus, I'm using a small VSCode extension called Teleplot (https://github.com/nesnes/teleplot) that lets me see realtime plots of data. It does this by reading the serial port output of the ESP (so, I can't have the ESP Monitor and Teleplot running at the same time, I've learned). Ideally I could provide input while being able to watch visual feedback about the effects of my tuning. But really any toehold to getting any of this to work would be great.