Notes about Raspberry Pi

2016-09-13 22:26

Touch screen

The offical 7 inch display is upside down when mounted in some stands. To resolve this add lcd_rotate=2 to /boot/config.txt.

Reference: Official RPI Touchscreen - is it upside down in the frame?


Raspberry Pi as a Touch screen Kiosk. I suggest using the ST2240T insted since it seems to be working right out of the box according to one comment in this thread

Disable mouse cursor by starting X with -nocursor in /etc/lightdm/lightdm.conf since we don't want it on a touch screen:

xserver-command=X -nocursor

Autostart midori browser without showing the desktop by editing .config/lxsession/LXDE-pi/autostart:

#@lxpanel --profile LXDE-pi
#@pcmanfm --desktop --profile LXDE-pi
@xscreensaver -no-splash

# Disable power management and prevent blanking of the screen
@xset s off
@xset -dpms
@xset s noblank

# Auto run the browser
@midori -e Fullscreen -p -a

If the browser has trouble resolving the URL after boot you could create a local page with a meta-refresh directive to delay the lookup and then use that page as starting page for midori:

<meta http-equiv="refresh" content="5; url=">

To run firefox in kiosk mode use R-kiosk.

Silent boot

Edit the line in /boot/cmdline.txt: Change boot messages to go to tty2 by setting console=tty2. This way we can see boot messages by plugin in a keyboard and alt+f2 on boot. Also add loglevel=3 logo.nologo vt.global_cursor_default=0 to the command line to not display anything else on boot.

Init scripts

Use template /etc/init.d/skeleton to create a script for a new service. Add to boot by update-rc.d <nameofservice> defaults.


Serving Raspberry Pi with Flask


07 - Reading RFID tags with the raspberry pi

Start wifi on boot

Since raspbian "jessie" just edit /etc/wpa_supplicant/wpa_supplicant.conf and add the networks to connect to:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev

    ssid="My AP name"

how to setup multiple wifi networks#40144