LedBars/RpiLedBars/backend/README.md

88 lines
2.2 KiB
Markdown
Raw Normal View History

2021-09-06 12:06:38 +02:00
# RpiLedBars
LedBars version for raspberry pi
2021-09-06 12:06:38 +02:00
## Contains
* a python test program (main.py)
* a C program using :
* ws2812 with dma/smi from Jeremy P Bentham - https://iosoft.blog/category/neopixel/
* artnet from Stephan Ruloff - https://github.com/rstephan/ArtnetnodeWifi
2021-09-06 12:06:38 +02:00
## Install
2021-09-05 21:04:42 +02:00
2021-09-06 12:06:38 +02:00
### I2S Microphone
#### Install dependencies
~~~bash
2021-09-05 21:04:42 +02:00
sudo apt install python3-pip
sudo pip3 install --upgrade adafruit-python-shell
2021-09-06 12:06:38 +02:00
~~~
#### Build and install module
~~~bash
2021-09-05 21:04:42 +02:00
cd /tmp
sudo wget https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/i2smic.py
sudo python3 i2smic.py
2021-09-06 12:06:38 +02:00
~~~
After a kernel update this step as to be executed again (after reboot -> depends on `uname`)
2021-09-05 21:04:42 +02:00
2021-09-06 12:06:38 +02:00
#### Test microphone
Plug the microphone
~~~bash
2021-09-05 21:04:42 +02:00
sudo reboot
arecord -l
arecord -D plughw:1 -c1 -r 48000 -f S32_LE -t wav -V mono -v file.wav
2021-09-06 12:06:38 +02:00
~~~
2021-09-05 21:04:42 +02:00
2021-09-06 12:06:38 +02:00
#### Control record volume
~~~bash
2021-09-05 21:04:42 +02:00
cp res/.asoundrc ~/.asoundrc
2021-09-06 12:06:38 +02:00
~~~
* Intall i2s mems microphone - https://learn.adafruit.com/adafruit-i2s-mems-microphone-breakout/raspberry-pi-wiring-test
* Configuring alsa - https://makersportal.com/blog/recording-stereo-audio-on-a-raspberry-pi
* Alsa API - http://www.equalarea.com/paul/alsa-audio.html
2021-09-05 21:04:42 +02:00
2021-09-06 12:06:38 +02:00
### Project depenencies
2021-09-05 21:04:42 +02:00
2021-09-06 12:06:38 +02:00
~~~bash
2021-09-05 21:04:42 +02:00
sudo apt install libasound2-dev wiringpi
2021-09-06 12:06:38 +02:00
~~~
2021-09-05 21:04:42 +02:00
2021-09-06 12:06:38 +02:00
#### Cava
~~~bash
2021-09-05 21:04:42 +02:00
sudo apt install libfftw3-dev libasound2-dev libtool automake
2021-09-28 10:08:35 +02:00
cd cava_
2021-09-05 21:04:42 +02:00
./autogen.sh
./configure
make
sudo make install
2021-09-06 12:06:38 +02:00
~~~
### Access point
~~~bash
grep "Access point conf" $(find /etc -type f)
~~~
2021-09-28 10:08:35 +02:00
* https://learn.sparkfun.com/tutorials/setting-up-a-raspberry-pi-3-as-an-access-point/all
2021-09-06 12:06:38 +02:00
## Biblio:
### Art-Net
* Protocol Spec :
* https://art-net.org.uk/how-it-works/
* https://artisticlicence.com/WebSiteMaster/User%20Guides/art-net.pdf
* ESP32 library from Stephan Ruloff - https://github.com/rstephan/ArtnetnodeWifi
2021-09-05 21:04:42 +02:00
2021-09-06 12:06:38 +02:00
### ws28xx rgb leds
* ws2812 datasheet - https://cdn-shop.adafruit.com/datasheets/WS2812.pdf
* ws2815 datasheet - https://pdf1.alldatasheet.com/datasheet-pdf/view/1134588/WORLDSEMI/WS2815B.html
* ws2812 with dma/smi from Jeremy P Bentham :
* ws2812 - https://iosoft.blog/2020/09/29/raspberry-pi-multi-channel-ws2812/
* dma - https://iosoft.blog/2020/05/25/raspberry-pi-dma-programming/
* smi - https://iosoft.blog/2020/07/16/raspberry-pi-smi/