- Notifications
You must be signed in to change notification settings - Fork1
Raspberry Pi Pico (RP2040) playground
License
mryndzionek/rp2040_pico_sdk_playground
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
git submodule update --init --recursiveexport PICO_SDK_PATH=/path/to/your/pico-sdkmkdir buildcd buildcmake ..make
More complete info can be extracted from GitHub actionscript.
A simple app demonstrating the use of PIO and DMA forefficient data transfers to a 480x320 TFT display.The graphics library creates a monochromatic imagein memory which is expanded to 16-bit color codesin PIO block and transferred via 8-bit parallelinterface.
A simple app controlled by one button, controllinga WS2812 strip/matrix. Can be used to test strips/matrices.
Button press/sequence | Action |
---|---|
Hold | Adjust brightness |
Tap and hold | Adjust color |
One tap | Toggle 3-minute timer |
Two taps | Toggle between 'Off' and 'Max Red' |
Three taps | Cycle through presets |
Reading audio from a INMP441 MEMS microphone using PIO+DMA,computing fixed point FFT (CMSIS-DSP) and displaying an ASCIIspectrogram on serial.
rpi_inmp441_fft_demo.mp4
rpi_inmp441_fft_demo_2.mp4
TFLMMicro Speechmodel is ported to Raspberry Pi Pico (RP2040, Cortex-M0+). Sound is from a MEMSI2S microphone (INMP441). The CPU is clocked at 250MHz. Data fromthe microphone is transferred using PIO+DMA. With this configuration real-timespeech analysis is possible (stride is 20ms at 16kHz sample rate and single inference takes ~19ms).
rpi_tflm_micro_speech_demo.mp4
TinyML keyword spotting demo. The model isShallow RNNarchitecture with aFastGRNN cell convertedto ~200 lines of C code.At 280MHz Core0 is setting up DMA transfers from I2S microphoneand doing feature extraction (dc blocking
->preemphasis
->FFT
->power
->log
->Mel filterbank
)in frames, nine frames a second.
The core utilization is ~70%.Core1 every 105ms does NN inference which takes about 85ms (77% core utilization).
The microphone (INMP441) connections are as follows:
tinygl_1b test app (ditheredglxgears
)
glxgears_1b.mov
tinygl_1b test app - model exported from Blender.
Real time /pitch shifter/voice changer/ application. Pitch shifting code generated inFaust.As a bonus there are also vibrato and echo effects. Short button presses cycle through the pitch levels.Long button press between 500ms-2000ms activates and deactivates echo.Button press longer than 2000ms activates the vibrato.
Example recording:
pitch_shifter_test.mov
INMP441 microphone connections are like in therpi_inmp441_kws
application:
Audio output via GPIO PWM pin with a low-pass filter:
LM386 or PAM8403 can be used to amplify further, to connect a speaker.A tact switch needs to be connected betweenGP13
andGND
.
About
Raspberry Pi Pico (RP2040) playground
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.