Multithreading of mBot2 / CyberPi?


Is there any example how to run code multithreaded?

Let’s say play music, listening to voice commands while run line following program?


In Python there is probably better… It seems the chip allows it. It’s not great for music but it works.


Thanks for reply. Do you mean that if I need a multithreaded tasks I have to make some separate forever loops running from CyberPi start and they will run in parallel asynchronously?


Hi Showman,

Look at the generated code. I think we are talking about 2 separate event loops for block programming. In Python, I didn’t check. However, to answer your question, the ESP32 can perform Multitread tasks.

Makeblock will tell you more, I’m sure.