https://github.com/virgesmith/pico-neospec
Neopixel spectrum analyser
https://github.com/virgesmith/pico-neospec
Last synced: about 1 year ago
JSON representation
Neopixel spectrum analyser
- Host: GitHub
- URL: https://github.com/virgesmith/pico-neospec
- Owner: virgesmith
- Created: 2025-01-19T15:34:24.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-01T19:26:13.000Z (over 1 year ago)
- Last Synced: 2025-02-13T06:42:50.788Z (over 1 year ago)
- Language: C
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pico-neospec
Microphone -> Pico ADC -> FFT -> Power spectrum -> Neopixel
FFT based on code here: https://github.com/AlexFWulff/awulff-pico-playground
Nexopixel based on code here: https://github.com/raspberrypi/pico-examples/tree/master/pio/ws2812
## Prerequisites
Microphone: I used a DFRobot MEMS microphone, which has a bandwidth of 100-8kHz, connected to ADC 1 (pin 27).
Neopixel: I used a 96 RGB LED connected to pin 0.
(Modify `NPX_PIN` and `CAPTURE_CHANNEL` as necessary)
Main loop (sample, FFT, write to Neopixel) timings (960 samples @ 50kHz) are approx:
Board | Time (ms)
-------------|-----
RP2040 | 40
RP2350 ARM | 22
RP2350 RISCV | 31
NB Sampling 960 times at 50kHz takes 921600 cycles or 19.2 ms @ 48MHz.
## Build
```sh
mkdir -p build
cd build
cmake -DPICO_PLATFORM=rp2040 ..
make -j
```
Builds main binary plus individual test harnesses for ADCFFT and Neopixel
Copy the uf2 file to device, powered with reset button pressed.
## Inspect
```sh
minicom -b 115200 -D /dev/ttyACM0
```