How can I use multithreading on Arduino Due? Is it possible? Because Due is having 2 cores. Please suggest me ASAP ..
imbhavya:
Please suggest me ASAP ..
now that's rude
imbhavya:
How can I use multithreading on Arduino Due? Is it possible? Because Due is having 2 cores. Please suggest me ASAP ..
One core. You'd have to write a thread-switching library or find one.
You can thread-switch on the Uno come to that, needs a little assembler to context-switch and a scheduler,
not that there's much room for multiple stacks!
Perhaps if you explain your application we can come up with a solution that does not require multithreading. Most applications that are small enough to use an Arduino device can be implemented without multithreading.
I suspect an XY Problem. As asked above, give us some more details about your project.
FYI the DUE Sam3x is a one core processor, BUT it can execute several actions at the same time with its DMA features for most of the peripherals.
Hi,
Welcome to the forum.
Please read the post at the start of any forum , entitled "How to use this Forum".
OR
http://forum.arduino.cc/index.php/topic,148850.0.html.
If you want to use dual cores, look at ESP32.
https://www.youtube.com/watch?v=k_D_Qu0cgu8&list=PL3XBzmAj53RnZPeWe799F-uoXERBldhn9&index=15&t=0s
Can you tell us your electronics, programming, arduino, hardware experience?
Tom... ![]()
For a single core microprocessor you can get what appears to be multi-threading with the sort of code in Several Things at a Time
Note how each function runs very briefly and returns to loop() so the next one can be called. None of the functions tries to complete a task in one call. And there may be dozens of calls to a function before it is actually time for it to do anything.
...R