Cytron Technologies

Giờ làm việc: 8:00 - 17:00

Thứ 2 - Thứ 6 (trừ ngày lễ)

Hotline 0362917357 

4

Màn Hình Cảm Ứng OctoPi với Bộ Đồ Họa và Bộ Điều Khiển 3.5″ SPI

Disclaimer:

This guide is provided for information and as it is. Cytron Technologies will not be responsible for any damage or data lost during the installation process. Do backup your microSD card if you have any concern.

Hardware :

Step 1: Preparing MicroSD with OctoPi image

Load OctoPi’s image using the Raspberry Pi Imager, Setup the SSH and Wireless Network, WiFi Country, Locate settings, under Advanced Settings. 

1

For the operating System, go to Other specific purpose OS

2

Choose OctoPi.

33

For Storage, do choose the correct microSD card drive.

Press Ctrl + Shift + X to enable the Advanced Settings on Raspberry Pi Imager.

3

We set the hostname to octoscreen.local and enabled SSH with the password of “raspberry” for “pi” users. You can set what you want to, but do remember it as we need to use it later.

4

Of course, to ease the network connection, do put in your WiFi SSID and Password here.

5

And also the WiFi country and locale settings. Click SAVE to save your settings.

Click WRITE to write the image into the microSD card.

6
7

Now, the OctoPi Image has been set into the MicroSD.

For manual installation OctoPi

  1. Install https://github.com/guysoft/OctoPi
  2. Flash into MicroSD using https://www.balena.io/etcher/
  3. Configure your WiFi by editing octopi-wpa-supplicant.txt on the root of the flashed card when using it like a thumb drive.

Step 2: The Hardware

First, put Raspberry Pi 4 heatsink set which contain 3 pieces into the Raspberry Pi 4.

1
  • Aluminum heatsink with fin, dimension of 14mm x 14mm x 6mm, for main processor
  • Aluminum heatsink with fin, dimension of 14mm x 9mm x 5mm, for RAM chip 
  • Aluminum heatsink with fin, dimension of 9mm x 9mm x 5mm, thin, for Ethernet or USB chip
2

It will look like this on the Raspberry Pi 4.

Next, stack the  3.5-inch TFT LCD onto the Raspberry Pi 4 Model B board.

2

Make sure the GPIO-pin is aligned.

Put both RPi and the screen with the cooling fan into a casing.

3

It will look like this

Insert the microSD card into the microSD card slot.

Lastly, power up the Raspberry Pi with the power adapter.

Step 3: Accessing the OctoPi using SSH

Now on your laptop or computer, you must use a tool to login to OctoPi via SSH. I am using PuTTY. You can use other tools such as Powershell or VScode. You can download from the links if there is none available.

At this point, the LCD should just light up without any graphics or text. As we have yet to install the graphics driver.

1

With the “Advanced Settings” that have been configured earlier, the Raspberry Pi connects to your WiFi network. You can use an IP Scanner to scan the potential IP address of the Raspberry Pi. But since we have configured the SSH Host name, we will use that in PuTTY to create a connection.

2

Put the hostname into PuTTY and Click “Open”.

3

If the Raspberry Pi has connected to the WiFi network successfully, and the hostname is correct, you should be prompted with a Security Alert, first time only.

Click YES to proceed.

4

Key-in “pi” and Enter “raspberry” as the password for SSH, if that is what you have configured just now.

5

You are now logged into the OctoPi on the Raspberry Pi remotely via SSH. Meanwhile, since there is an IP address, you can now login to the octopi web interface to setup the Octopi like you usually do.

Step 3: Accessing the OctoPi using SSH

Now on your laptop or computer, you must use a tool to login to OctoPi via SSH. I am using PuTTY. You can use other tools such as Powershell or VScode. You can download from the links if there is none available.

At this point, the LCD should just light up without any graphics or text. As we have yet to install the graphics driver.

1

With the “Advanced Settings” that have been configured earlier, the Raspberry Pi connects to your WiFi network. You can use an IP Scanner to scan the potential IP address of the Raspberry Pi. But since we have configured the SSH Host name, we will use that in PuTTY to create a connection.

2

Put the hostname into PuTTY and Click “Open”.

3

If the Raspberry Pi has connected to the WiFi network successfully, and the hostname is correct, you should be prompted with a Security Alert, first time only.

Click YES to proceed.

4

Key-in “pi” and Enter “raspberry” as the password for SSH, if that is what you have configured just now.

5

You are now logged into the OctoPi on the Raspberry Pi remotely via SSH. Meanwhile, since there is an IP address, you can now login to the octopi web interface to setup the Octopi like you usually do.

Step 4: Updating Raspberry Pi OS

We need to update the Raspberry Pi OS

sudo apt update

sudo apt full-upgrade

Press y and Enter, for yes to proceed.

1

Depending on the data and internet connection speed, this process might take several minutes.

2

sudo reboot
Reboot the OctoPi.

3

It might ask for the password again, just key in “raspberry” and press Enter.

Step 5: Install the 3.5” TFT Driver

You need to restart the session in PuTTY and login into octoscreen.local again.

1
2

Install LCD graphic driver:

sudo rm -rf LCD-show

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

chmod -R 755 LCD-show

cd LCD-show/

sudo ./LCD35-show

3

This driver is LCD specific, this tutorial is based on this LCD: https://www.cytron.io/p-3.5-inch-tft-touch-screen-for-rpi-3b-3b-plus-4b

4

The command of sudo ./LCD35-show will auto reboot the OctoPi and you will need to SSH back in.

However, the 3.5 screen will show text after this reboot.

5

Once SSH comes back in, continue with the following steps:

sudo nano /boot/config.txt

There might already be the following text at the bottom of config.txt file, if so, please edit the parameters accordingly. Else please add all these text at the bottom of the text. 

disable_overscan=1

framebuffer_width=800

framebuffer_height=533

hdmi_cvt 800 533 60 6 0 0 0

6

Press Ctrl + O then Enter. Press Ctrl + X to save and exit the file editor.

Now reboot

sudo reboot now

Restart your SSH and log back in.

Step 6: Install X11

sudo apt-get install libgtk-3-0 xserver-xorg xinit x11-xserver-utils

And you will most likely to have error messages

1

sudo apt-get update –fix-missing
sudo apt-get install -f

Press y and ENTER to continue

2

sudo reboot

Now reboot and SSH back in.

sudo apt-get install libgtk-3-0 xserver-xorg xinit x11-xserver-utils

Press y and ENTER to continue installing

It should be installed properly this round.

sudo reboot

Now reboot and SSH back in.

sudo apt-get install git build-essential xorg-dev xutils-dev x11proto-dri2-dev

3

Press y and ENTER to continue

sudo reboot

Now reboot and SSH back in.

sudo apt-get install libltdl-dev libtool automake libdrm-dev

Press y and ENTER to continue

4

sudo reboot

Now reboot and SSH back in.

git clone https://github.com/ssvb/xf86-video-fbturbo.git

cd xf86-video-fbturbo

autoreconf -vi

5

./configure –prefix=/usr

6

make

7

sudo make install

8

sudo cp xorg.conf /etc/X11/xorg.conf

9

sudo reboot

Now reboot and SSH back in.

Step 7: Install OctoScreen

wget https://github.com/Z-Bolt/OctoScreen/releases/download/v2.7.3/octoscreen_2.7.3_armhf.deb

1

sudo dpkg -i octoscreen_2.7.3_armhf.deb

2

sudo nano /etc/octoscreen/config

Change

OCTOSCREEN_RESOLUTION=800×400

to

OCTOSCREEN_RESOLUTION=800×533

Ctrl + O and Enter then Ctrl + X

Save and exit nano.

sudo reboot

Now reboot and SSH back in.

Step 8: Configure OctoPi Desktop GUI

sudo raspi-config

To configure Raspberry Pi Desktop 

1
2
3
4
5

You might get an error, not to worry, just press OK and exit from the config.

sudo apt-get install lightdm

6
8
7

Or

8

Choose octoscreen and press Enter

9

sudo reboot

Now reboot and SSH back in.

Step 9: Install fbcp

sudo apt-get -y install cmake

git clone https://github.com/tasanakorn/rpi-fbcp

cd rpi-fbcp

mkdir build

cd build

cmake ..

1

make

2

sudo install fbcp /usr/local/bin/fbcp

sudo nano /etc/rc.local

3

Add /usr/local/bin/fbcp

Before exit 0

Ctrl + O and Enter then Ctrl + X

sudo reboot

Now reboot and SSH back in.

Step 9: Install fbcp

sudo apt-get -y install cmake

git clone https://github.com/tasanakorn/rpi-fbcp

cd rpi-fbcp

mkdir build

cd build

cmake ..

1

make

2

sudo install fbcp /usr/local/bin/fbcp

sudo nano /etc/rc.local

3

Add /usr/local/bin/fbcp

Before exit 0

Ctrl + O and Enter then Ctrl + X

sudo reboot

Now reboot and SSH back in.

Step 10: Final

After reboot, octoscreen should be appeared.

4

Remember to connect the Raspberry Pi to a 3D Printer and Configure the OctoPi Web Interface. Else the “System” will not be working on OctoScreen.

Hope this helps and please follow exactly the command line and check the results. We have verified the above methods with a fresh OctoPi for several attempts and it is working fine. 

Credits goes to following references:

Theo dõi
Thông báo của
guest
0 Comments
Phản hồi nội tuyến
Xem tất cả bình luận