diff --git a/documentation/images/audiosphere-template-structure.png b/documentation/images/audiosphere-template-structure.png new file mode 100644 index 0000000..008a202 Binary files /dev/null and b/documentation/images/audiosphere-template-structure.png differ diff --git a/documentation/index.html b/documentation/index.html index 9fd6587..a01b46b 100644 --- a/documentation/index.html +++ b/documentation/index.html @@ -94,7 +94,7 @@ h2, h3 {
-

2017-01-28

+

2017-01-29

AudioSphere

An easy-to-use music player for children based on the Raspberry Pi Zero and the JBL On Stage IIIp

@@ -128,7 +128,7 @@ h2, h3 {

PiPlayer 2.0: AudioSphere

@@ -212,6 +212,8 @@ h2, h3 {

System Installation on the Raspberry Pi Zero

+ +

Update and Basic Setup

Before installing anything additionally, Raspbian Lite has to be set up on the SD card. 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.

@@ -236,7 +238,14 @@ lsusb # If not done yet, plug in the Wi-Fi adapter and reboot sudo reboot + + +

Configure Wi-Fi

+

+ +

+
 # Scan networks and add Wi-Fi network to configuration (https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md)
 # (Close nano after editing with Ctrl-X)
 sudo iwlist wlan0 scan
@@ -256,6 +265,8 @@ ifconfig wlan0
 # Turn off
 sudo shutdown -h now
 
+ +

Remotely Finish the Setup

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, connect via SSH from a different computer and go on with the setup procedure. @@ -341,8 +352,8 @@ sudo shutdown -h now

@@ -350,6 +361,8 @@ sudo shutdown -h now

Software

+ +

Install and Configure Additional Packages and the Python Script

Now configure the additional software that is needed for the player. Before doing that, copy the contents of the piplayer2 directory (including subdirectories sounds and test) to /home/pi (either directly on the SD card or via SCP). Have also one of the test cards from the template ready for testing the QR recognition.

@@ -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...

- + +

Configure Autostart and Mount SD Card in Read-Only Mode

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.

@@ -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

- 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:

@@ -515,9 +533,10 @@ sudo mount -o rw,remount /
 sudo mount -o rw,remount /boot
 
- + +

Connect to SMB network share

- 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:

@@ -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
 
-

User Manual

-

Configuring Wi-Fi

-

Connect a network drive

- TODO Dropbox? - Google Drive? -

QR Cards

+

QR Cards

+

+ 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 template 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. +

- +

+ 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 tail -f /tmp/piplayer2.log.) Personally, I use QtQR which is a frontend for qrencode. +

+ + + +

What's Left

+

+