Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Installing piTFT Screen 3.5"
- https://learn.adafruit.com/adafruit-pitft-3-dot-5-touch-screen-for-raspberry-pi/easy-install-2
- SSH into pi
- cd ~
- wget https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/adafruit-pitft.sh
- chmod +x adafruit-pitft.sh
- sudo ./adafruit-pitft.sh
- Option 4 (rotated 90 degrees)
- Option 1
- Yes
- IN ORDER! Mine bugged out going out of order.
- sudo apt install xserver-xorg
- sudo apt install xinit
- sudo apt install libgtk-3-0
- sudo apt install xserver-xorg-video-fbdev
- ********
- wget https://github.com/darksid3r/OctoPrint-TFT/releases/download/1.2/octoprint-tft_stretch_1.2.git2669d90-1_armhf.deb
- sudo dpkg -i octoprint-tft_stretch_1.2.git2669d90-1_armhf.deb
- ********
- sudo nano /usr/share/X11/xorg.conf.d/99-pitft.conf
- In file add:
- Section "Device"
- Identifier "Adafruit PiTFT"
- Driver "fbdev"
- Option "fbdev"
- "/dev/fb1" EndSection
- ^x
- Y
- ***********
- Change the OctoPrint-TFT service to output to framebuffer 1, rather than 0
- sudo nano /lib/systemd/system/octoprint-tft.service
- edit the command line from:
- ExecStart=/usr/bin/xinit /usr/bin/OctoPrint-TFT -- :0 -nolisten tcp -nocursor
- to
- ExecStart=/usr/bin/xinit /usr/bin/OctoPrint-TFT -- :1 -nolisten tcp -nocursor
- ^x
- Y
- ********
- Enable touch screen size
- sudo nano /usr/share/X11/xorg.conf.d/40-libinput.conf
- I added Option "TransformationMatrix" "0 1 0 -1 0 1 0 0 1" in InputClass section dedicated to touchscreens
- Section "InputClass"
- Identifier "libinput touchscreen catchall"
- MatchIsTouchscreen "on"
- MatchDevicePath "/dev/input/event*"
- Driver "libinput"
- Option "TransformationMatrix" "0 1 0 -1 0 1 0 0 1"
- EndSection
- *********
- Manually calibrate screen
- sudo TSLIB_FBDEVICE=/dev/fb1 TSLIB_TSDEVICE=/dev/input/touchscreen ts_calibrate
- Head to screen and manually touch each point to calibrate the screen
- *********
- Edit this file:
- sudo nano /etc/octoprint-tft-environment
- Address: http://ocotpi.local
- API key: Find your api key from the setting menu via web browser
- Config file location: /home/pi/octoprint/
- Theme location: /opt/octoprint-tft/styles/default/
- Resolution: leave blank for 3.5"
- ********
- Disable screen timeout
- https://github.com/mcuadros/OctoPrint-TFT/issues/24
- sudo nano /etc/X11/xorg.conf
- Paste the following:
- Section "ServerFlags"
- Option "blank time" "0"
- Option "standby time" "0"
- Option "suspend time" "0"
- Option "off time" "0"
- EndSection
- ^x
- Y
- *******
- Enable plugin
- sudo ln -sf /lib/systemd/system/octoprint-tft.service /etc/systemd/system/display-manager.service
- sudo systemctl set-default graphical.target
Advertisement
Add Comment
Please, Sign In to add comment