Documentation - how to install Python 3.6

This commit is contained in:
2019-02-12 22:00:58 +01:00
parent 227d4fbf99
commit 469cb410bb
12 changed files with 92 additions and 64 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 1011 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 950 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 925 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 734 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 974 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1017 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 912 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

+92 -64
View File
@@ -84,19 +84,19 @@ h2, h3, h4 {
<script src="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.6/dist/jquery.fancybox.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.6/dist/jquery.fancybox.min.js"></script>
<div id="content" class="container"> <div id="content" class="container">
<p class="timestamp">2019-01-26</p> <p class="timestamp">2019-02-12</p>
<h1>Qudio Player</h1> <h1>Qudio Player</h1>
<p id="subtitle">An easy-to-use music player for children based on the Raspberry Pi Zero and the JBL On Stage IIIp (again)</p> <p id="subtitle">An easy-to-use music player for children based on the Raspberry Pi Zero and the JBL On Stage IIIp (again)</p>
<p class="well" style="text-align: center;">In spring 2016 I finalized the <a href="http://tilman.de/projekte/musikrakete/">&quot;Musikrakete&quot;</a>, a music player that our boys could operate without assistance. Later on, there was a <a href="http://www.tilman.de/projekte/audiosphere/">second version</a>. This is the third version, with all of the improvements I came up with during the last three years. It is easier and cheaper to build, the case is way smaller and much more robust. By switching to volumio the player now supports remote control from the phone and streaming services like Spotify. This is all combined with the existing features like playing MP3s from the local network and, most importantly, being easy to use even for small children. So if your children love music and audio books just like mine, this might be a project for you.</p> <p class="well" style="text-align: center;">In spring 2016 I finalized the <a href="http://tilman.de/projekte/musikrakete/">&quot;Musikrakete&quot;</a>, a music player that our boys could operate without assistance. This is the third version, with all of the improvements I came up with during the last three years. It is easier and cheaper to build, the case is way smaller and much more robust. By switching to volumio the player now supports remote control from the phone and streaming services like Spotify. All of this combined with the existing features like playing MP3s from the local network and, most importantly, being easy to use even for small children. So if your children love music and audio books just like mine, this might be a project for you.</p>
<h2 id="history">The Idea</h2> <h2 id="history">The Idea</h2>
<a data-fancybox style="float:right;margin: 2em;" href="images/qudio-01-space.jpg" data-caption="The Qudio player (with the additional rocket). The QR cards are placed on the window on top of the case, where they are detected by a photo sensor that triggers the recognition process. After the code has been read by the webcam, the stream or MP3s it point to start playing."><img src="images/qudio-01-space-02.jpg" <a data-fancybox style="float:right;margin: 2em;" href="images/qudio-01-space.jpg" data-caption="The Qudio player (with the additional rocket). The QR cards are placed on the window on top of the case, where they are detected by a photo sensor that triggers the recognition process. After the code has been read by the webcam, the music starts playing."><img src="images/qudio-01-space-02.jpg"
width="320" alt="The Qudio player (with the additional rocket). The QR cards are placed on the window on top of the case, where they are detected by a photo sensor that triggers the recognition process. After the code has been read by the webcam, the stream or MP3s it point to start playing." /></a> width="320" alt="The Qudio player (with the additional rocket). The QR cards are placed on the window on top of the case, where they are detected by a photo sensor that triggers the recognition process. After the code has been read by the webcam, the music starts playing." /></a>
<p> <p>
This project started in 2016, when Anica asked me if buying a <a href="https://de-de.hoerbert.com/">hörbert</a> MP3 player would be a good idea. At the time our boys wasted two to three CDs every week, trying to get some music out of the small player in their room. And the player in the living room also seemed to reach its end of life pretty soon due to their enthusiasm. Still I wasn't too sure about this hörbert thing. In order to get new files on the SD card of the player, the case had to be opened, the navigation with 11 buttons seemed a little confusing and a single speaker operated with four batteries also did not seem promising to me. This project started in 2016, when Anica asked me if buying a <a href="https://de-de.hoerbert.com/">hörbert</a> MP3 player would be a good idea. At the time our boys wasted two to three CDs every week, trying to get some music out of the small player in their room. And the player in the living room also seemed to reach its end of life pretty soon due to their enthusiasm. Still, I wasn't too sure about this hörbert thing. In order to get new files on the SD card of the player, the case had to be opened, the navigation with 11 buttons seemed a little confusing and a single speaker operated with four batteries also did not seem promising to me.
</p> </p>
<p> <p>
@@ -104,11 +104,11 @@ h2, h3, h4 {
</p> </p>
<p> <p>
As good as the project description seemed to be, I wanted to make some improvements on the original design: The player should detect the QR automatically, it should have buttons for play/pause and skipping and all components should be put together in a single case. Most importantly, the MP3 files should be delivered directly from our home server. No SD card replacement needed. As good as the project description seemed to be, I wanted to make some improvements on the original design: The player should detect the QR card automatically, it should have buttons for play/pause and skipping and all components should be put together in a single case. Most importantly, the MP3 files should be delivered directly from our home server. No SD card replacement needed.
</p> </p>
<p> <p>
Since we had an old <a href="https://www.manualslib.com/manual/684236/Jbl-On-Stage-Iiip.html">JBL <em>On Stage IIIp</em></a> speaker lying around that wasn't used anymore due to its outdated iPhone dock connector, I decided to use this as a base. After playing around with <a href="https://www.onshape.com/">Onshape</a>, soldering and programming for three months, I had the <a href="http://tilman.de/projekte/musikrakete/">Musikrakete</a> ready by end of March 2016. It was a huge success with the boys and has been in heavy use ever since. Since we had an old <a href="https://www.manualslib.com/manual/684236/Jbl-On-Stage-Iiip.html">JBL <em>On Stage IIIP</em></a> speaker lying around that wasn't used anymore due to its outdated iPhone dock connector, I decided to use this as a base. After playing around with <a href="https://www.onshape.com/">Onshape</a>, soldering and programming for three months, I had the <a href="http://tilman.de/projekte/musikrakete/">Musikrakete</a> ready by end of March 2016. It was a huge success with the boys and has been in heavy use ever since.
</p> </p>
<p> <p>
@@ -124,7 +124,7 @@ h2, h3, h4 {
<h2 id="piplayer3">PiPlayer 3.0: Qudio</h2> <h2 id="piplayer3">PiPlayer 3.0: Qudio</h2>
<p> <p>
This third version now relies on <a href="https://volumio.org/">volumio</a> which can play music from streaming services like Spotify Premium or LastFM, has a nice web interface and makes configuration easy. The case is much smaller than before, which makes it sturdier and easier to print. The electronic parts are all easily obtainable standard compontents and even cheaper than before. Again, it is built on top of the JBL On Stage IIIp speaker, that can still be found on ebay for little money and provides a perfect base for a player like this. This third version now relies on <a href="https://volumio.org/">volumio</a> which can play music from streaming services like Spotify Premium or LastFM, has a nice web interface and makes configuration easy. The case is much smaller than before, which makes it sturdier and easier to print. The electronic parts are all easily obtainable standard compontents and even cheaper than before. Again, it is built on top of the JBL On Stage IIIP speaker, that can still be found on ebay for little money and provides a perfect base for a player like this.
</p> </p>
<p> <p>
@@ -140,11 +140,11 @@ h2, h3, h4 {
<li>JBL On Stage IIIP - can be found on ebay for little money<br/><span style="color:red;">Caution:</span> The older On Stage III with the mini USB port will probably <em>not work!</em> I tried several and they either did not power the Raspberry Pi properly or I had noise issues that I could not resolve.</li> <li>JBL On Stage IIIP - can be found on ebay for little money<br/><span style="color:red;">Caution:</span> The older On Stage III with the mini USB port will probably <em>not work!</em> I tried several and they either did not power the Raspberry Pi properly or I had noise issues that I could not resolve.</li>
<li>The <a href="https://github.com/tliero/qudio/tree/master/case">case, which consists of four parts</a>. I printed mine in standard PLA.</li> <li>The <a href="https://github.com/tliero/qudio/tree/master/case">case, which consists of four parts</a>. I printed mine in standard PLA.</li>
<li>Raspberry Pi Zero W with a micro SD card a pin header</li> <li>Raspberry Pi Zero W with a micro SD card a pin header</li>
<li><a href="images/IMG_20190122_091336.jpg" data-fancybox="part" data-caption="CJMCU-5102 with 10 k&#8486; resistor">CJMCU-5102 plus a 10 k&#8486; resistor</a>, some PCM5102A based module or any other I2S DAC that is supported by volumio. Search for 'pHAT DAC'. A USB sound card will not work, since the USB port is used by the webcam. (And the sound of the DAC modules is usually better.)</li> <li><a href="images/IMG_20190122_091336.jpg" data-fancybox="part" data-caption="CJMCU-5102 with 10 k&#8486; resistor">CJMCU-5102 plus a 10 k&#8486; resistor</a>, some PCM5102A based module or any other I2S DAC that is supported by volumio. Search for 'pHAT DAC'. A USB sound card will not work, since the USB port is used by the webcam.</li>
<li><a href="images/IMG_20190122_091612.jpg" data-fancybox="part" data-caption="TCRT5000 sensor module">TCRT5000 reflective sensor module</a></li> <li><a href="images/IMG_20190122_091612.jpg" data-fancybox="part" data-caption="TCRT5000 sensor module">TCRT5000 reflective sensor module</a></li>
<li>The ultra-cheap <a href="images/IMG_20190122_082801.jpg" data-fancybox="part" data-caption="USB webcam">USB webcam</a> that can be found on ebay, aliexpress and the like (just sort for price). Some versions come with a small cable reel. This fits perfectly in the holder at the bottom of the case.</li> <li>The ultra-cheap <a href="images/IMG_20190122_082801.jpg" data-fancybox="part" data-caption="USB webcam">USB webcam</a> that can be found on ebay, aliexpress and the like (just sort for price). Some versions come with a small cable reel. This fits perfectly in the holder at the bottom of the case.</li>
<li><a href="images/IMG_20190122_091508.jpg" data-fancybox="part" data-caption="Micro USB adapter that goes directly into the plug">USB A to micro USB adapter</a> that connects the webcam to the Raspberry Pi's micro USB port</li> <li><a href="images/IMG_20190122_091508.jpg" data-fancybox="part" data-caption="Micro USB adapter that goes directly into the plug">USB A to micro USB adapter</a> that connects the webcam to the Raspberry Pi's micro USB port</li>
<li><a href="images/IMG_20190123_110730.jpg" data-fancybox="part" data-caption="30-pin Apple dock adapter to micro USB and 3.5 mm audio">30-pin Apple dock adapter to micro USB and 3.5 mm audio. Search for '30-pin micro-usb adapter audio'.</a></li> <li><a href="images/IMG_20190123_110730.jpg" data-fancybox="part" data-caption="30-pin Apple dock adapter to micro USB and 3.5 mm audio">30-pin Apple dock adapter to micro USB and 3.5 mm audio</a></li>
<li><a href="images/IMG_20190122_093929.jpg" data-fancybox="part" data-caption="3 mm white LED (with optional 220 &#8486; resistor)">White LED (preferably diffused) for illumination of the QR cards with a proper resistor</a></li> <li><a href="images/IMG_20190122_093929.jpg" data-fancybox="part" data-caption="3 mm white LED (with optional 220 &#8486; resistor)">White LED (preferably diffused) for illumination of the QR cards with a proper resistor</a></li>
<li>3 <a href="images/IMG_20190122_082511.jpg" data-fancybox="part" data-caption="Push buttons with 12 mm caps">push buttons with 12 mm caps</a></li> <li>3 <a href="images/IMG_20190122_082511.jpg" data-fancybox="part" data-caption="Push buttons with 12 mm caps">push buttons with 12 mm caps</a></li>
<li>Jumper cables: 6x 10 cm M-F or F-F for the buttons, 5x 10 cm F-F for the audio module, 5x 20 cm F-F for the sensor and the LED</li> <li>Jumper cables: 6x 10 cm M-F or F-F for the buttons, 5x 10 cm F-F for the audio module, 5x 20 cm F-F for the sensor and the LED</li>
@@ -152,33 +152,9 @@ h2, h3, h4 {
<li><a href="images/IMG_20190122_093439.jpg" data-fancybox="part" data-caption="M3 screws and nuts">2 M3&times;16 screws, 6 M3&times;8 screws and 3 nuts</a></li> <li><a href="images/IMG_20190122_093439.jpg" data-fancybox="part" data-caption="M3 screws and nuts">2 M3&times;16 screws, 6 M3&times;8 screws and 3 nuts</a></li>
<li>5 M3 <a href="images/IMG_20190122_091418.jpg" data-fancybox="part" data-caption="Threaded inserts">threaded heat-set inserts</a></li> <li>5 M3 <a href="images/IMG_20190122_091418.jpg" data-fancybox="part" data-caption="Threaded inserts">threaded heat-set inserts</a></li>
<li>Soldering iron, drill, screwdriver, glue gun, box cutter</li> <li>Soldering iron, drill, screwdriver, glue gun, box cutter</li>
<li>And, finally, the <a href="https://github.com/tliero/qudio/tree/master/code">code</a></li>
</ul> </ul>
<!--p class="gallery">
<a href="images/IMG_20190122_091336.jpg" data-fancybox="parts" data-caption="CJMCU-5102 with 10 k&#8486; resistor"><img src="images/IMG_20190122_091336.jpg"
width="180" alt="" /></a>
<a href="images/IMG_20190122_091612.jpg" data-fancybox="parts" data-caption="TCRT5000 sensor module"><img src="images/IMG_20190122_091612.jpg"
width="180" alt="" /></a>
<a href="images/IMG_20190122_082801.jpg" data-fancybox="parts" data-caption="USB webcam"><img src="images/IMG_20190122_082801.jpg"
width="180" alt="" /></a>
<a href="images/IMG_20190122_091508.jpg" data-fancybox="parts" data-caption="Micro USB adapter that goes directly into the plug"><img src="images/IMG_20190122_091508.jpg"
width="180" alt="" /></a>
</p>
<p class="gallery">
<a href="images/IMG_20190122_092518.jpg" data-fancybox="parts" data-caption="30-pin Apple dock adapter to micro USB and 3.5 mm audio"><img src="images/IMG_20190122_092518.jpg"
width="180" alt="" /></a>
<a href="images/IMG_20190122_093929.jpg" data-fancybox="parts" data-caption="3 mm white LED (with optional 220 &#8486; resistor)"><img src="images/IMG_20190122_093929.jpg"
width="180" alt="" /></a>
<a href="images/IMG_20190122_082511.jpg" data-fancybox="parts" data-caption="Push buttons with 12 mm caps"><img src="images/IMG_20190122_082511.jpg"
width="180" alt="" /></a>
<a href="images/IMG_20190122_093439.jpg" data-fancybox="parts" data-caption="M3 screws and nuts"><img src="images/IMG_20190122_093439.jpg"
width="180" alt="" /></a>
<a href="images/IMG_20190122_091418.jpg" data-fancybox="parts" data-caption="Threaded inserts"><img src="images/IMG_20190122_091418.jpg"
width="180" alt="" /></a>
</p-->
<h2 id="components">Assembling the Components</h2> <h2 id="components">Assembling the Components</h2>
<h3 id="mount">Preparing Speaker and Printed Case</h3> <h3 id="mount">Preparing Speaker and Printed Case</h3>
@@ -190,11 +166,11 @@ h2, h3, h4 {
</p> </p>
<p> <p>
After removing the screws you can upen up the case. (<a href="images/IMG_20190123_154258.jpg" data-fancybox="mounting" data-caption="The holes are placed where the drill should not hit the circuit board.">It is possible to drill the holes without removing the circuit board from the case. However, it might be a good idea to play it safe and get it out.</a>) The circuit board is fastened with another four screws that have to be removed. Then the board can be pulled out of the case carefully. The power button of the speaker is the most sensitive part here. To make life easier, you can also pull off the speaker cables from the board. Now the cover is completely separated from the bottom and the circuit board. After removing the screws you can upen up the case. <!--(<a href="images/IMG_20190123_154258.jpg" data-fancybox="mounting" data-caption="The holes are placed where the drill should not hit the circuit board.">It is possible to drill the holes without removing the circuit board from the case. However, it might be a good idea to play it safe and get it out.</a>)--> The circuit board is fastened with another four screws that have to be removed. Then the board can be pulled out of the case carefully. The power button of the speaker is the most sensitive part here. To make life easier, you can also pull off the speaker cables from the board. Now the cover is completely separated from the bottom and the circuit board.
</p> </p>
<p> <p>
The next step is to drill the three mounting holes into the cover, for which you can use <a href="misc/JBL_screws_drilling_template.pdf">this template</a>. (Make sure to print without scaling.) Finally, we need to mount the base of the printed case to the speaker case using thee M3 screws with nuts. Afterwards, we can put the circuit board back in the case and put all the screws back in place. The next step is to drill the three mounting holes into the cover, for which you can use <a href="misc/JBL_screws_drilling_template.pdf">this template</a>. (Make sure to print without scaling.) Finally, we need to mount the base of the printed case to the speaker case using three M3 screws with nuts. Afterwards, we can put the circuit board back in the case and put all the screws back in place.
</p> </p>
<p class="gallery"> <p class="gallery">
@@ -220,7 +196,7 @@ h2, h3, h4 {
<h4 id="inserts">Putting the Threaded Inserts into the Printed Parts</h4> <h4 id="inserts">Putting the Threaded Inserts into the Printed Parts</h4>
<p> <p>
Now is also a good moment to put the threaded inserts into the printed parts. This is done by carefully pushing them into the plastic with a heated soldering iron. As soon as the plastic has cooled down, the inserts will stay in place and allow to close and open the connections without tearing the plastic apart. This <a href="https://www.3dhubs.com/knowledge-base/how-assemble-3d-printed-parts-threaded-fasteners#inserts">video on 3Dhubs shows how it is done</a>. Now is also a good moment to put the threaded inserts into the printed parts. This is done by carefully pushing them into the plastic with a heated soldering iron. As soon as the plastic has cooled down, the inserts will stay in place and allow to close and open the connections without tearing the plastic apart. <a href="https://www.3dhubs.com/knowledge-base/how-assemble-3d-printed-parts-threaded-fasteners#inserts">This video on 3Dhubs shows how it is done</a>.
</p> </p>
<p> <p>
@@ -235,7 +211,7 @@ h2, h3, h4 {
<h4 id="inserts">Installing the Window</h4> <h4 id="inserts">Installing the Window</h4>
<p> <p>
For the window on top of the case, we need to cut a 47 &times 27 mm part of acrylic glass. This can be done with a normal cutter knife by (carefully!) repeatedly cutting along your marker line with a ruler until you can break it off. You might need to file the edges a bit until it fits into the 48 &times; 28 mm slot inside the cover. For the window on top of the case, we need to cut a 50 &times 28 mm part of acrylic glass. This can be done with a normal cutter knife by (carefully!) repeatedly cutting along your marker line with a ruler until you can break it off.
</p> </p>
<p> <p>
@@ -254,9 +230,9 @@ h2, h3, h4 {
</p> </p>
<h3 id="wiring">Wiring</h3> <h3 id="wiring">Wiring</h3>
<p> <p style="font-size:small">
Apart from preparing the audio module there is not much soldering involved. All the components are plugged together with jumper wires and put into the case. <a href='misc/qudio.fzz'>Fritzing schema of the wiring</a>
</p> </p>
<p class="gallery"> <p class="gallery">
@@ -300,7 +276,7 @@ h2, h3, h4 {
</p> </p>
<p> <p>
Unfortunately, the cable also has to be moved from the back of the case to the bottom, in order to be able to place the camera at the bottom. You can just make a small cutout with a sharp knife to make space for the cable. However, if you want to play it safe it might be better to open the case up with a screwdriver before cutting it. Unfortunately, the cable also has to be moved from the back of the case, in order to be able to place the camera on top of the speaker. You can just make a small cutout with a sharp knife to make space for the cable. However, if you want to play it safe it might be better to open the case up with a screwdriver before cutting it.
</p> </p>
<p> <p>
@@ -308,8 +284,8 @@ h2, h3, h4 {
</p> </p>
<p class="gallery"> <p class="gallery">
<a href="images/IMG_20190122_221540.jpg" data-fancybox data-caption="We have to put a small hole into the camera case in order to move the cable from the back to the bottom. The clip is also being removed."><img src="images/IMG_20190122_221540.jpg" <a href="images/IMG_20190122_221540.jpg" data-fancybox data-caption="We have to put a small hole into the camera case in order to move the cable from the back to the top. The clip is also being removed."><img src="images/IMG_20190122_221540.jpg"
width="320" alt="We have to put a small hole into the camera case in order to move the cable from the back to the bottom. The clip is also being removed." /></a> width="320" alt="We have to put a small hole into the camera case in order to move the cable from the back to the top. The clip is also being removed." /></a>
</p> </p>
<p> <p>
@@ -354,11 +330,11 @@ h2, h3, h4 {
</ul> </ul>
<p> <p>
The pins of the module need to be bent up to fit in the case. (For some reason all the modules have 90 degree pins.) We can then use the M3 screw hole to fasten it to the top. The little potentiometer on board allows to adjust the sensitivity of the sensor in place. The pins of the module need to be bent up to fit in the case. (For some reason all the modules have 90 degree pins.) We can then use the M3 screw hole to fasten it to the top. The little potentiometer on board allows to adjust the sensitivity of the sensor in place, if needed.
</p> </p>
<p> <p>
My sensor permanently fired whenever if tightened the scew. Apparently the threaded insert connected two of the pins. I solved this by covering the pins on the back side with some hot glue. My sensor permanently fired whenever I tightened the screw. Apparently the threaded insert connected two of the pins. I solved this by covering the pins on the back side with some hot glue.
</p> </p>
<p> <p>
@@ -381,13 +357,13 @@ h2, h3, h4 {
<h4 id="led">LED</h4> <h4 id="led">LED</h4>
<p> <p>
The led is put in the small holder at the front side inside the cover. Connect the long leg to pin 15 (GPIO 22) of the Raspberry Pi (with a resistor in between, if needed), the short one to pin 9 (GND). I dimmed the LED with a 220 &#8486; resistor even though it could work on 3.3 V because it was just too bright. The led is put in the small holder at the front side inside the cover. Connect the long leg to pin 15 (GPIO 22) of the Raspberry Pi (with a resistor in between, if needed), the short one to pin 9 (GND). I dimmed the LED with a 220 &#8486; resistor even though mine could operate directly on 3.3 V because it was just too bright. The QR recognition does not need much light.
</p> </p>
<h4 id="cables">Closing the Case</h3> <h4 id="cables">Closing the Case</h3>
<p> <p>
Now it is time to put the remaining parts in place: Hook up the camera to the Raspberry Pi using the micro USB adapter. Also connect the two ends of the dock adapter cable to the audio module and the Raspberry Pi. Move all the cables in a place where they do not block the camera and close the case. Now it is time to put the remaining parts in place: Hook up the camera to the Raspberry Pi using the micro USB adapter. Also connect the two ends of the dock adapter cable to the audio module and the Raspberry Pi. Move all the cables in a place where they do not block the camera, bring up your best origami and close the case. You might need two or three attemps until everything is in the right place, but it fits in, believe me.
</p> </p>
<p class="gallery"> <p class="gallery">
@@ -398,47 +374,99 @@ h2, h3, h4 {
<a href="images/IMG_20181214_083322_cr.jpg" data-fancybox="close" data-caption="Our player, ready to go"><img src="images/IMG_20181214_083322_cr.jpg" <a href="images/IMG_20181214_083322_cr.jpg" data-fancybox="close" data-caption="Our player, ready to go"><img src="images/IMG_20181214_083322_cr.jpg"
width="320" alt="Our player, ready to go" /></a> width="320" alt="Our player, ready to go" /></a>
</p> </p>
<p>
OK, well done. Now reopen the case, the player is still missing its SD card with the software.
</p>
<h2 id="software">Software Installation and Configuration</h2> <h2 id="software">Software Installation and Configuration</h2>
<pre style="background-color:#ff9999">
TODO
Etcher?
</pre>
<h3 id="volumio">Volumio</h3> <h3 id="volumio">Volumio</h3>
<p> <p>
First of all, you will have to download the <a href="https://volumio.org/get-started/">volumio image for Raspberry Pi</a> and put it on your micro SD card. Once you have done that, put it in and start the Raspberry Pi by powering the speaker. First of all, you will have to download the <a href="https://volumio.org/get-started/">volumio image for Raspberry Pi</a> and put it on your micro SD card. (I had some problems using <code>dd</code> which I did not follow up on. Instead, I used <a href="https://www.balena.io/etcher/">balenaEtcher</a> which worked fine.) Once you have done that, put it in and start the Raspberry Pi by powering the speaker.
</p> </p>
<p> <p>
The initial configuration is pretty straight forward. Open up <a href="http://volumio.local">volumio.local</a> (or the Raspberry Pi's IP address) in your browser and click through the installation assistant. Set the output to "Generic I2S DAC", activate the software mixer and connect to your network share (if any). You can also already set up plugins for streaming services like Spotify. Finally, activate SSH on the developer page <a href="http://volumio.local/dev">volumio.local/dev</a> for the next steps. The initial configuration is pretty straight forward. Connect to the WiFi network &quot;volumio&quot; that has been opened up and click through the installation assistant. Set the output to "Generic I2S DAC", activate the software mixer and connect to your network share (if any). You can also already set up plugins for streaming services like Spotify. Finally, activate SSH on the developer page <a href="http://qudio.local/dev">qudio.local/dev</a> (or whatever your hostname was) for the next steps.
</p>
<p class="gallery">
<a href="images/Screenshot_20190207-095549.png" data-fancybox="volumio-screenshots" data-caption="Connect to the WiFi hotspot &quot;volumio&quot; that the player creates"><img src="images/Screenshot_20190207-095549.png" height="320" alt="Connect to the WiFi hotspot &quot;volumio&quot; that the player creates" /></a>
<a href="images/Screenshot_20190207-095601.png" data-fancybox="volumio-screenshots" data-caption="You can give the system a hostname that will define its URL in the local network"><img src="images/Screenshot_20190207-095601.png" height="320" alt="You can give the system a hostname that will define its URL in the local network" /></a>
<a href="images/Screenshot_20190207-095620.png" data-fancybox="volumio-screenshots" data-caption="For the CJMCU-5102 audio module, simply select &quot;Generic I2S DAC&quot; as output device"><img src="images/Screenshot_20190207-095620.png" height="320" alt="For the CJMCU-5102 audio module, simply select &quot;Generic I2S DAC&quot; as output device" /></a>
</p>
<p class="gallery">
<a href="images/Screenshot_20190207-095707.png" data-fancybox="volumio-screenshots" data-caption="Connect to your local network"><img src="images/Screenshot_20190207-095707.png" height="320" alt="Connect to your local network" /></a>
<!--a href="images/Screenshot_20190207-095713.png" data-fancybox="volumio-screenshots" data-caption=""><img src="images/Screenshot_20190207-095713.png" height="320" alt="" /></a-->
<a href="images/Screenshot_20190207-095721.png" data-fancybox="volumio-screenshots" data-caption="You can add network shares as data source"><img src="images/Screenshot_20190207-095721.png" height="320" alt="You can add network shares as data source" /></a>
<!--a href="images/Screenshot_20190207-095725.png" data-fancybox="volumio-screenshots" data-caption=""><img src="images/Screenshot_20190207-095725.png" height="320" alt="" /></a-->
<a href="images/Screenshot_20190207-095730.png" data-fancybox="volumio-screenshots" data-caption="After restart, the system should be accessible in your local network"><img src="images/Screenshot_20190207-095730.png" height="320" alt="After restart, the system should be accessible in your local network" /></a>
</p>
<!--p class="gallery">
<a href="images/Screenshot_20190207-103422.png" data-fancybox="volumio-screenshots" data-caption=""><img src="images/Screenshot_20190207-103422.png" height="320" alt="" /></a>
<a href="images/Screenshot_20190207-103433.png" data-fancybox="volumio-screenshots" data-caption=""><img src="images/Screenshot_20190207-103433.png" height="320" alt="" /></a>
<a href="images/Screenshot_20190207-103442.png" data-fancybox="volumio-screenshots" data-caption=""><img src="images/Screenshot_20190207-103442.png" height="320" alt="" /></a>
</p-->
<p>
Before you leave the SD card in the Raspberry Pi for good, you might want to shutdown volumio, put the card back into your computer and copy over the contents of the <a href="https://github.com/tliero/qudio/tree/master/code">/code</a> directory into /data/INTERNAL/qudio. (The data directory is only available after first start, which is why we had to complete the installation assistant first.)
</p>
<p>
Alternatively you can copy over the code via ssh, but doing it directly on the SD card might be easier. In addition to that, you can put some music directly on the SD card, if you want to. Everything in the INTERNAL directory will be available in volumio after a <a href="images/Screenshot_20190207-103442.png" data-fancybox data-caption="You can rescan your data sources under &quot;My Music&quot;.">rescan</a>.
</p> </p>
<h3 id="python">Python Script</h3> <h3 id="python">Python Script</h3>
<p> <p>
You can now connect to the Raspberry Pi via SSH as user volumio. The initial password is <em>volumio</em> which you might want to change with <code>passwd</code>. After putting the SD card back in and booting up the player you can connect to the Raspberry Pi via SSH as user volumio. The initial password is <em>volumio</em> which you might want to change with <code>passwd</code>.
</p> </p>
<p> <p>
The next step is to install the necessary software packages: The next step is to install the necessary software packages:
</p> </p>
<pre><code>sudo apt-get install fswebcam zbar-tools</code></pre> <pre><code>sudo apt-get update
sudo apt-get install fswebcam zbar-tools</code></pre>
<p>
Now look for the camera (it should be available under <code>/dev/video0</code>) and make a test photo. You can check it out at <a href="http://qudio.local/backgrounds/webcam-test.jpg">http://qudio.local/backgrounds/webcam-test.jpg</a> from your computer.
</p>
<pre><code>lsusb && ls /dev/video*
fswebcam -r 320x240 -d /dev/video0 -v /data/backgrounds/webcam-test.jpg</code></pre>
<p>
Before we go on, we need Python 3.6 on the Raspberry Pi. Earlier version have a bug in socketio-client (which we need for remote control of volumio) and the current version 3.7 has a <a href="https://stackoverflow.com/a/34580922/3761783">problem with OpenSSL</a>, so 3.6 it is. Unfortunately, we will have to built it from the source, which takes a while.
</p>
<pre><code>sudo apt-get install build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev
cd ~
wget wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tar.xz
tar xf Python-3.6.5.tar.xz
cd Python-3.6.5
./configure
make
sudo make altinstall
</code></pre>
<p>
When this is completed entering <code>python3.6 --version</code> should result in &quot;Python 3.6.5&quot; on the command line. Now add the required libraries:
</p>
<pre><code>sudo easy_install-3.6 -U pip
sudo pip3.6 install --upgrade pip
sudo pip3.6 install socketio-client
sudo pip3.6 install RPi.GPIO
</code></pre>
<pre style="background-color:#ffff99">
Install python 3.6 and socketio-client
Copy over script
</pre>
<h3 id="configuration">Configuration und Test</h3> <h3 id="configuration">Configuration und Test</h3>
<pre style="background-color:#ffff99"> <pre style="background-color:#ffff99">
Test LED, Webcam Test LED, Webcam and QR recognition
</pre> </pre>
<p> <p>