documentation
This commit is contained in:
+46
-19
@@ -94,7 +94,7 @@ h2, h3 {
|
||||
<body>
|
||||
|
||||
<div id="content" class="container">
|
||||
<p class="timestamp">2017-01-28</p>
|
||||
<p class="timestamp">2017-01-29</p>
|
||||
<h1>AudioSphere</h1>
|
||||
<p id="subtitle">An easy-to-use music player for children based on the Raspberry Pi Zero and the JBL On Stage IIIp</p>
|
||||
|
||||
@@ -128,7 +128,7 @@ h2, h3 {
|
||||
|
||||
<p class="gallery" style="float:left; margin-right: 4ex; margin-top: 8ex;">
|
||||
<a href="images/audiosphere-qr-cards.jpg" class="fancybox"><img src="images/audiosphere-qr-cards.jpg"
|
||||
width="480" alt="The QR cards for the AudioSphere player. They are placed on top of the case with the cover picture facing up. On the backside is a QR code that tells the player where to find the MP3 files." /></a>
|
||||
width="360" alt="The QR cards for the AudioSphere player. They are placed on top of the case with the cover picture facing up. On the backside is a QR code that tells the player where to find the MP3 files." /></a>
|
||||
</p>
|
||||
|
||||
<h2 id="piplayer2">PiPlayer 2.0: AudioSphere</h2>
|
||||
@@ -212,6 +212,8 @@ h2, h3 {
|
||||
</p>
|
||||
|
||||
<h2 id="system">System Installation on the Raspberry Pi Zero</h2>
|
||||
|
||||
<h3>Update and Basic Setup</h3>
|
||||
<p>
|
||||
Before installing anything additionally, <a href="https://www.raspberrypi.org/downloads/raspbian/">Raspbian Lite</a> has to be <a href="https://www.raspberrypi.org/documentation/installation/installing-images/README.md">set up on the SD card</a>. When the card is ready, it is necessary to at least once connect a monitor and a keyboard to the RasPi for the initial setup since SSH is disabled by default. As soon as SSH is enabled and Wi-Fi is configured, we can remove all the cables and continue to work remotely over SSH.
|
||||
</p>
|
||||
@@ -236,7 +238,14 @@ lsusb
|
||||
|
||||
# If not done yet, plug in the Wi-Fi adapter and reboot
|
||||
sudo reboot
|
||||
</pre>
|
||||
|
||||
<h3>Configure Wi-Fi</h3>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
|
||||
<pre class="pre-scrollable">
|
||||
# Scan networks and add Wi-Fi network to configuration (<a href="https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md">https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md</a>)
|
||||
# (Close nano after editing with Ctrl-X)
|
||||
sudo iwlist wlan0 scan
|
||||
@@ -256,6 +265,8 @@ ifconfig wlan0
|
||||
# Turn off
|
||||
sudo shutdown -h now
|
||||
</pre>
|
||||
|
||||
<h3>Remotely Finish the Setup</h3>
|
||||
|
||||
<p>
|
||||
From here on you can connect via SSH over Wi-Fi. Unplug monitor, keyboard and the ethernet cable. It might also be helpful to configure a static IP for the Wi-Fi adapter in your router before continuing. Then restart the RasPi, <a href="https://www.raspberrypi.org/documentation/remote-access/ssh/">connect via SSH</a> from a different computer and go on with the setup procedure.
|
||||
@@ -341,8 +352,8 @@ sudo shutdown -h now
|
||||
</p>
|
||||
|
||||
<p class="gallery">
|
||||
<a href="images/circuit_board.jpg" class="fancybox" rel="collection04"><img src="images/circuit_board.jpg" width="320" alt="I did not solder the jumper wires to the RasPi but also fixed them with hot glue. This keeps them together as a unit, isolates them from one another, and the hot glue can be peeled off if something goes wrong." /></a>
|
||||
<a href="images/piplayer-opened.jpg" class="fancybox" rel="collection04"><img src="images/piplayer-opened.jpg" width="320" alt="Interior view of the AudioSphere player with all components assebled. The circuit board is glued to the front side (not visible from this angle)." /></a>
|
||||
<a href="images/circuit_board.jpg" class="fancybox" rel="collection03"><img src="images/circuit_board.jpg" width="320" alt="I did not solder the jumper wires to the RasPi but also fixed them with hot glue. This keeps them together as a unit, isolates them from one another, and the hot glue can be peeled off if something goes wrong." /></a>
|
||||
<a href="images/piplayer-opened.jpg" class="fancybox" rel="collection03"><img src="images/piplayer-opened.jpg" width="320" alt="Interior view of the AudioSphere player with all components assebled. The circuit board is glued to the front side (not visible from this angle)." /></a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -350,6 +361,8 @@ sudo shutdown -h now
|
||||
</p>
|
||||
|
||||
<h2 id="software">Software</h2>
|
||||
|
||||
<h3>Install and Configure Additional Packages and the Python Script</h3>
|
||||
<p>
|
||||
Now configure the additional software that is needed for the player. Before doing that, copy the contents of the <a href="https://github.com/tliero/audiosphere/tree/master/piplayer2">piplayer2 directory</a> (including subdirectories <code>sounds</code> and <code>test</code>) to <code>/home/pi</code> (either directly on the SD card or via SCP). Have also one of the <a href="https://github.com/tliero/audiosphere/raw/master/documentation/QR%20Card%20Template.odt">test cards from the template</a> ready for testing the QR recognition.
|
||||
</p>
|
||||
@@ -362,7 +375,8 @@ sudo apt install lirc zbar-tools mc moc fswebcam python3 python-rpi.gpio python3
|
||||
python3 ~/test/lighton.py
|
||||
python3 ~/test/lightoff.py
|
||||
|
||||
# We can also test the buttons and the sensor (Press buttons to retrieve their ID, hold a card on the sensor to see if it switches from 'LOW' to 'HIGH')
|
||||
# We can also test the buttons and the sensor (Press buttons to retrieve their ID, hold a card
|
||||
# on the sensor to see if it switches from 'LOW' to 'HIGH')
|
||||
# (Stop the scripts with Ctrl-C)
|
||||
python3 ~/test/buttons.py
|
||||
python3 ~/test/sensor.py
|
||||
@@ -398,6 +412,9 @@ python3 ~/test/lighton.py
|
||||
zbarcam --quiet --nodisplay --raw -Sdisable -Sqrcode.enable --prescale=320x240 /dev/video0
|
||||
python3 ~/test/lightoff.py
|
||||
|
||||
|
||||
## From here on it's about the configuration of the infrared sender - currently this is not used
|
||||
|
||||
# Enable lirc in /boot/config.txt and add parameters
|
||||
sudo nano /boot/config.txt
|
||||
# # Uncomment this to enable the lirc-rpi module
|
||||
@@ -439,7 +456,8 @@ irsend SEND_ONCE JBLIIIP KEY_MUTE && irsend SEND_ONCE JBLIIIP KEY_MUTE
|
||||
While I really like hot glue, it's got its limits: I thought I could skip soldering the buttons to their wires by just twirling the cable ends to the contacts and then fix everything down with the hot pistol - bad idea. While being hot, the glue gets in between the wire ends and the contacts and perfectly isolates them. None of the buttons worked anymore. I had to peel the glue off the contacts with a cutter knife before soldering them properly back on again...
|
||||
</em>
|
||||
</p>
|
||||
|
||||
|
||||
<h3>Configure Autostart and Mount SD Card in Read-Only Mode</h3>
|
||||
<p>
|
||||
Now that everything is in place, we are ready for the final adjustments: Configure autostart for the player script and mount the SD card in read-only mode which makes the player robust against sudden loss of power. For that, we redirect the write access to a RAM disk.
|
||||
</p>
|
||||
@@ -478,8 +496,8 @@ sudo ln -s /tmp /var/spool
|
||||
sudo ln -s /tmp /var/lock
|
||||
sudo ln -s /tmp/resolv.conf /etc/resolv.conf
|
||||
|
||||
# make /tmp on RAM disk writable
|
||||
# shown here with the former additions to rc.local - note that the log redirect for the player script is changed also
|
||||
# Make /tmp on RAM disk writable
|
||||
# Shown here with the former additions to rc.local - please note that the log redirect for the player script changed
|
||||
sudo nano /etc/rc.local
|
||||
# ...
|
||||
#
|
||||
@@ -507,7 +525,7 @@ touch ~/wontwork
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
We can make the filesystem writeable again (until reboot) for maintenance by remounting it like this:
|
||||
We can make the filesystem writeable again until next reboot for maintenance by remounting it like this:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
@@ -515,9 +533,10 @@ sudo mount -o rw,remount /
|
||||
sudo mount -o rw,remount /boot
|
||||
</pre>
|
||||
|
||||
|
||||
|
||||
<h3>Connect to SMB network share</h3>
|
||||
<p>
|
||||
Until now, we can only play local files from the SD card (and audiostreams from the Internet). The final step is to connect the local share that stores all of our MP3 files. How this is done depends upon the type of share you would like to use. The most common type should be a SMB share that can be connected like this:
|
||||
Until now, we can only play local files from the SD card (and audiostreams from the Internet). The final step is to connect the local share that stores all of our MP3 files. How this is done depends upon the type of share you would like to use. The most common type should be a Windows/SMB share in the local network that can be connected like this:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
@@ -530,17 +549,25 @@ mkdir /home/pi/share
|
||||
|
||||
# Connect smb share on /home/pi/share
|
||||
sudo nano /etc/rc.local
|
||||
# sudo mount -t cifs -o user=guest,password= //192.168.1.125/media /home/pi/share
|
||||
# sudo mount -t cifs -o user=guest,password= //192.168.1.110/media /home/pi/share
|
||||
</pre>
|
||||
|
||||
<h2 id="manual">User Manual</h2>
|
||||
<h3 id="wi-fi">Configuring Wi-Fi</h3>
|
||||
<h3 id="wi-fi">Connect a network drive</h3>
|
||||
TODO Dropbox?
|
||||
<a href="http://www.techrepublic.com/article/how-to-mount-your-google-drive-on-linux-with-google-drive-ocamlfuse/">Google Drive</a>?
|
||||
<h3 id="qr-cards">QR Cards</h3>
|
||||
<h2>QR Cards</h2>
|
||||
<p>
|
||||
With the storage attached, all the MP3 files are accessible for the player. What's missing is some QR code cards to get the party started. For that, there's a <a href="https://github.com/tliero/audiosphere/raw/master/documentation/QR%20Card%20Template.odt">template</a> which can be used to create new cards. After printing a page from the template, it is simply cut into stripes which are folded in the middle and then glued together.
|
||||
</p>
|
||||
|
||||
<!-- TODO: http://superuser.com/questions/378786/is-it-possible-to-view-images-in-a-terminal -->
|
||||
<p>
|
||||
For generating the QR codes pretty much every software can be used. If you are using lots of non-ASCII letters, you should make sure that they are encoded properly. (You can always check the codes that have been read by the player in the logfile with <code>tail -f /tmp/piplayer2.log</code>.) Personally, I use QtQR which is a frontend for <code>qrencode</code>.
|
||||
</p>
|
||||
|
||||
<p class="gallery">
|
||||
<a href="images/audiosphere-template-structure.png" class="fancybox"><img src="images/audiosphere-template-structure.png" width="480" alt="The different areas of the QR code template." /></a>
|
||||
</p>
|
||||
|
||||
<h2>What's Left</h2>
|
||||
<p>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user