Arduino dual core

Hi, I have a simple question :
Is there an Arduino with dual core, with example sketches ?

A few do, either google or goto the hardware section of arduino.cc to read the details,

I also have a simple question: why do you want an Arduino with dual core?

Many beginners believe that performing more than one task simultaneously is only possible with more than one core. In theory, that's true. But in practice, an Arduino can appear to us humans to be performing many tasks simultaneously.

Maybe this explains: Increasing speed of an SPI oled screen ?

Yes, the subject had shifted enough, so I started a new one.
I have found sketches on github to use the 2 cores, but uploading them and getting them to work is a nightmare.
Maybe the Nano RP2040 is not the right platform for that? Has anyone successfully used dual core on any kind of Arduino?

Lot's of times, it's not difficult, just read the docs.

What's so terrible about it? Is loading dual-core code any different from single-core?

I think the rp2040 is the best arduino controller to start using two cores. Another dual-core controller I know is the ESP32, but it's much more complicated because one core is already busy working with the radio - WiFi and Bluetooth

In general, I agree with @PaulRB - many newbies think that their program will work twice as fast on two cores.
In reality, this is almost never the case. Working with two cores is more difficult, and if a person could not solve a problem on one core - on two, his chances are even smaller.

If I haven't searched hard enough, my bad, but so far the only documentation I found is for the Arduino Giga and Portenta. The datasheet for the RP2040 doesn't say anything about dual core. Often when you install a board in the Arduino IDE, you get sketches that help you play with the different possibilities offered by the board; I installed Arduino Mbed OS Nano Boards but no basic sketches allowing you to say "Hello from core1" / "Hello from core2".
I am not looking for a way to go twice as fast, I want a second core that can handle the communication with a screen, while the first core stays busy doing its things nearly 100% of the time.

https://learnembeddedsystems.co.uk/basic-multicore-pico-example

in your situation dma will help you

One channel of dma can take data from sensors and put it in a buffer, and the other one can transmit the data to the display via SPI.
All you have to do is manage the flows.

Ok, but unless I missed something, it doesn't work on an Arduino, does it?
I also tried to compile this sketch, but no luck : arduino-pico/libraries/rp2040/examples/Multicore/Multicore.ino at master · earlephilhower/arduino-pico · GitHub
I downloaded arduino-pico-master.zip, copy-pasted the content of the Libraries folder in Arduino/libraries, started again the Arduino IDE, and as always I am told that #include "pico/stdio.h" doesn't exist.

Yes I have read about it, but that's more or less the same problem as with dual core : how do I as a beginner start to play with it?

This example is for different Arduino core.
To run the example you need to install Earle Philhower Arduino-Pico board package and use it instead of Arduino Mbed OS Nano Boards

Beginner - no way. It is not a beginner level.
The only possibility is to learn so that you are no longer a beginner.

Ok, I am done. Thanks for your help

I am also using earl phillhower extension.
I have made a Outdoor light program. It had its own http server for setup and using onboard machine ntp for time keepeing.
Do not stop core 0 almost all int ends at core 0.
to get or send data to core 1 i lock it
rp2040.idleOtherCore();// stop core1
hent_lux_mv(); //hent sidste målinger
rp2040.resumeOtherCore();//start core1
I have designed the program so core1 newer get any thing for core0 only the other way around.(just do arduino uno stuf :slight_smile: )
it work 100% with out any break down.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.