From df671e49f9c694be73faf8f2dd3cb6810050e743 Mon Sep 17 00:00:00 2001 From: Tilman Liero Date: Tue, 22 Jan 2019 15:44:44 +0100 Subject: [PATCH] Qudio documentation --- code/qudio.py | 2 +- code/test/lightoff.py | 4 ++-- code/test/lighton.py | 4 ++-- code/test/sensor.py | 20 ++++++++--------- documentation/qudio/index.html | 39 ++++++++++++++++++++++++---------- 5 files changed, 43 insertions(+), 26 deletions(-) diff --git a/code/qudio.py b/code/qudio.py index 1efa22e..be4f619 100644 --- a/code/qudio.py +++ b/code/qudio.py @@ -19,7 +19,7 @@ SOUND_SCANNING = "mnt/INTERNAL/sounds/scanning.mp3" SOUND_SCAN_FAIL = "mnt/INTERNAL/sounds/fail-05.mp3" QR_SCANNER_TIMEOUT = 4 -# photo sensor on PIN 17 +# photo sensor on PIN 5 PIN_SENSOR = 5 # LED on PIN 22 diff --git a/code/test/lightoff.py b/code/test/lightoff.py index 611d5c4..cbd589c 100644 --- a/code/test/lightoff.py +++ b/code/test/lightoff.py @@ -2,7 +2,7 @@ import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) -GPIO.setup(27,GPIO.OUT) -GPIO.output(27,GPIO.LOW) +GPIO.setup(22,GPIO.OUT) +GPIO.output(22,GPIO.LOW) GPIO.cleanup() diff --git a/code/test/lighton.py b/code/test/lighton.py index 340325c..58b2371 100644 --- a/code/test/lighton.py +++ b/code/test/lighton.py @@ -2,6 +2,6 @@ import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) -GPIO.setup(27,GPIO.OUT) -GPIO.output(27,GPIO.HIGH) +GPIO.setup(22,GPIO.OUT) +GPIO.output(22,GPIO.HIGH) diff --git a/code/test/sensor.py b/code/test/sensor.py index 20783dc..8888b33 100644 --- a/code/test/sensor.py +++ b/code/test/sensor.py @@ -1,27 +1,27 @@ import RPi.GPIO as GPIO import time -# photo sensor on PIN 17 +# photo sensor on PIN 5 GPIO.setmode(GPIO.BCM) -GPIO.setup(17, GPIO.IN) +GPIO.setup(5, GPIO.IN) -# LED on PIN 27 -GPIO.setup(27, GPIO.OUT) -GPIO.output(27, GPIO.LOW) +# LED on PIN 22 +GPIO.setup(22, GPIO.OUT) +GPIO.output(22, GPIO.LOW) try: print('Start sensor test') while True: - time.sleep(0.75) - if (GPIO.input(17) == GPIO.LOW): + time.sleep(0.5) + if (GPIO.input(5) == GPIO.LOW): print('LOW') - GPIO.output(27, GPIO.LOW) + GPIO.output(22, GPIO.LOW) else: print('HIGH') - GPIO.output(27, GPIO.HIGH) + GPIO.output(22, GPIO.HIGH) except KeyboardInterrupt: print('KeyboardInterrupt') - GPIO.cleanup() +GPIO.cleanup() diff --git a/documentation/qudio/index.html b/documentation/qudio/index.html index 819e164..071a6af 100644 --- a/documentation/qudio/index.html +++ b/documentation/qudio/index.html @@ -235,7 +235,7 @@ h2, h3, h4 {

Installing the Window

- For the window on top of the case, we need to cut a XX mm × XX 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 slot inside the cover. + For the window on top of the case, we need to cut a 48 mm × 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. You might need to file the edges a bit until it fits into the slot inside the cover.

@@ -367,6 +367,10 @@ h2, h3, h4 {

Software Installation and Configuration

+
+TODO
+
+

Volumio

@@ -388,21 +392,39 @@ h2, h3, h4 { The next step is to install the necessary software packages:

-
sudo apt-get install fswebcam zbar-tools python3-rpi.gpio
+
sudo apt-get install fswebcam zbar-tools
- Copy over script - - Test LED, Webcam +
+Install python 3.6 and socketio-client
+Copy over script
+

Configuration und Test

+
+Test LED, Webcam
+
+

+ For testing purposes you can print these QR code cards.

QR Cards

+ The QR code on the cards should be about 10×10 mm large following this schema: +

+ + The window is 24×24 mm, the camera should see at least 10×10 mm in the center + +

+ While the curb leaves 34 mm space for the card's width, it is a good practice to print the cards with a width of 33 mm. That way they do not get stuck and you can place exactly 2×9 cards on an A4 sheet. +

+ +

+ Since the creation of the cards can be a bit of a hassle when the collection grows larger, I have written a card generator for Spotify links. It takes a list of Spotify URIs as input and generates a PDF with the QR codes, the title and the album art. The information is printed both on the front and the back of the cards in order to make sorting of card stacks easier. I will put the generator online as soon as possible.

@@ -422,20 +444,15 @@ Komponenten-Fotos: Jumper-Kabel Plexiglas -Screenshots OnShape - Live-Bild Kamera-Einstellung LED im Case -QR-Abmessungen als Grafik Test-QR -CJMCU-5102: - reicht 10k auf 3.3v auch, wenn die Versorgung über 5v erfolgt? - Rückseite deactivate microphone? +deactivate RasPi LED 12 mm caps? acrylic glass --> size? Bohrergröße