Install OctoPrint
https://octoprint.org/download/
Update all packages
SSH into Pi and run:
sudo apt-get update
sudo apt-get upgrade
Download and install display driver(more info here)
Run:
1 2 3 4 5 6 7 8 9 |
git clone https://github.com/Elecrow-keen/Elecrow-LCD35.git` cd Elecrow-LCD35 sudo ./Elecrow-LCD35 cd Elecrow-LCD35 sudo dpkg -i -B xinput-calibrator_0.7.5-1_armhf.deb |
Edit 99-calibration.conf
To open 99-calibration.conf run:
sudo nano /etc/X11/xorg.conf.d/99-calibration.conf
Apend following lines
1 2 3 4 5 |
Section "Device" Identifier "touchscreen" Driver "fbdev" Option "fbdev" "/dev/fb1" EndSection |
Press CTRL + O to save and CTRL + X to exit.
Install TouchUI
Access OctoPrint through web interface and install TouchUI plugin
To setup TouchUI autostartrun:
git clone https://github.com/BillyBlaze/OctoPrint-TouchUI-autostart.git ~/TouchUI-autostart/
sudo ~/TouchUI-autostart/helpers/install
Restart Pi
sudo reboot
Pi should boot into TouchUI interface.
## Calibrate display
Run to display calibration screen:
DISPLAY=:0.0 xinput_calibrator
Touch all four point on screen with stylus. Result should look similar to following image.
Copy calibration values eg. "248 4048 3842 200"
Open 99-calibration.conf
:
sudo nano /etc/X11/xorg.conf.d/99-calibration.conf
Edit calibration values you got from previous procedure.
Press CTRL + O to save and CTRL + X to exit.
Rotating screen
If you need to rotate screen 180 degrees, so usb ports on Pi are facing left, continue with:
sudo nano /boot/config.txt
Add rotate=270
inside following line
dtoverlay=elecrow35a,rotate=270,speed=22000000,fps=60
Press CTRL + O to save and CTRL + X to exit.