Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By QuickFix
#92011 In short: no.

The ESP core does some multi-tasking (one for the WiFi stack and one for the main program) on its own, but multi-threading is, for as far as I know, not possible, I don't even think multi-threading is even possible with Arduino in general or specifically single core controllers. :?

If you want something similar, you could always use interrupts or write some proto-thread like code, I guess.
User avatar
By williamhenrick
#92036 No microcontrollers can't perform multiple functions at the same time. For that, you have to use a microprocessor like the raspberry pi.

I have once worked on Myrio from LabView that allows multiple functions, as its programmed using LabVIEW software.
User avatar
By btidey
#92038 I don't understand that distinction being made between microcontrollers and microprocessors with respect to multithreading.

Multithreading is a software programming model where a process can create multiple threads of execution that operate independently. It can be applied to any general computing device limited only by the resources available to that device and that includes microcontrollers.

Performing operations truly simultaneously is a different thing and will require architectures that have multiple hardware resources like processing cores that can operate in parallel.

There are different forma of multithreading with one of the characteristics being how threads are scheduled for execution; cooperative or preemptive.

A simple example of cooperative multithreading in an arduino environment is
https://github.com/bmellstrom/esp8266-arduino-threads