diff --git a/Sizes.odt b/Sizes.odt deleted file mode 100644 index e8ecc5d..0000000 Binary files a/Sizes.odt and /dev/null differ diff --git a/documentation/index.html b/documentation/index.html index 89c9b58..48b96df 100644 --- a/documentation/index.html +++ b/documentation/index.html @@ -245,7 +245,7 @@ h2, h3 {

System Installation

- Before installing anything additionally, Raspbian Lite has to be installed on the SD card. From there on, it's all on the command line. + Before installing anything additionally, Raspbian Lite has to be installed on the SD card. When the SD 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 wi-fi is configured, we can remove all the cables and continue to work remotely over ssh.

@@ -253,9 +253,9 @@ h2, h3 {

-# Make sure that the latest versions are installed
+# Make sure that the latest versions are installed (this might take some time) (https://www.raspberrypi.org/documentation/raspbian/updating.md)
 sudo apt update
-sudo apt upgrade
+sudo apt dist-upgrade
 
 # Basic setup: password, keyboard layout, wi-fi channels, hostname, ssh
 sudo raspi-config
@@ -269,6 +269,9 @@ lsusb
 # Install wi-fi client (https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md)
 sudo apt install iw
 
+# If not done yet, plug in wi-fi adapter and reboot
+sudo reboot
+
 # Scan networks and add wi-fi network to configuration
 sudo iwlist wlan0 scan
 sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
@@ -277,11 +280,25 @@ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
 #		psk="Your_wifi_password"
 #	}
 
+# Restart wi-fi
 sudo ifdown wlan0
 sudo ifup wlan0
 
-# disable HDMI (http://www.jeffgeerling.com/blogs/jeff-geerling/raspberry-pi-zero-conserve-energy)
+# Check if wi-fi is connected
+ifconfig wlan0
+
+# Turn off
+sudo shutdown -h now
+
+ +

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

+ +
+# Now that remote connection is available, disable HDMI (http://www.jeffgeerling.com/blogs/jeff-geerling/raspberry-pi-zero-conserve-energy)
 sudo nano /etc/rc.local
+#	# disable HDMI
 #	/usr/bin/tvservice -o
 
 # Disable the ACT LED
@@ -292,14 +309,15 @@ sudo nano /boot/config.txt
 # Configure NTP
 sudo apt install ntp
 sudo nano /etc/ntp.conf
-# add time server to /etc/ntp.conf
+# add time server to /etc/ntp.conf (line 16)
 #	server de.pool.ntp.org
 sudo /etc/init.d/ntp restart
 date
 
-sudo reboot
+# Turn off
+sudo shutdown -h now
 
- +

After the basic installation is done, it's time to bring everything together in the case. All components are connected but we'll wait using the glue gun until everything is tested thoroughly. Especially the webcam might need some in-place live adjustment. The easiest way to do this is by connecting the webcam to another computer while it is already in the case (see bash history below).

@@ -312,15 +330,24 @@ sudo reboot # Install additional software sudo apt install lirc zbar-tools mc moc fswebcam python3 python-rpi.gpio python3-rpi.gpio +# As a first test turn the LED on and off +python3 ~/test/lighton.py +python3 ~/test/lightoff.py + +# We can also test the buttons and the sensor (press buttons, hold a card on the sensor to see if it switches from 'LOW' to 'HIGH') - stop with Ctrl-C +python3 ~/test/buttons.py +python3 ~/test/sensor.py + + # Configure PHAT DAC (https://learn.pimoroni.com/tutorial/phat/raspberry-pi-phat-dac-install) curl -sS get.pimoroni.com/phatdac | bash # Check for errors dmesg -# Plug in headphones or JBL connector cable, start mocp and test audio output via the PHAT DAC +# Plug in headphones or JBL connector cable, start mocp and test audio output via the PHAT DAC (Don't forget to turn on the speaker!) mocp -S -mocp -l ~/piplayer2/sounds/scanning.mp3 +mocp -l ~/sounds/scanning.mp3 mocp -x # Determine the webcams USB ID and the available resolutions (http://askubuntu.com/questions/214977/how-can-i-find-out-the-supported-webcam-resolutions) @@ -329,17 +356,18 @@ lsusb -s 001:006 -v | egrep "Width|Height" # Webcam test: turn on the LED, take a photo and turn the LED off # (The focus of the webcam should be adjusted before on another computer with a live picture) -python3 ~/piplayer2/test/lighton.py +python3 ~/test/lighton.py sudo fswebcam -r 320x240 -d /dev/video0 -v ~/webcam-test.jpg -python3 ~/piplayer2/test/lightoff.py +python3 ~/test/lightoff.py # Copy ~/webcam-test.jpg to another computer and have a look at it # If needed, adjust the webcam and repeat the step until the QR code recognition is reliable # QR-Test: Hold a QR code card above the webcam then turn on the LED, decode the QR code and turn the LED off -python3 ~/piplayer2/test/lighton.py +# (Stop scanning for codes with Ctrl-C) +python3 ~/test/lighton.py zbarcam --quiet --nodisplay --raw -Sdisable -Sqrcode.enable --prescale=320x240 /dev/video0 -python3 ~/piplayer2/test/lightoff.py +python3 ~/test/lightoff.py # Enable lirc in /boot/config.txt and add parameters sudo nano /boot/config.txt @@ -398,7 +426,7 @@ sudo reboot ps -ef | grep python # Watch the log output while testing with QR code cards -tail -f /home/pi/piplayer2/piplayer2.log +tail -f /home/pi/piplayer2.log # Switch to RAM disk and set the filesystem read-only (https://www.heise.de/ct/ausgabe/2016-21-Den-Raspi-als-Bluetooth-Empfaenger-einsetzen-3330683.html) @@ -428,7 +456,7 @@ sudo nano /etc/rc.local # # make /tmp on RAM disk writable # chmod 777 /tmp # -# # disable hdmi +# # disable HDMI # /usr/bin/tvservice -o # # # start piplayer @@ -440,11 +468,10 @@ sudo reboot

- We can make the filesystem writeable again for maintenance by remounting it like this: + We can make the filesystem writeable again (until reboot) for maintenance by remounting it like this:

-# Dateisystem temporär beschreibbar machen
 sudo mount -o rw,remount /
 sudo mount -o rw,remount /boot
 
@@ -454,24 +481,23 @@ sudo mount -o rw,remount /boot 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:

-

-HIER WEITER: Test-MP3 zu Template und Repository hinzufügen -

- - - - -
+# make SD writable
+sudo mount -o rw,remount /
+sudo mount -o rw,remount /boot
+
+# create mount point
+mkdir /home/pi/share
+
 # Share einbinden
 sudo nano /etc/rc.local
 #	sudo mount -t cifs -o user=guest,password= //192.168.1.125/media /home/pi/share
-
-# via /etc/fstab HAT NICHT FUNKTIONIERT
-sudo nano /etc/fstab
-#	tmpfs           /media/share     tmpfs   defaults,size=10%             0       0
-#	//192.168.1.125/hidrive/Media /media/share cifs guest,ro
 
+ +

+HIER WEITER: +- Test-MP3 zu Template und Repository hinzufügen +

Python Script

diff --git a/JBL_screws_drilling_template.svg b/misc/JBL_screws_drilling_template.svg similarity index 100% rename from JBL_screws_drilling_template.svg rename to misc/JBL_screws_drilling_template.svg