Connecting TouchUI to a Raspberry pi 7 inch touchscreen

#1

Hello guys thanks for the welcome into the forum, i was wondering if you guys could give me a tip on how to connect my Raspberry pi touchscreen to Octoprints touchUI plugin, I have all of the graphical interface files downloaded already to the Raspberry pi so I think I’m good with all that. Any tip will be greatly accomplished.

Derek

Raspberry Pi or Linux Distro?
#2

Search the forum for "touchui review" where I'm discussing this. Read the Overview section.

#3

Ok I just read through most of that now I’m even more confused...:smile: hahahaha

#4

It wasn't a step-by-step tutorial (I have many of those but this wasn't one of them).

#6

What would you say is the first step I need to make to get my TouchUI to be visible on my touchscreen?

#7

A little web searching would have gotten you this, btw.

  1. Do the standard OctoPi install to a microSD, configure the card for your wi-fi and then boot up the Raspi with it
  2. Install the Raspbian Pixel Desktop from the ~/scripts folder making sure to use sudo before that
  3. Download and run the Adafruit TFT installation script
  4. Use raspi-config to boot automatically into the Desktop as pi
  5. Reboot
  6. Locally on the Raspi, install the Chromium browser with sudo apt-get install chromium-browser
  7. Modify the Desktop panel to auto-hide
  8. Install the TouchUI plugin to OctoPrint
  9. Bring up Chromium on the TFT display, go to http://localhost and go into full screen mode

It will be helpful during some of this to have a keyboard/mouse on the Raspberry Pi.

#8

Hay man thanks so much for this, your the best!

#9

I don’t want to sound like an idiot or anything but I’m still very new to all this (learning stages) but how do I download the adafruit from the Raspberry pi touchscreen? Or do I do that on my desktop?

#10

Well, it's pretty much what they suggested in that provided link. You're doing this on the Raspi itself, having remoted into it over ssh, for example:

cd ~
wget https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/adafruit-pitft.sh
chmod +x adafruit-pitft.sh
sudo ./adafruit-pitft.sh

The first command puts you in the pi user's home directory. The second command pulls the script from the Internet. The third command marks the file so that it can be run. The fourth command will run that as the root user (requiring the "raspberry" password for the pi user to be promoted first).

The script will ask you some questions about the size/type of TFT screen, noting that Adafruit usually just sells the screens that are popular on the market. There are two main styles of touchscreen though: resistive and capactive. Just get that part right.

The trickiest questions they'll ask are related to what you want to show on the screen. I seem to remember that you want to mirror the console.

Here is an example collection of responses which I once did and would be similar to what you should do for the last two questions:

sudo ./adafruit-pitft.sh
# 3. PiTFT 2.8" capacitive touch (240x320)
# 3. 270 degrees (landscape)
# Would you like the console to appear on the PiTFT display? [y/n] n
# Would you like the HDMI display to mirror to the PiTFT display? [y/n] y
# REBOOT NOW? [y/N] y
#11

Thanks, I also noticed that they don’t have a selection for the 7” touchscreen, what do I do with that?

#12

If this is the Raspberry Foundation 7" display, the drivers may already be loaded by default in Raspbian, btw.

Read through this, however. The one with "ui" in the title is likely your driver but do those in order, as listed.

#14

Just a quick update, everything downloaded perfectly thanks so much for your help! Looks like I’m now accessing Octoprint through Chromium now which is much more then I had before! The only thing that still aggravates me is when I first turn on my printer the Raspberry pi boots up and ask me for the user name and password, is there a way to stop this, I really don’t want to keep a keyboard hooked up to my machine...hahaha

#15

Assuming that you're not port-forwarding your OctoPrint instance to the network (nobody would ever do that) then you can disable or otherwise turn off the ForceLogin bundled plugin.

Here's another post I did on here which shows how to auto-load Chromium in kiosk mode.

#16

Thanks, so what your saying is to run this command... sudo raspi-config to make it auto-boot into the Desktop.?

#17

Yes. That will get it to bring up the X windows (Desktop/PIXEL/LXDE) system by running startx as I remember.

The rest of that link, though, is the part that should auto-start Chromium in kiosk (full-screen) mode for you when you boot it up (and auto-login as pi).

1 Like