Generate tones by using tone library in your Raspberry Pi Pico.
The idea of this project is to use your Raspberry Pi Pico to generate christmas melodies so that you can put your board next to your christmas three and (Or as an Ornament) to have good memories from your childhood 🎄.
If you want to compile this project, you need to use this forked version of
pico-extras which includes pico_tone library to generate tones.
There is a PR open to include pico_tone by default in the pico-extras library.
In the meantime, it is possible to use the forked version of it.
pico_tone uses Pulse With Modulation (PWM)
to generate tones, similar to tone() from Arduino.
- Noche de Paz 🌙🎄 (Silent Night)
- El Ninio del Tambor 🧒🥁 (Rompomponpon)
- La Cucaracha 🪳🇲🇽
- Los Peces en el Rio 🐟🐟
Follow the Quick-start your own project from pico-sdk
to make sure your environment is setup correctly.
Below instructions are for Linux base platforms.
- Clone
pico-extrasandnoisy-ornamentrepositories.
$ git clone https://github.com/jcarranz97/pico-extras.git
$ git clone https://github.com/jcarranz97/noisy-ornament.git
- Create
PICO_EXTRAS_PATHenvironment variable with the path wherepico-extraswas cloned.
$ export PICO_EXTRAS_PATH=$(pwd)/pico-extras
- Change directory to noisy-ornament and setup a CMake build directory.
$ cd noisy-ornament
$ mkdir build
$ cd build
$ cmake ..
- Compile project.
$ make -j(nproc)
- Connect your Raspberry Pi Pico to your PC with
BOOTSELbutton pressed. - Copy
noisy_ornament.uf2file to your board.
$ cp noisy_ornament.uf2 <RPI-RP2 mount folder>
In my case, my Raspberry Pi Pico is always mounted under /media/juan/RPI-RP2