Hi,
For my Rpi I would like to try to write a simple phyton script to drive single RGB LED (indicating by color) playback sample rate.
I’m new in Volumio and have no coding experience.
Some info: instructables.com/id/Using- … n-RGB-LED/
What software components should I install on Volumio (maybe some plugins or packets) to enable import RPi.GPIO as GPIO.
Regards,
bern
sudo apt-get install python-pip python-dev
sudo pip install -U RPi.GPIO
Of course firstly I had to add for a moment few lines to /etc/apt/sources.list to standard rasbian repository.
When I had RPi.GPIO installed I used python script writen for BeagleBone Black (bbb): github.com/francolargo/BBB-audi … er/leds.py
and adopted to my RPI.
I used GPIO17, 27,22 just like in the drawing from the article I mentioned in my first post:
If you use Ir control (Lirc) with standard gpio_in and out pins eg. GPIO 17, 18 you have to change GPIO17 assignment since there will be GPIO pins conflict. I changed IR pins to: ‘lirc_rpi gpio_in_pin=23 gpio_out_pin=4’
The running script drives shining of three LED’ RGB colors.
It is configured to display:
white color when no playback
green =44,1kHz
blue when =48 kHz
light blue=88/176;
yellow/orange=96/192
You can define your favorite colors.
The script:
displayloop()[/code]
Of course you can run this script as a service and can run during RPI boot.
I’ve managed to put the RGB LED to the main on/off ring DAC button (my rpi board is inside aluminum DAC case). Works great. Running script consume about 0.5%CPU