Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Raspberry Pi Pico (RP2040) playground

License

NotificationsYou must be signed in to change notification settings

mryndzionek/rp2040_pico_sdk_playground

Repository files navigation

build

Building

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.

Applications

rpi_lcd_test

rpi_lcd_test

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.

rpi_ws2812_lamp

A simple app controlled by one button, controllinga WS2812 strip/matrix. Can be used to test strips/matrices.

Button press/sequenceAction
HoldAdjust brightness
Tap and holdAdjust color
One tapToggle 3-minute timer
Two tapsToggle between 'Off' and 'Max Red'
Three tapsCycle through presets

rpi_inmp441_fft_demo

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

rpi_tflm_micro_speech_demo

/Keyword Spotting/Visual Wake Words/ on RP2040

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

rpi_inmp441_kws

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.

sharnn

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:

pico_kws

rpi_lcd_3d_test

tinygl_1b test app (ditheredglxgears)

glxgears_1b.mov

gears

rpi_lcd_3d_skull_test

tinygl_1b test app - model exported from Blender.

skull

pitchshifter

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:

pico_kws

Audio output via GPIO PWM pin with a low-pass filter:

pwm_audio

LM386 or PAM8403 can be used to amplify further, to connect a speaker.A tact switch needs to be connected betweenGP13 andGND.


[8]ページ先頭

©2009-2025 Movatter.jp