A TFT Screen with Octoprint

Having the printer running with the WIFI is really good, so in addition there is a way to take the file directly to the screen and print it is even better. You will also have all the information throughout the printing, printing time, temperature and many other utilities. All this, right at your fingertips.

1. The necessary equipment.

2. Preparing the SD card

Download the “SD Card Formatter” software

Then click “Accept” at the bottom of the page.

To format the SD card, it’s best to select the “Overwrite format” option, then click “Format.”

3. Download the latest version of Octoprint

4. You’re going to decompress the file

Once decompressed, you’ll have a file with the extension.” IMG”

5. You need to download ETCHER

Etcher is the software that will allow you to copy the Octoprint image on the SD card

Insert your SD card into the player and then click “Select Image”, you will select the name of the file that was decompressed earlier in procedure No. 4 And then you click “Flash!”

The SD card must be removed from the reader and then re-inserted because it will no longer be visible to the computer once the image is transferred.

When you insert the SD card, you will be asked to format the SD card, but don’t do so, you only have to close the window in question.

6. WIFI setup

Now you have to prepare your raspberry for wireless connection (WIFI).

In your SD card, you should open the “octopi-wpa-supplicant” file with NOTEPAD only (Use a publisher that won’t alternate the contents of the file).

Find these lines to fit your wireless network.

##WPA/WPA2 secured
# network={
# ssid=”put SSID here”
# psk=”put password here”
# }

You have to remove the “O” and then replace “put SSID here” with the name of your WIFI network and replace “put password here” with the password. Where there are two (WPA/WPA2 secured” opposite you have to leave them.

It should look like this:

##WPA/WPA2 secured
network={
ssid=”Bell086″
psk=”12345abcde”
}

Save on the SD card and you’re done.

You can insert the SD card into the Raspberry, put the screen on and plug the raspberry into the USB power cord.

You’re not going to see anything on the screen and that’s normal…

7. You have to find the Raspberry IP

Download IP Scanner

Click “Analyze” and spot your Raspberry’s IP. See the example above. You’ll see Raspberry Pi Foundation or/and “octopri.” you’re going to have IP to connect to Putty.

8. You’re going to need PuTTY

Official website: https://www.putty.org/

In “Host Name (or IP adress)” type your Raspberry’s IP address, then click “Open” then another window will open and you click “Yes.” Another window opens and you will be asked the “login ace” you will write pi in tiny.

Afterwards you will be asked for the password and it’s raspberry

Then click “Enter”

You’re not going to see the password write as you type, but no problem everything is fine so far.

You should see that window.

9. We are ready to do the installation

I’m not going to explain what the command lines mean but only when there’s something special to do.

After each restart you will be asked for the password after writing the command line.

After copying a command line, you have to click the right button of the mouse to stick in PuTTY. The CTRL-C and CTRL-V keys don’t work.

Here are the command lines:

sudo /home/pi/scripts/install-desktop

You still have to enter the password(raspberry)

Press a button to continue

Write“yes”and then tap on the“Enter”button

sudo reboot

Click OK and wait about a minute.

Click with the right mouse button at the top of the window to restart the PuTTY server. Click “Restart Session”

Once restarted you must enter the “login as” (pi) and the password (raspberry).

sudo apt-get install xinit

Get the password again (raspberry).

You will be asked if you want to continue then, press “y” for yes.

sudo apt-get install x11-xserver-utils

sudo apt-get install xserver-xorg-input-evdev

sudo mv /usr/share/X11/xorg.conf.d/40-libinput.conf ~/

wget https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/adafruit-pitft.sh

chmod +x adafruit-pitft.sh

sudo ./adafruit-pitft.sh

For the 3.5″ PiTFT choose the #4 then tap on the “Enter” button

Then select the #3 and tap on the “Enter” button

Then select n for no

Then select y for yes

Then select n for no, then you’ll select y for yes

Press “y” to restart the Raspberry

Wait another minute and then restart a session with Putty. You must enter the “login ace” (pi) and the password (raspberry).

sudo dpkg -r –force-depends lightdm

Get the password again (raspberry).

wget https://github.com/darksid3r/OctoPrint-TFT/releases/download/1.1/octoprint-tft_stretch_1.1.git91fa718-1_armhf.deb

sudo dpkg -i octoprint-tft_stretch_1.1.git91fa718-1_armhf.deb

10. It’s time to set up Octoprint in Windows

Enter your raspberry’s IP into your web browser’s address bar and tap back

Click “Next”

Enter a username and password, then click “Keep Access Control Enable” and click “Next”

Click “Enable Anonymous Usage Tracking” and click “Next”

Click “Enable Connectivity Check” and click “Next”

Click “Enable Plugin Blacklist Processing” and click “Next”

Here you have to write the name of your printer and the model if there is one

Click on the tab next to “General” to get the other details of your printer with the dimensions of the tray.

And that’s it complete, click “Finish”

Click “Connect”

It’s all well and good, but your screen doesn’t work yet, there are still a few small lines and everything will go in order.

11. Don’t make a mistake in this part

To begin with, we’re going to open a text editor in PuTTY with the following command:

sudo nano /etc/octoprint-tft-environment

Now go back to your Internet browser (Octoprint) and click on the small key to open the Octoprint settings

Go to the API tab and copy the Key API code. Click on the small file opposite the red arrow to write it in a file at the next step.

Now you have to write your Key API in the open file a little earlier. The positioning of the cursor does not work with the mouse, you have to use the arrows of the keyboard. To copy is the right button of the mouse.

Replace YOUR_APIKEY_GOES_HERE with your Key API

Add “http://127.0.0.1:5000” at the end of “OCTOPRINT_HOST”

Add “480×320” at the end of “OCTOPRINT_TFT_RESOLUTION”

Here’s what it should look like when completed:

To save made CTRL-X then press “y” and return to save the file, then tap on the key“Enter”

sudo reboot

Wait another minute and then restart a session with Putty. You must enter the “login ace” (pi) and the password (raspberry).

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

chmod -R 755 LCD-show

cd LCD-show/

sudo ./LCD35-show

Get the password again (raspberry).

And that’s it… Your Raspberry will restart automatically.

Make sure your printer is connected to your Raspberry via the USB port.

If the “octoprint-tft-environment” file is completely empty then you have to write the following lines to be able to write your data.

#Location of the OctoPrint’s config.yaml file. If empty the file will
#be search at the pi home folder or the current user. Only used for locally
#installed OctoPrint servers.
OCTOPRINT_CONFIG_FILE
#OctoPrint HTTP address, example
http://localhost:5000, if OctoPrint is
#locally installed will be read from the config file.
OCTOPRINT_HOST=http://127.0.0.1:5000
#OctoPrint-TFT expects an API key to be supplied. This API key can be either
#the globally configured one or a user specific one if “Access Control.”
#http://docs.octoprint.org/en/master/api/general.html, if OctoPrint is
#locally installed will be read from the config file.
OCTOPRINT_APIKEY=
#Location of the application theme.
OCTOPRINT_TFT_STYLE_PATH/opt/octoprint-tft/styles/default/
#Resolution of the application, should be configured to the resolution of your
#screen, for example 800×480. By default 480×320.
OCTOPRINT_TFT_RESOLUTION-480×320

Enjoyed the Article? Share it!

Facebook
Twitter
LinkedIn
Imprimer