0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

1.3inch LCD HAT設定

Posted at

趣旨

SeedSigner用に買ったツールでRetroPieを起動できるのに気づいたので、ハードウェアのドライバを探し出して必要なライブラリを全部インストールして動くようにしました。

忘れたら悲しくなるのでそうならないように記録に残します。

公式ページ

バージョンの関係か公式ページの通りにやると必ずエラーになったので、既に同じツールで成功された方の公開動画も参考にしました。

以下コマンドです。

wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.71.tar.gz
tar zxvf bcm2835-1.71.tar.gz 
cd bcm2835-1.71/
sudo ./configure && sudo make && sudo make check && sudo make install
sudo apt-get update
sudo apt-get install python-pip
sudo pip install RPi.GPIO
sudo pip install spidev
sudo apt-get install p7zip-full -y
wget https://files.waveshare.com/upload/b/bd/1.3inch_LCD_HAT_code.7z
7z x 1.3inch_LCD_HAT_code.7z -r -o./1.3inch_LCD_HAT_code
sudo chmod 777 -R 1.3inch_LCD_HAT_code
cd 1.3inch_LCD_HAT_code
cd c
make clean
make
sudo ./main
sudo nano /boot/config.txt
gpio=6,19,5,26,13,21,20,16=pu
sudo nano /etc/dphys-swapfile 


CONF_SWAPSIZE and change its value to a higher number. If it's set to 100, for example, change it to 1024


sudo /etc/init.d/dphys-swapfile stop
sudo /etc/init.d/dphys-swapfile start
sudo apt-get update
sudo apt-get upgrade 
sudo apt-get install libatlas-base-dev
sudo apt-get install python-numpy
sudo apt-get install python-gpiozero
sudo apt-get install python-pil
cd python
sudo python main.py
sudo python key_demo.py
cd ~
sudo apt-get install cmake -y
wget https://www.waveshare.net/w/upload/2/2d/Fbcp-ili9341.7z
sudo apt-get install p7zip-full -y
7z x Fbcp-ili9341.7z
cd Fbcp-ili9341/
mkdir build
cd build
cmake -DSPI_BUS_CLOCK_DIVISOR=20 -DWAVESHARE_ST7789VW_HAT=ON -DBACKLIGHT_CONTROL=ON —DDMA _TX_CHANNEL=5 -DDMX_RX_CHANNEL=6 -DBACKLIGHT_CONTROLON DSTATISTICS=0 ..
make -j
sudo ./fbcp-ili9341 
sudo cp /home/pi/Fbcp-ili9341/build/fbcp-ili9341 /usr/local/bin/fbcp
sudo nano /etc/rc.local

fbcp& <- before exit

sudo nano /boot/config.txt

↓ at the end

hdmi_force_hotplug=1
hdmi_cvt=300 300 60 1 0 0 0
hdmi_group=2
hdmi_mode=87
display_rotate=0
sudo reboot
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?