Replies: 2 comments 4 replies
-
@Choons Is the idea that the laptop sends commands over WiFi? In which case you need to receive commands over a socket. This might sound like overkill but a really simple way to do this is just to run an asyncio web server on your ESP32 and send commands over HTTP. I'd recommend taking a look at This will make it super easy to write the client on the laptop because you can use any http client library (or even curl/wget from the command line!) |
Beta Was this translation helpful? Give feedback.
-
Asyncio is definitely the best way to achieve concurrency on a microcontroller. There is a tutorial here. To read from a socket concurrently with other tasks use a |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi folks, my first post here, hoping someone can point me in the right direction. I'm building a moving head light that has addressable RGB LED matrix(es) and two stepper motors to handle rotation. I want to be able to control it from a laptop over wifi + TCP socket. I've got the neopixel LED stuff working fine, stepper motors and TMC2209 controllers are sorted, and have my python app on laptop connecting to the ESP32 board with micropython over wifi socket into an asyncio socket server. I'm pretty new to asyncio coding and am looking for the best way to set up the async functions on the ESP32 board side to accept real time control for the stepper motors from say the arrow keys or even a joystick on the laptop side. Anyone done this or know of a code example? I'd rather not reinvent the wheel here. Thanks for any help.
Beta Was this translation helpful? Give feedback.
All reactions