Difference between revisions of "Template:7inch HDMI LCD C Pi Guides"
m (Text replacement - "https://www.waveshare.com/w/upload/" to "https://files.waveshare.com/upload/") |
|||
Line 6: | Line 6: | ||
1) Download the compressed file to the PC, and unzip it to get the .img file. | 1) Download the compressed file to the PC, and unzip it to get the .img file. | ||
− | 2) Connect the TF card to the PC, and use [https:// | + | 2) Connect the TF card to the PC, and use [https://files.waveshare.com/upload/d/d7/Panasonic_SDFormatter.zip SDFormatter] software to format the TF card. |
− | 3) Open the [https:// | + | 3) Open the [https://files.waveshare.com/upload/7/76/Win32DiskImager.zip Win32DiskImager] software, select the system image downloaded in step 1, and click 'Write' to write the system image. |
4) After the image has finished writing, open the config.txt file in the root directory of the TF card, add the following code at the end of config.txt, then save and quit the TF card safely. | 4) After the image has finished writing, open the config.txt file in the root directory of the TF card, add the following code at the end of config.txt, then save and quit the TF card safely. | ||
Line 73: | Line 73: | ||
==Backlight Adjustment== | ==Backlight Adjustment== | ||
<syntaxhighlight lang="c"> | <syntaxhighlight lang="c"> | ||
− | wget https:// | + | wget https://files.waveshare.com/upload/0/01/Brightness-HDMI.zip |
unzip Brightness-HDMI.zip | unzip Brightness-HDMI.zip | ||
cd Brightness-HDMI | cd Brightness-HDMI | ||
Line 91: | Line 91: | ||
Download the file through the network, open the Raspberry Pi system terminal, and enter the following commands: | Download the file through the network, open the Raspberry Pi system terminal, and enter the following commands: | ||
<pre> | <pre> | ||
− | wget https:// | + | wget https://files.waveshare.com/upload/0/06/7C_brightness_Raspi.zip |
sudo unzip 7C_brightness_Raspi.zip -d ./7C_brightness_Raspi/ | sudo unzip 7C_brightness_Raspi.zip -d ./7C_brightness_Raspi/ | ||
cd 7C_brightness_Raspi | cd 7C_brightness_Raspi |
Revision as of 05:59, 2 September 2023
How to use
This LCD can support Raspberry Pi OS / Ubuntu / Kali / Retropie systems. When the LCD works on systems such as Raspberry Pi OS, the resolution must be set manually, otherwise, it will cause an abnormal display.
Please download the latest version of the image on the Raspberry Pi official website.
1) Download the compressed file to the PC, and unzip it to get the .img file.
2) Connect the TF card to the PC, and use SDFormatter software to format the TF card.
3) Open the Win32DiskImager software, select the system image downloaded in step 1, and click 'Write' to write the system image.
4) After the image has finished writing, open the config.txt file in the root directory of the TF card, add the following code at the end of config.txt, then save and quit the TF card safely.
hdmi_group=2 hdmi_mode=87 hdmi_cvt 1024 600 60 6 0 0 0 hdmi_drive=1
5) Insert the TF card into the Raspberry Pi.
6) Turn on the backlight switch on the back of the LCD.
7) Connect the Touch interface of the LCD to the USB interface of the Raspberry Pi.
8) Connect the HDMI interface of the LCD to the HDMI interface of the Raspberry Pi, power on the Raspberry Pi, and wait for a few seconds until the LCD displays normally.
【Note】
- On December 2, 2021, the Raspberry Pi OS was divided into two branches, the Buster branch, and the Bullseye branch. The Buster branch is a continuation of the old system and is more stable. The Bullseye branch added some new features, using open-source libraries and new interfaces. Since the current Bullseye branch has just been released shortly, it is not stable yet. If you are an industrial user, it is strongly recommended to use the Buster branch.
- If you use the Buster branch system, you can use it according to the above configuration. But if you are using the Bullseye branch system, you need to modify the default KMS driver to the FKMS driver for displaying the system desktop normally.
Modification method: Open the config.txt file in the root directory of the TF card, and find the following line:
dtoverlay=vc4-kms-v3d
change into
dtoverlay=vc4-fkms-v3d
- If you need to use the CSI camera under the Bullseye branch system. Since this branch uses the libcamera camera library by default, the library doesn't support FKMS drivers.
So in addition to the above modification, you also need to install the Raspicam camera library.
The installation method is as follows:
cd ~ sudo apt install cmake git clone https://github.com/raspberrypi/userland cd userland ./buildme sudo cp build/bin/* /bin/
Then execute the following command to shut down the system:
poweroff
Connect the Raspberry Pi camera to the CSI interface of the Raspberry Pi, power on the Raspberry Pi again, and after the system boots, execute the following command:
Take a picture:
raspistill -o image.jpg
Take a video:
raspivid -o video.h264 -t 10000
Backlight Adjustment
wget https://files.waveshare.com/upload/0/01/Brightness-HDMI.zip unzip Brightness-HDMI.zip cd Brightness-HDMI sudo chmod +x install.sh ./install.sh
#lite version Enter the lite directory: #cd lite #./Raspi_USB_Backlight_nogui -b X # X range is 0~10, 0 is the darkest, 10 is the brightest. #For example: ./Raspi_USB_Backlight_nogui -b 3
Note: Only the Rev4.1 version supports the USB dimming function.
Calibrate double-touchscreen in Pi 4
- 1. Open the terminal and input command: xrandr to check HDMI-ID of the main monitor. (It is HDMI-1 most time);
- 2. Input command xinput in the terminal, and check the touch ID of the main monitor. (There should be two IDs, you can touch displays to check which is the main one);
- 3.Tun the command:xinput map-to-output <touch ID> <HDMI-ID>
(Don't forget to change the ID to the correct one just like: xinput map-to-output 7 HDMI-1)
- 4. You can set the command to auto-run while booting and make it affect all the time:
sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
Add the line to the file: xinput map-to-output 7 HDMI-1 (Don't forget to change the ID to the correct one), then reboot.