===== Pi-OGG-Player ===== This is the workaround for a touch screen OGG PLayer based on a Raspberry Pi with the Raspberry Pi Touch Display. 10 of these players were used in the exhibition [[https://www.iwalewahaus.uni-bayreuth.de/de/program/archive/2017/20161104_Stolen-Moments/index.html|Stolen Moments]] at the IWALEWAHAUS in Bayreuth 2017.\\ The OGG file player was made with pygame for Raspbian Jessy.\\ [[http://www.pygame.org/hifi.html]]\\ [[http://www.pygame.org/docs/index.html]]\\ Other Links & Knowledge:\\ [[http://www.nerdparadise.com/tech/python/pygame/basics/]]\\ [[https://www.raspberrypi.org/magpi/issues/essentials-games-vol1/]]\\ IP Address: 192.168.0.123\\ PW:st0lenm0ments ---- ==== Sound Card ==== [[http://elinux.org/RPi_VerifiedPeripherals#USB_Sound_Cards]] ---- ==== Upgrade ==== $ sudo apt-get update $ sudo apt-get upgrade $ sudo apt-get install zip, htop $ sudo apt-get install python3, python3-pygame, python3-pyqt5, python3-pip, idle ---- ==== Rotate the Display ==== [[https://www.raspberrypi.org/forums/viewtopic.php?f=108&t=120793]]\\ $ sudo nano /boot/config.txt to rotate the display 270 degree add: display_rotate=3 ---- ==== Python Multitouch ==== [[http://forums.pimoroni.com/t/official-7-raspberry-pi-touch-screen-faq/959]]\\ [[https://github.com/pimoroni/python-multitouch]]\\ $ wget https://github.com/pimoroni/python-multitouch/archive/master.zip $ unzip master.zip $ cd python-multitouch-master/library/ $ sudo python3 setup.py install Example: import ft5406 ts = ft5406.Touchscreen() while True: for touch in ts.poll(): print(touch.slot, touch.id, touch.valid, touch.x, touch.y) ---- ==== Read-Only SD Card ==== Change the SD card to a read-only mode.\\ [[http://raspberrypi.stackexchange.com/questions/5112/running-on-read-only-sd-card]]\\ [[https://web.archive.org/web/20150101110424/http://raspberrycenter.de/forum/umruestung-raspberry-pi-read-only-root-filesystem]]\\ === Fstab === in: $ sudo nano /etc/fstab change: /dev/mmcblk0p2 / ext4 defaults,noatime,ro 0 1 tmpfs /tmp tmpfs defaults,size=30M 0 0 === Disable some Programms === disable rsyslog and dphys-swapfile:\\ $ sudo systemctl disable rsyslog $ sudo systemctl disable dphys-swapfile === Remount === To remount the partition writabe:\\ $ sudo mount / -o remount,rw ---- ==== USB Sound ==== $ alsamixer find the soundcard number:\\ $ aplay -l in:\\ $ sudo nano /etc/asound.conf $ sudo nano ~/.asoundrc write (with your card number):\\ pcm.!default { type hw card 1 } ctl.!default { type hw card 1 } and in:\\ $ sudo nano /usr/share/alsa/alsa.conf change:\\ defaults.ctl.card 0 defaults.pcm.card 0 to (depends on your number):\\ defaults.ctl.card 1 defaults.pcm.card 1 ---- ==== Stop Blanking ==== Open:\\ $ sudo nano /boot/cmdline.txt Addd:\\ consoleblank=0 ---- ==== Mount USB Stick ==== $ sudo mkdir /home/pi/stolenmoments $ sudo blkid /dev/mmcblk0p3: LABEL="STICK" UUID="A933-7A00" TYPE="vfat" $ sudo nano /etc/fstab edit: #USB Stick on /dev/sda1 UUID=A933-7A00 /home/pi/stolenmoments/data vfat utf8,umask=022,uid=pi,gid=pi 0 0 $ sudo mount -a ---- ==== IP and Network configuration ==== === Enable the SSH Server === In Raspian Jessie it should be activated allready. If not enable the SSH server by opening the raspi-config: $ sudo raspi-config In 8. Advanced Options you can activate SSH. === Static IP Address === Look up your gateway: $ netstat -r -n Find you IP address: $ ifconfig or: $ ip addr Give the Raspberry Pi a static IP address. Open the interfaces file: $ sudo nano /etc/network/interfaces Add these lines after "face eth0 inet dhcp": # Ethernet auto eth0:1 allow-hotplug eth0:1 iface eth0 inet static address 192.168.0.123 netmask 255.255.255.0 gateway 192.168.0.1 dns-nameservers 192.168.0.1 Save and quit, ctl+o, Return, ctl+x.\\ Disable the DHCP-Client:\\ In Raspbian Jessie: $ sudo service dhcpcd stop $ sudo systemctl disable dhcpcd Restart ethernet: $ sudo ifdown eth0:1 $ sudo ifup eth0:1 Or/and reboot: $ sudo reboot ==== Login over SSH ==== One can login from your computer with: $ ssh pi@192.168.0.099 or with XWindows support: $ ssh -XY pi@192.168.0.099 PW: raspberry\\ === Miscellaneous === If the host key verification failed, one can remove the old key with:\\ $ ssh-keygen -R 192.168.0.099 And with\\ ~. one can terminate a broken ssh session. ----