상세 컨텐츠

본문 제목

034. Raspberry Pi 라즈베리 파이 - RASBIAN 3.5인치 터치스크린 사용하기 (raspbian 3.5 inch touch TFT LCD use)

raspberrypi/raspbian

by ZelKun 2018. 9. 8. 19:32

본문

반응형


전부터 고민만하다가 3.5인치 터치 스크린을 처음 구입했습니다

사실 초기 설정 뒤로는 전부 원격접속해서 쓰느라 필요가없었는데

3D 프린터 제어용으로 구입해서 설정을 잡아줬습니다



관련글

[embedded/3D Printer] - Raspberry Pi 라즈베리파이 - Anet A8 연결 1부:octoprint install on Raspbian (Connect Anet A8 and Pi3 with octoprint)

[embedded/3D Printer] - Raspberry Pi 라즈베리파이 - Anet A8 연결 2부: octoprint setting (Connect Anet A8 and Pi3 with octoprint)

[embedded/3D Printer] - Raspberry Pi 라즈베리파이 - Anet A8 연결 3부:Camera setting (Connect Anet A8 and Pi3 with octoprint)

[embedded/3D Printer] - Raspberry Pi 라즈베리파이 - Anet A8 연결 4부:Octoprint add on AstroPrint Plugin

[embedded/3D Printer] - Raspberry Pi 라즈베리파이 - Anet A8 연결:octopi (octoprint img) install (Connect Anet A8 and Pi3 with octopi)

 


구입제품: 3.5" LCD TFT Touch Screen Display, https://www.aliexpress.com/item/Best-Price-Original-3-5-LCD-TFT-Touch-Screen-Display-for-Raspberry-Pi-2-Model-B/32508151978.html?spm=a2g0s.9042311.0.0.5f874c4dpoivEV

 

박스 개봉


LCD 깨질세라 포장은 엄청 잘해놨네요

 


pi 조립해줍니다

프린터로 pi케이스를 만들까 고민했는데 케이스 세트 주문하니 편하네요

 

LCD 안넣고 나사를 조이면 조립이 안되지만 조립이니..

오른쪽이 완성

 


LCD 연결만하면 하얀화면에 아무것도 안나오니 드라이버를 설치해야합니다

* 구입한거랑 설치한 드라이버가 달라서 하단에 다시 설치하니 참고하시길

 

드라이버 자세한 자료는 아래 사이트에 있네요


출처: https://www.waveshare.com

 


출처: https://www.waveshare.com

 

드라이버 LCD-show-180817.tar.gz 링크를 따서 Pi에서 다운받아줍니다

 

  • 드라이버 다운로드

편의상 utils 디렉토리에서 작업했습니다

mkdir utils

cd utils

wget https://www.waveshare.com/w/upload/1/1e/LCD-show-180817.tar.gz

pi@octopi:~ $ ls

Desktop    Downloads      Music      oprint    Public   Templates

Documents  mjpg-streamer  OctoPrint  Pictures  scripts  Videos

pi@octopi:~ $ mkdir utils

pi@octopi:~ $ cd utils

pi@octopi:~/utils $ wget https://www.waveshare.com/w/upload/1/1e/LCD-show-180817.tar.gz

--2018-09-08 15:27:43--  https://www.waveshare.com/w/upload/1/1e/LCD-show-180817.tar.gz

Resolving www.waveshare.com (www.waveshare.com)... 104.24.30.35, 104.24.31.35, 2400:cb00:2048:1::6818:1f23, ...

Connecting to www.waveshare.com (www.waveshare.com)|104.24.30.35|:443... connected.

HTTP request sent, awaiting response... 200 OK

Length: 117578 (115K) [application/octet-stream]

Saving to: ‘LCD-show-180817.tar.gz’

 

LCD-show-180817.tar 100%[===================>] 114.82K   269KB/s    in 0.4s    

 

2018-09-08 15:27:45 (269 KB/s) - ‘LCD-show-180817.tar.gz’ saved [117578/117578]

 

pi@octopi:~/utils $

wget으로 파일을 다운받고 앞축을 풀어줍니다

 

  • 앞축해제

tar -zxvf LCD-show-180817.tar.gz

pi@octopi:~/utils $ tar -zxvf LCD-show-180817.tar.gz 

LCD-show/

LCD-show/usr/

LCD-show/usr/share/

LCD-show/usr/share/X11/

LCD-show/usr/share/X11/xorg.conf.d/

LCD-show/usr/share/X11/xorg.conf.d/99-fbturbo.conf-HDMI

LCD-show/usr/share/X11/xorg.conf.d/99-fbturbo.conf

LCD-show/usr/share/X11/xorg.conf.d/45-evdev.conf

LCD-show/dtc.sh

 . . .

 

LCD-show/LCD35B-show

LCD-show/cmdline.txt-noobs

LCD-show/waveshare32b-overlay.dtb

LCD-show/LCD43-show

LCD-show/LCD4-show

LCD-show/LCD7-800x480-show

pi@octopi:~/utils $ 

 

앞축을 풀었으니 설치해야죠

 

  • 드라이버 설치

cd LCD-show

chmod -x LCD35-show

./LCD35-show

pi@octopi:~/utils $ cd LCD-show/

pi@octopi:~/utils/LCD-show $ chmod +x LCD35-show

pi@octopi:~/utils/LCD-show $ ./LCD35-show

[sudo] password for pi: 

Reading package lists... Done

Building dependency tree       

Reading state information... Done

The following NEW packages will be installed:

  xserver-xorg-input-evdev

0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.

Need to get 117 kB of archives.

After this operation, 169 kB of additional disk space will be used.

Get:1 http://ftp.harukasan.org/raspbian/raspbian stretch/main armhf xserver-xorg-input-evdev armhf 1:2.10.5-1 [117 kB]

Fetched 117 kB in 2s (53.8 kB/s)                 

Selecting previously unselected package xserver-xorg-input-evdev.

(Reading database ... 78361 files and directories currently installed.)

Preparing to unpack .../xserver-xorg-input-evdev_1%3a2.10.5-1_armhf.deb ...

Unpacking xserver-xorg-input-evdev (1:2.10.5-1) ...

Setting up xserver-xorg-input-evdev (1:2.10.5-1) ...

Processing triggers for man-db (2.7.6.1-2) ...

Reading package lists... Done

Building dependency tree       

Reading state information... Done

cmake is already the newest version (3.7.2-1).

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

CMake Error: The current CMakeCache.txt directory /home/pi/utils/LCD-show/rpi-fbcp/build/CMakeCache.txt is different than the directory /home/pi/LCD-show/rpi-fbcp/build where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt

CMake Error: The source "/home/pi/utils/LCD-show/rpi-fbcp/CMakeLists.txt" does not match the source "/home/pi/LCD-show/rpi-fbcp/CMakeLists.txt" used to generate cache.  Re-run cmake with a different source directory.

/bin/sh: 1: cd: can't cd to /home/pi/LCD-show/rpi-fbcp/build

CMakeFiles/fbcp.dir/build.make:111: recipe for target 'CMakeFiles/fbcp.dir/depend' failed

make[2]: *** [CMakeFiles/fbcp.dir/depend] Error 2

CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/fbcp.dir/all' failed

make[1]: *** [CMakeFiles/fbcp.dir/all] Error 2

Makefile:83: recipe for target 'all' failed

make: *** [all] Error 2

Selecting previously unselected package xinput-calibrator.

(Reading database ... 78370 files and directories currently installed.)

Preparing to unpack .../xinput-calibrator_0.7.5-1_armhf.deb ...

Unpacking xinput-calibrator (0.7.5-1) ...

Setting up xinput-calibrator (0.7.5-1) ...

Processing triggers for desktop-file-utils (0.23-1) ...

Processing triggers for mime-support (3.60) ...

Processing triggers for man-db (2.7.6.1-2) ...

LCD configrue 0

Connection to 192.168.0.22 closed by remote host.

Connection to 192.168.0.22 closed.

admin:~ admin$ 

설마설마 했는데... 설치하고나니 pi 자동으로 재부팅이 되네요

출력중이였는데...

 

근데 재부팅해도 백지화면...

 

...?

이런 드라이버를 다시 찾아야겠네...

메뉴얼에 OS설치부분만 언급해서 제대로 안봤는데

사이트 URL 하나적혀있네요

 


 

 

출처: http://en.kedei.net

 

Raspberry 클릭


출처: http://en.kedei.net

뭐가 이리 불친절하고 다양해...

 


 LCD후면에 6.3이라고 써있으니 6.3 드라이버를 받아봄...

wget http://en.kedei.net/raspberry/v6_1/LCD_show_v6_1_3.tar.gz

pi@octopi:~/utils $ wget http://en.kedei.net/raspberry/v6_1/LCD_show_v6_1_3.tar.gz

--2018-09-08 16:52:32--  http://en.kedei.net/raspberry/v6_1/LCD_show_v6_1_3.tar.gz

Resolving en.kedei.net (en.kedei.net)... 47.88.103.98

Connecting to en.kedei.net (en.kedei.net)|47.88.103.98|:80... connected.

HTTP request sent, awaiting response... 200 OK

Length: 121436682 (116M) [application/x-gzip]

Saving to: ‘LCD_show_v6_1_3.tar.gz’

 

LCD_show_v6_1_3.tar  90%[=================>  ] 105.36M  89.3KB/s    in 5m 17s  

 

 

Cannot write to ‘LCD_show_v6_1_3.tar.gz’ (Read-only file system).

pi@octopi:~/utils $ 

 

근데 파일 받자마자 input/output error 함께 파이 먹통....

하아...... 중국산 SD카드는 안사는 걸로...(결국은 SD카드사망...)


다시... octopi설치부터 해야되다니!!


다시 앞축 해제

tar -zxvf LCD_show_v6_1_3.tar.gz

pi@octopi:~ $ ls

mjpg-streamer  OctoPrint  oprint  scripts  utils

pi@octopi:~ $ cd utils/

pi@octopi:~/utils $ ls

LCD_show_v6_1_3.tar.gz

pi@octopi:~/utils $ tar -zxvf LCD_show_v6_1_3.tar.gz 

LCD_show_v6_1_3/

LCD_show_v6_1_3/LCD_hdmi

LCD_show_v6_1_3/hdmi/

LCD_show_v6_1_3/hdmi/LICENSE.oracle

LCD_show_v6_1_3/hdmi/start_db.elf

LCD_show_v6_1_3/hdmi/bcm2708-rpi-cm.dtb

LCD_show_v6_1_3/hdmi/config.txt

LCD_show_v6_1_3/hdmi/bcm2708-rpi-0-w.dtb

LCD_show_v6_1_3/hdmi/fixup_x.dat

 

 . . .

 

LCD_show_v6_1_3/lcd_35_v/overlays/dwc2.dtbo

LCD_show_v6_1_3/lcd_35_v/bcm2708-rpi-b.dtb

LCD_show_v6_1_3/lcd_35_v/bcm2710-rpi-cm3.dtb

LCD_show_v6_1_3/lcd_35_v/bcm2835-rpi-a-plus.dtb

LCD_show_v6_1_3/LCD35_v

pi@octopi:~/utils $ 

 

  • 드라이버설치

cd LCD_show_v6_1_3

./LCD35_v

pi@octopi:~/utils $ cd LCD_show_v6_1_3/

pi@octopi:~/utils/LCD_show_v6_1_3 $ ./LCD

LCD35_v      LCD_backup   LCD_hdmi     LCD_restore  

pi@octopi:~/utils/LCD_show_v6_1_3 $ ./LCD35_v 

[sudo] password for pi: 

 

raspberrypi-kernel set on hold.

Connection to 192.168.0.22 closed by remote host.

Connection to 192.168.0.22 closed.

admin:Downloads admin

역시나 자동으로 재부팅

 

성공!

 

 

참고:


반응형

관련글 더보기

댓글 영역