This is an old revision of the document!
Table of Contents
Pi-OGG-Player
An OGG file player for the Raspberry Pi Tablet made with pygame for Raspbian Jessy.
http://www.pygame.org/hifi.html
http://www.pygame.org/docs/index.html
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
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
$ lsusb $ amixer $ alsamixer
in:
$ sudo nano /etc/asound.conf
pcm.!default { type hw card 1 } ctl.!default { type hw card 1 }
or:
http://plugable.com/2014/11/06/how-to-switch-to-usb-audio-on-raspberry-pi/
find the soundcard:
$ aplay -l
In:
$ sudo nano /etc/modprobe.d/alsa-base.conf
or:
$ sudo nano /usr/share/alsa/alsa.conf
change:
options snd-usb-audio index=-2
to:
options snd-usb-audio index=0
add the following on the next line:
options snd_bcm2835 index=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.