Installing OctoPrint and Octoprint-TFT to control your 3D Printer, with a touch screen!
I recently installed and setup OctoPrint on a Raspberry Pi B3 + to use with my new Ender 3, I figured I would share a write up I made as I went through the install and configuration.
Also, I am using the following hardware
- Raspberry Pi 3 B+
- 24v to 5v DC Buck converter
- Noctua 40mm cooling fan
- Raspberry Pi camera (mine is v1.3, soon to upgrade)
- 610mm Raspberry Pi camera ribbon cable
- 3.5inch 320x480 Touch Screen LCD
- 3D Printed Enclosure for Pi and TouchSreen
- Left angle 12 inch Mini USB to USB
- MicroSD to SD card adapter
First, we need to download OctoPi and create a MicroSD image from their downloads.
Once you have the most recent version of OctoPi downloaded and ready, insert the MicroSD card you will be using into your computer and upload the image to it.
A popular and simple tool to do so is Etcher.
Below is taken from the OctoPrint.org/download guide, under the Getting Started with OctoPi.
Please follow these steps after downloading
Unzip the image and install the contained
.imgfile to an SD card like any other Raspberry Pi image.
Configure your WiFi connection by editing
octopi-wpa-supplicant.txton the root of the flashed card when using it like a thumb drive. Important: Do not use WordPad (Windows) or TextEdit (MacOS X)for this, those editors are known to mangle the file, making configuration fail. Use something like Notepad++, Atom or VSCode instead or at the very least heed the warnings in the file.
Note: This changed with OctoPi 0.15.0, earlier versions had you edit
octopi-network.txtwhich has a different format. This old method is no longer supported and the contents of this file will be ignored. Just use
Please also refer take a look at the full WiFi setup guide in the FAQ that also includes Troubleshooting tips.
Boot the Pi from the card.
Log into your Pi via SSH (it is located at
octopi.localif your computer supports bonjour or the IP address assigned by your router), default username is “pi”, default password is “raspberry”. Change the password using the
passwdcommand. You do not need to expand the filesystem, current versions of OctoPi do this automatically.
Access OctoPrint through
http://<your pi's ip address>. https is available too, with a self-signed certificate.
Please also refer to OctoPi’s README, especially the “How to use it” section.
Once your Raspberry Pi is booted and you are able to SSH into your device, we can now start to configure the touch screen, and other software.
To SSH or connect to your device, first be sure to complete the WiFi setup above, or connect with an ethernet cable into your Raspberry Pi.
You can then use Putty as an SSH client to connect to the Raspberry Pi / OctoPi installation.
The name you will connect to is octopi.local
First lets run some updates to get everything ready.
sudo apt-get update
sudo apt update
sudo apt dist-upgrade
sudo apt clean
We also need to setup autologin, to do so run
And navigate to Boot Options - Desktop CLI - and choose Console Auto Login
For my specific LCD, I was able to locate the manual and other details here
You can download and install the files with the following
git clone https://github.com/waveshare/LCD-show.git
sudo chmod +x LCD35-show
The device will reboot, once it's booted we can log back in and continue.
Next we can rotate the display with the following command.
cd LCD-Show sudo ./LCD35-show 270
Reboot your Raspberry Pi and make sure you get video on your LCD.
If your screen is not rotated correctly with the above command, do the following.
sudo nano /boot/config.txt
And change the line for your display to add :rotate=270 as shown below
Now that we have our LCD functional and working, lets install a user interface.
First is the X desktop environment, then Touch-TFT and its requirements
sudo apt-get install libgtk-3-0
sudo apt install xserver-xorg xinit xserver-xorg-video-fbdev
Once X is installed, we can follow up with the installation of OctoPrint-TFT
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
Lastly we need to remove the 99-fbturbo.conf file from our Xorg directory.
sudo mv /usr/share/X11/xorg.conf.d/99-fbturbo.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf.old
Now on reboot OctoPrint-TFT should load and start attempting to connect
Next we can enable the Raspberry Pi camera, to do so get into the raspi config menu;
Navigate to option 5 Interfacing Options, and enable the Camera under option 1.
I also like to disable the camera LED, this can be done with the following;
sudo nano /boot/config.txt
and add the following line
On next reboot the camera LED will be disabled.
I also modified my Raspberry Pi to connect to a network share housing gcode files for my printer, to do so I did the following.
sudo nano /etc/fstab
And added the following line (modify for your network and setup)
//server/share/Data/3D/gcode /home/pi/.octoprint/uploads/_network cifs username=pi,password=raspberry,domain=workgroup 0 0
//server will be the computer your network share is located and /share is the shared folder.
Some users have reported having to specify their cifs version for this to work correctly.
I've also noted, uploading files to the shared folder requires a refresh of the WebUI of OctoPrint for them to display in the file menu if you have navigated to it in your current session.
Upon reboot, it will mount my network share from \\Server\share to the Ocotprint Uploads folder on my Raspberry Pi.
A full list of issues can be found in the official OctoPrint-TFT Github
OctoPrint-TFT fails to load.
Check the following files
And look for any invalid characters or formatting of the text
I came across a discussion on Social Media regarding OctroPrint-TFT that linked backed to a fork of the Original.
It looks like in this build it includes a working fix for the screen blanking issue that plagues the current build.
I will be testing this build and and looking to utilize it and update the instructions (or supplement them for an option)
(Place holder for updated v2 instructions to utilize the darksid3r build as an additional option)