Timers vs Coroutines
Posted: Fri Sep 28, 2018 9:52 pm
Hi everyone,
I am new in the Micropython world and I have some doubts about what is the right way to do some stuff
I am working on a project to control several devices all around my house. I am using MQTT to perform communications.
My device is running Micropython on an ESP8266.
I need to parallelize jobs, and for that I am using Timers that runs every X seconds or milliseconds, it depends.
So, my questions is: Is that the right way to do it?. I have been investigating coroutines and I did some experiments but this coroutines have side effects.
For example:
I really like the ability to update the code of the device remotely using the webrepl and I don't want to lose that feature
When I use coroutines the webrepl gets blocked
What do you think guys? I would like to heard your recommendations
I am new in the Micropython world and I have some doubts about what is the right way to do some stuff
I am working on a project to control several devices all around my house. I am using MQTT to perform communications.
My device is running Micropython on an ESP8266.
I need to parallelize jobs, and for that I am using Timers that runs every X seconds or milliseconds, it depends.
So, my questions is: Is that the right way to do it?. I have been investigating coroutines and I did some experiments but this coroutines have side effects.
For example:
I really like the ability to update the code of the device remotely using the webrepl and I don't want to lose that feature
When I use coroutines the webrepl gets blocked
What do you think guys? I would like to heard your recommendations