Startup sound and LED

Build/modify/repair equipment and improve systems performance by yourself

Startup sound and LED

Postby alex.penkov » 29 Aug 2015, 03:15

I made some modifications to indicate the web-interface become available after power one. It is includes playing of a sound and using LEDs connected to GPIO.
First, we need script wich will perform the actions:
Code: Select all
nano /usr/bin/

The content could be the following:
Code: Select all
# LEDs firts.

for i in 97 108  #This is for Odroid C1+. Put desired GPIO pins here
echo $i > /sys/class/gpio/export
echo out > /sys/class/gpio$i/direction
echo 1 > /sys/class/gpio$i/value

#play a sound
mpg123 -a hw:1,0 /srv/http/startup.mp3

exit 0

Put your startup sound file to /srv/http folder. Make the command
Code: Select all
chmod +x /usr/bin/

Now, we should modify the Rune to launch this script after initial loading.
Code: Select all
nano /srv/http/command/rune_SY_wrk

Find the line
Code: Select all
runelog('--- NORMAL STARTUP');

Insert above that line the following:
Code: Select all
// Startup sound
sysCmd('/usr/bin/ > /dev/null 2>&1 &');

That's all. Then the system will be ready, it will swith LEDs ON and play the sound.
Posts: 4
Joined: 27 Aug 2015, 01:44

Re: Startup sound and LED

Postby sumondigi » 15 Jan 2016, 05:22

That is great attempt . I want to add up some led bar graph with RPI's GPIO, but no clue.Can u help me to sharing some method- codes or links?
Posts: 2
Joined: 14 Jan 2016, 18:37

support RuneAudio Donate with PayPal

Return to DIY and tweaks

Who is online

Users browsing this forum: No registered users and 0 guests