Guest User

Untitled

a guest
Jun 22nd, 2019
487
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.68 KB | None | 0 0
  1. Installing piTFT Screen 3.5"
  2.  
  3. https://learn.adafruit.com/adafruit-pitft-3-dot-5-touch-screen-for-raspberry-pi/easy-install-2
  4.  
  5. SSH into pi
  6.  
  7. cd ~
  8. wget https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/adafruit-pitft.sh
  9.  
  10. chmod +x adafruit-pitft.sh
  11.  
  12. sudo ./adafruit-pitft.sh
  13.  
  14. Option 4 (rotated 90 degrees)
  15. Option 1
  16. Yes
  17.  
  18.  
  19. IN ORDER! Mine bugged out going out of order.
  20.  
  21. sudo apt install xserver-xorg
  22.  
  23. sudo apt install xinit
  24.  
  25. sudo apt install libgtk-3-0
  26.  
  27. sudo apt install xserver-xorg-video-fbdev
  28.  
  29. ********
  30.  
  31. wget https://github.com/darksid3r/OctoPrint-TFT/releases/download/1.2/octoprint-tft_stretch_1.2.git2669d90-1_armhf.deb
  32.  
  33. sudo dpkg -i octoprint-tft_stretch_1.2.git2669d90-1_armhf.deb
  34.  
  35. ********
  36.  
  37. sudo nano /usr/share/X11/xorg.conf.d/99-pitft.conf
  38.  
  39. In file add:
  40.  
  41. Section "Device"
  42. Identifier "Adafruit PiTFT"
  43. Driver "fbdev"
  44. Option "fbdev"
  45. "/dev/fb1" EndSection
  46.  
  47. ^x
  48. Y
  49.  
  50.  
  51. ***********
  52.  
  53. Change the OctoPrint-TFT service to output to framebuffer 1, rather than 0
  54.  
  55. sudo nano /lib/systemd/system/octoprint-tft.service
  56.  
  57. edit the command line from:
  58. ExecStart=/usr/bin/xinit /usr/bin/OctoPrint-TFT -- :0 -nolisten tcp -nocursor
  59. to
  60. ExecStart=/usr/bin/xinit /usr/bin/OctoPrint-TFT -- :1 -nolisten tcp -nocursor
  61.  
  62. ^x
  63. Y
  64.  
  65.  
  66. ********
  67. Enable touch screen size
  68.  
  69. sudo nano /usr/share/X11/xorg.conf.d/40-libinput.conf
  70.  
  71. I added Option "TransformationMatrix" "0 1 0 -1 0 1 0 0 1" in InputClass section dedicated to touchscreens
  72.  
  73. Section "InputClass"
  74. Identifier "libinput touchscreen catchall"
  75. MatchIsTouchscreen "on"
  76. MatchDevicePath "/dev/input/event*"
  77. Driver "libinput"
  78. Option "TransformationMatrix" "0 1 0 -1 0 1 0 0 1"
  79. EndSection
  80.  
  81.  
  82. *********
  83.  
  84. Manually calibrate screen
  85.  
  86. sudo TSLIB_FBDEVICE=/dev/fb1 TSLIB_TSDEVICE=/dev/input/touchscreen ts_calibrate
  87.  
  88. Head to screen and manually touch each point to calibrate the screen
  89.  
  90.  
  91. *********
  92.  
  93. Edit this file:
  94.  
  95. sudo nano /etc/octoprint-tft-environment
  96.  
  97. Address: http://ocotpi.local
  98. API key: Find your api key from the setting menu via web browser
  99. Config file location: /home/pi/octoprint/
  100. Theme location: /opt/octoprint-tft/styles/default/
  101. Resolution: leave blank for 3.5"
  102.  
  103.  
  104. ********
  105.  
  106. Disable screen timeout
  107.  
  108. https://github.com/mcuadros/OctoPrint-TFT/issues/24
  109.  
  110. sudo nano /etc/X11/xorg.conf
  111.  
  112. Paste the following:
  113.  
  114. Section "ServerFlags"
  115. Option "blank time" "0"
  116. Option "standby time" "0"
  117. Option "suspend time" "0"
  118. Option "off time" "0"
  119. EndSection
  120.  
  121. ^x
  122. Y
  123. *******
  124.  
  125. Enable plugin
  126.  
  127. sudo ln -sf /lib/systemd/system/octoprint-tft.service /etc/systemd/system/display-manager.service
  128.  
  129. sudo systemctl set-default graphical.target
Advertisement
Add Comment
Please, Sign In to add comment