-
Notifications
You must be signed in to change notification settings - Fork 75
pi Venus install Touch Screen (MPI3501 ILI9486 320x480 LCD)
MindSteps BV edited this page Feb 4, 2021
·
7 revisions
cd /home/root
wget http://www.lcdwiki.com/res/RaspDriver/LCD-show.tar.gz
tar -xzvf LCD-show.tar.gz
cd LCD-show
cp usr/tft35a-overlay.dtb /u-boot/overlays/
echo dtparam=spi=on >> /u-boot/config.txt
echo dtparam=i2c1=on >> /u-boot/config.txt
echo dtparam=i2c_arm=on >> /u-boot/config.txt
echo framebuffer_width=480 >> /u-boot/config.txt
echo framebuffer_height=272 >> /u-boot/config.txt
echo dtoverlay=tft35a,rotate=270 >> /u-boot/config.txt
echo display_default_lcd=1 >> /u-boot/config.txt
echo fbcon=map:10 >> /u-boot/cmdline.txt
reboot
After rebooting...
opkg update
opkg install qt4-embedded-plugin-mousedriver-tslib
opkg install tslib-calibrate
opkg install tslib-tests
TSLIB_FBDEVICE=/dev/fb0
TSLIB_TSDEVICE=/dev/input/touchscreen0
TSLIB_CALIBFILE=/etc/pointercal
TSLIB_CONFFILE=/etc/ts.conf
TSLIB_PLUGINDIR=/usr/lib/ts
ts_calibrate
Touch the screen appropriately (after first buying it dinner and drinks, and getting consensual permission etc.)
nano /opt/victronenergy/gui/start-gui.sh
Add the following lines right after the "when headfull "comment block
Note that these require you to have calibrated the screen, saving the various calibration files as above.
export TSLIB_TSEVENTTYPE=INPUT
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/input/touchscreen0
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_PLUGINDIR=/usr/lib/ts
export QWS_MOUSE_PROTO=tslib:/dev/input/touchscreen0
Save and exit start-gui.sh (press ctrl x, y)
mv /etc/venus/headless /etc/venus/headless.off
reboot
You should now have a display. Enjoy!