Multithreading of mBot2 / CyberPi?


#1

Is there any example how to run code multithreaded?

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


#2

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


#3

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?


#4

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.
2022-01-15%2008_46_03-Window

Makeblock will tell you more, I’m sure.