I have been lazy… I admit…I havent updated my Pis in over a year!
So, with great eager I started yesterday, by downloading the latest Rasbian 2017-04-10 image thinking, well, this will be quick (:
How wrong was I! I only just finished up with the first one!
Why this long? Well, the underpants-devs (aka linux developers = pimply guys sitting in their underpants in their mom’s basement) again went and changed a tonne of stuff without updating the docs and tutorials we all rely on. Fuck you linux devs… fuck you
Anyway, figured I’ll document what worked for me – maybe it helps someone else with the HY28B, Texy 2.8, or other ILI9325 based TFTs
- Write a fresh SD with the latest Rasbian Jessie (This worked with 2017-04-10… if the underpants-devs have their way, please consider this already broken, again) (fuck you underpants-devs)
- Put a blank file called ‘ssh’ in the boot partition before you eject the SD. Yip those underpants-kids figured they’ll vent some of their anger about all the teasing at school, on you, by disabling SSH until you do! Urrrg. “security” “iot” fuck… Anyway, if Rasbian sees /boot/ssh it enables SSH…
- Once finally booted up, SSH into the Pi
-
sudo nano /boot/config.txt
- add a new overlay:
dtoverlay=hy28b,rotate=90,resetgpio=25,ledgpio=18
- Edit the kernel command line
sudo nano /boot/cmdline.txt
- at the end of the line, add:
fbcon=map:10 fbcon=font:VGA8X8
- Change the font:
sudo dpkg-reconfigure console-setup
- Go through the following menu choices:
Encoding to use on the console: <UTF-8>
Character set to support: <Guess optimal character set>
Font for the console: Terminus (default is VGA)
Font size: 6×12 (framebuffer only) - Install packages needed for touch
sudo apt-get update sudo apt-get install libts-bin evtest xinput
- Install the ‘evdev’ touch drivers
sudo apt-get install xserver-xorg-input-evdev
- To calibrate the touch panel for non-X based use
sudo TSLIB_FBDEVICE=/dev/fb1 TSLIB_TSDEVICE=/dev/input/event0 ts_calibrate
- Edit
sudo nano /usr/share/X11/xorg.conf.d/99-fbturbo.conf
and change the line
Option "fbdev" "/dev/fb0"
to
Option "fbdev" "/dev/fb1"
- Enable X Windows
sudo raspi-config
- Enable boot to GUI
- Reboot
- At this point the Desktop should launch in the TFT but touch calibration will be way messed up
- Install calibration tool:
sudo apt-get install -y xinput-calibrator
- Change the input driver to evdev
sudo nano /usr/share/X11/xorg.conf.d/40-libinput.conf
- At the bottom, look for the section dealing with “touchscreen” (ie ignore touchpad, pointer and keyboard)
- In the touchpad section, change the driver to evdev
-
Section "InputClass" Identifier "libinput touchscreen catchall" MatchIsTouchscreen "on" MatchDevicePath "/dev/input/event*" #commented out# Driver "libinput" Driver "evdev" EndSection
- Reboot
- When the UI comes up, use a mouse to open a terminal and run
'sudo xinput_calibrator'
- Copy the
Section....EndSection
output from the terminal and paste in a new file:
/usr/share/X11/xorg.conf.d/99-calibration.conf
For Example:
Section "InputClass" Identifier "calibration" MatchProduct "ADS7846 Touchscreen" Option "Calibration" "338 3879 198 3667" Option "SwapAxes" "1" EndSection
- Reboot one last time.
- When it comes up, touchscreen should at last be working!
- Install packages needed for Kiosk
sudo apt-get install -y x11-xserver-utils unclutter
- Create/edit the file located here:
nano /home/pi/.config/lxsession/LXDE-pi/autostart
So that the file has this in it:
@lxpanel --profile LXDE-pi @pcmanfm --desktop --profile LXDE-pi #@xscreensaver -no-splash #@point-rpi @xset s off @xset -dpms @xset s noblank @sed -i 's/"exited_cleanly": false/"exited_cleanly": true/' ~/.config/chromium/Default/Preferences @chromium-browser --incognito --noerrdialogs --kiosk bloggerbrothers.com @unclutter -idle 0.1 -root