Google Chat: zj734465502@gmail.com
+86-0755-88291180
sales01@spotpear.com
dragon_manager@163.com
services01@spotpear.com
manager01@spotpear.com
WhatsApp:13246739196
[] Image: 2inch-240x320-230822.img
[] schematic diagram: 2inch LCD 240x320 with buzzer-230426.pdf
[] Key program: key_test.py
[] Display drive: lcd2.dtbo
[] Download lcd2.dtbo copy to /boot/overlays/
Increase display configuration
sudo nano /boot/config.txt
And add that follow code in the configuration file:
dtparam=spi=on
dtoverlay=lcd2:rotate=270
hdmi_force_hotplug=1
max_usb_current=1
hdmi_group=2
hdmi_mode=1
hdmi_mode=87
hdmi_cvt 480 320 60 6 0 0 0
hdmi_drive=2
display_rotate=0
Attention! In the configuration file of Raspberry Pi, please comment out two lines of code dtoverlay=vc4-kms-v3d and max_framebuffers=2:
#dtoverlay=vc4-kms-v3d
#max_framebuffers=2
Download rpi-fbcp.zip Decompress the compressed package
unzip rpi-fbcp.zip
进入build目录
cd rpi-fbcp/build/
Install fbcp program
sudo install fbcp /usr/local/bin/fbcp
Edit the /etc/rc/local file
sudo nano /etc/rc.local
Add sleep 20 and fbcp & under this file.
Add location as shown in the figure below.
Restart the system sudo reboot display
Edit configuration file:
sudo nano /boot/config.txt
Add to the configuration file
dtoverlay=audremap,pins_18_19
Save to exit, and then restart:
sudo reboot
Enter the command at the terminal after restarting.
sudo raspi-config,
Select system options-> audio->' headset' and restart again.
Enter the system interface, just find an mp3 file and double-click it to play it. If it can play normally, it will be fine.
Download key_test.py Running code:
sudo python3 ./key_test.py
Press the module button at this time, and the terminal will output a prompt message.