Step 7: Software part - Installation of control scripts.

Please download file scripts.zip from project's intro page.

Upload file to the raspberry and unpack by command:

unzip scripts.zip

Put project included scripts in the directories and change privileges as shown:

chmod 777 /etc/init.d/player_control.sh
chmod 777 /usr/bin/gpout.sh
chmod 777 /usr/bin/gpin.sh

Add the following lines in /etc/rc.local for auto-start of the button-control script on boot:

# player control
/etc/init.d/player_control.sh > /dev/null &

Scripts gpin.sh and gpout.sh are used to set up pins and return values depending on button press (button pressed = 0 button released = 1).

Script player_control.sh is used to play/stop player and change songs.

Modules must be put by default in (can be changed in player_control.sh as wished) this path:


During start of player_control.sh, the playlist is created to select particular songs.
<p>Made it work with omxplayer for all music files (the software that is):</p><p><a href="https://github.com/iugamarian/bshplyr/tree/master" rel="nofollow">https://github.com/iugamarian/bshplyr/tree/master</a></p><p>Thank you.</p>
<p>It's nice to see that my project has been inspirative.</p><p>Can OMXplayer play MOD,S3M,IT,XM too? I cannot find this infromation.</p><p>It's good that it runs as service, too.</p><p>Do you plan to publish the final onstruction when it's done?</p>
<p>I don't have .mod files, test yourself with bshplyr-no-gpio my new smaller script (it seems I don't need gpio fo myself, just happy with automated play)</p><p>To play .mod you can also install timidity++ and change playerbin to /usr/bin/timidity++</p><p>If I have more time or someone else does we can make conditionals to change playerbin according to filetype (github allows changes, remembering history).</p><p>My final construction is just a Raspberry Pi in a cardboard case, adapted for battery pack according to </p><p><a href="http://www.daveakerman.com/?page_id=1294" rel="nofollow">http://www.daveakerman.com/?page_id=1294</a></p><p>with headphones and no buttons as GPIO's don't work for me for some unknown reason (they are always &quot;0&quot; ).</p>
Good Job! :) <br>Went to my Blog post: <br>http://faz-voce-mesmo.blogspot.pt/2013/01/prusa-i3-mais-rhinonest-cera-de.html
In case you didn't save your junky old electronics from the 80's you can still find an old cassette player on Amazon for dirt cheap... <br><a href="http://amzn.to/TxyvKx" rel="nofollow">Cassette Player on Amazon</a>
Could you add some information in the initial step explaining what MOD is and why a portable player is desireable?
Thank you for sharing your point of view. <br>I was driven by the logic that MOD enthusiast wouldn't need an explanation and people not knowing what MOD is wouldn't need MOD player. <br>I'll add a brief description with links to further resources. <br>Thanks again.

About This Instructable


62 favorites


More by Mr.Holub: Portable native MOD player based on Raspberry PI (plays MOD,S3M,IT,XM etc...). Uses BassPlay library.
Add instructable to: