duminică, 29 noiembrie 2020

Octoprint-TFT with 3.5 inch touchscreen - 3.5inch RPi LCD 320x480 XTP2046 install and configure for Octopi 3D printer by icXu

 Spent hours figuring out how to configure a 3.5" touchscreen to work with Octoprint-TFT, for my new 3D printer. I have found it very difficult to find any centralised data, therefore I have put all the necessary steps below;






  • Download the latest OctoPrint version (actual version: 2019-09-26-octopi-buster-lite-0.17.0.img):
https://octoprint.org/download/


  • Download the BalenaEtcher:
https://www.balena.io/etcher/


  •  SSH and telnet client - PuTTY:
https://www.putty.org/

  • Test editor Notepad++ :

https://notepad-plus-plus.org/downloads/


  • Flash the Octoprint image (the downloaded.img file), using the BalenaEtcher, on the SD card







  • Open the new flashed card and edit the octopi-wpa-supplicant.txt , introduce your WIFi credentials, and make sure that you uncomment the text by removing #.
Note: do not use WordPad or TextEdit, as it may change the document format, use Notepad++Atom or VSCode instead.





uncommented:





  • Insert the SD card and power up the raspberry pi.


  • Log into your Pi via SSH (it is located at octopi.local), the default username is “pi”, the default password is “raspberry”. 



Please see the OctoPi’s readme webpage https://github.com/guysoft/OctoPi#how-to-use-it



  • Run the following commands, one by one, in order to update the os: 

sudo apt-get update


sudo apt update
sudo apt dist-upgrade

Press y then enter:  



sudo apt clean


sudo reboot


At this point, we have a fully working Octopi without screen functionality, which can be accessed from the browser at http://octopi.local/






  • After reboot open the configuration tool:
 and navigate to System Options - Boot / Auto Login- and select Console Auto Login

sudo raspi-config

Note: 
While you are here you can enable the camera (user Interface section) if you planning to use one.











  • LCD drivers installation:

Download the files using the below command: 

git clone  https://github.com/waveshare/LCD-show.git 


Then install them: 

cd LCD-show/

sudo chmod +x LCD35-show

sudo ./LCD35-show



Press y then wait to finish the install- it will reboot and the screen should be functional


At this point, the display should be up and running.

  •  Following the display setup, we need to install the UI (user interface), paste the below commands one by one:


sudo apt-get install libgtk-3-0

sudo apt install xserver-xorg xinit xserver-xorg-video-fbdev


wget  https://github.com/mcuadros/OctoPrint-TFT/releases/download/v0.1.2/octoprint-tft_0.1.2-1.stretch_armhf.deb 

sudo dpkg -i octoprint-tft_0.1.2-1.stretch_armhf.deb

sudo systemctl set-default graphical.target

sudo mv /usr/share/X11/xorg.conf.d/99-fbturbo.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf.old



Now the TFT should be live! However, we need to reboot it: 

sudo reboot


  • Using your PC browser navigate to http://octopi.local/ and run the setup wizard:



  • Finish the setup then update the OctoPrint


Make sure that the power supply is suitable for your model, otherwise will not run the update.


  • After the update is completed navigate to the plugins and enable the virtual printer, itis will help you to test the screen without connecting it to the printer: 


Then click connect:

Now the Octoprint-TFT interface should be accessible and the setup can be safely tested: 





Screen issues: 

  • The display can be rotated using the below command:

cd LCD-Show
sudo ./LCD35-show 270
sudo reboot


  • If still displays incorrectly we can open the configuration file:


sudo nano /boot/config.txt


and paste the following line: 

dtoverlay=waveshare35a:rotate=270

  • 3D printed case (needs alteration)
https://www.thingiverse.com/thing:1422963

  • Screen manufacturer website:
https://www.waveshare.com/product/3.5inch-RPi-LCD-A.htm



Hope this helps, 
icXu.










Niciun comentariu:

Trimiteți un comentariu