This year I want to send you merry christmas by creating a blog-entry for a raspberry pi christmas project. The “christmas-machine” displays merry christmas and wishes for the “christkind” on a tft display for the raspberry. It is possible to send christmas wishes using a web applications that can be accessed via wifi. I placed this installation at the coffee-kitchen in the office and it was very nice to see that my colleges had a lot of fun with it.
Blesses for “Brother Patrick” who spent me that wonderful Joy-IT TFT display.
Install Joy-IT TFT3.2
This is a very short installation guide for this display. Please visit the documentation for this display to see the full installation guide. Edit /boot/config.txt
dtparam=spi=on
dtoverlay=joy-IT-Display-Driver-32b-overlay:rotate=270,swapxy=1
Edit /boot/cmdline.txt and add “fbcon=map:10”
console=serial0,115200 console=tty1 root=PARTUUID=6c586e13-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait fbcon=map:10
Install xorg-modules:
apt-get install xorg xorg-docs-core xserver-xorg xserver-xorg-core xserver-xorg-input-all xserver-xorg-input-libinput xserver-xorg-input-wacom xserver-xorg-legacy xserver-xorg-video-all xserver-xorg-video-amdgpu xserver-xorg-video-ati xserver-xorg-video-fbdev xserver-xorg-video-fbturbo xserver-xorg-video-nouveau xserver-xorg-video-radeon xserver-xorg-video-vesa
Edit /usr/share/X11/xorg.conf.d/99-calibration.conf:
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "160 3723 3896 181"
Option "SwapAxes" "1"
Option "TransformationMatrix" "1 0 0 0 -1 1 0 0 1"
EndSection
Edit /usr/share/X11/xorg.conf.d/99-fbturbo.conf and set fbdev to “/dev/fb1”
Section "Device"
Identifier "Allwinner A10/A13 FBDEV"
Driver "fbturbo"
Option "fbdev" "/dev/fb1"
Option "SwapbuffersWait" "true"
EndSection
Install the driver:
cd /tmp
wget anleitung.joy-it.net/upload/joy-IT-Display-Driver-32b-overlay.dtbsudo
cp joy-IT-Display-Driver-32b-overlay.dtb /boot/overlays/joy-IT-Display-Driver-32b-overlay.dtbo
Prepare the desktop environment
Install the LXDE-desktop:
apt-get install lxde-common lxde-core lxde-icon-theme lxde-settings-daemon openbox-lxde-session lightdm lightdm-gtk-greeter chromium-browser unclutter
Set autologin for user pi in lightdm:
autologin-guest=false
autologin-user=pi
autologin-user-timeout=0
Edit /etc/xdg/lxsession/LXDE/autostart and remove xscreensaver:
@lxpanel --profile LXDE
@pcmanfm --desktop --profile LXDE
@xset s off
@xset -dpms
@xset s noblank
Reboot
Edit /home/pi/.config/lxsession/LXDE/autostart:
@lxpanel --profile LXDE
@pcmanfm --desktop --profile LXDE
@/home/pi/startxmas.sh
@xset s off
@xset -dpms
@xset s noblank
Remove software:
apt-get remove light-locker wpasupplicant
Edit /home/pi/startxmas.sh:
#!/bin/bash
DISPLAY=:0.0 unclutter &
DISPLAY=:0.0 chromium-browser --kiosk --disable-restore-session-state --disable-features=TranslateUI --disable-session-crashed-bubble http://localhost/tree.html
Install the Access-Point
apt-get install hostapd dnsmasq
Edit /etc/hostapd/hostapd.conf:
interface=wlan0
driver=nl80211
ssid=xmas
hw_mode=g
channel=11
macaddr_acl=0
Edit /etc/dhcpcd.conf and add the following lines at the end of the file:
interface wlan0
static ip_address=10.0.0.1/24
Edit /etc/dnsmasq.d/dhcp:
dhcp-authoritative
dhcp-range=10.0.0.50,10.0.0.150,12h
address=/\#/10.0.0.1
interface=wlan0
Edit /etc/default/hostapd and modify DAEMON_CONF:
DAEMON_CONF="/etc/hostapd/hostapd.conf"
Configure autostart for hostapd:
systemctl daemon-reload
systemctl unmask hostapd
systemctl enable hostapd
Configure the webservice
apt-get install apache2 php7.3 php7.3-cli php7.3-json git
Download the Webfiles:
git clone https://github.com/whotwagner/xmas2019.git /tmp/xmas2019
cp -r /tmp/xmas2019/* /var/www/html/
chown www-data /var/www/html/wishes
Reboot