Close
0%
0%

PicoSem - dual core library for Pi Pico

Raspberry Pi Pico multi tasking library under Arduino IDE

Public Chat
Similar projects worth following
Simple library that implements semaphores to exchange data between two cores of a Raspberry Pi Pico under Arduino IDE framework.

I know quite well the Arduino world (and IDE) and i'm really a beginner with Raspberry family, but when i saw my first Pi Pico i understood that the processing speed combined with the presence of the 2 cores can provide an interesting potential compared to the Arduino.

So I started looking for some useful info to take advantage of the dual-core power, but without successe because the informations about Pi Pico in the Arduino environment are very few and it seems almost obligatory to switch to other languages and development environments but this is not i want to do.

The only way i've found to use Pi Pico dual-core, in my opinion has a big limit: the size of exchange buffers used by cores is limitied to only 4 bytes.

So i started to build an exeperimental new solution that overcomes this limit and PicoSem library was born.

  • 1 × Raspberry Pi Pico
  • 1 × Arduino IDE

  • 1
    Use the PicoSem library

    To make your own experience, all you need is the Arduino IDE, a Raspberry Pi Pico and the PicoSem library and you can download the zip file from: https://github.com/IWILZ/PicoSem

    To install the library:

    1. open Arduino IDE
    2. select "sketch/include library/add ZIP library"
    3. go to the folder you used to download the library and select "PicoSem-main.zip"

    Now you should see the PicoSem library in your "sketch/include library" list.

    Together with the library you will also find 2 simple examples that i recommend you to look at: Blink_Multicore and Bidirectional_Multicore

    NOTE that inside both examples you will find two "setup()" and 2 "loop()" with the following structure:

    // -------------- Core 0 -----------------
    void setup()
    {
       ...some instructions...
    }
    void loop()
    {
       ...some instructions...
    }
    
    // -------------- Core 1 -----------------
    void setup1()
    {
       ...some instructions...
    }
    void loop1()
    {
       ...some instructions...
    }

    All the code for core0 is inside setup() and loop() and the code for core1 is inside setup1() and loop1()

View all instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates