Google Chat: zj734465502@gmail.com
+86-0755-88291180
sales01@spotpear.com
dragon_manager@163.com
services01@spotpear.com
manager01@spotpear.com
WhatsApp:13246739196
7inch Capacitive Touch Display for Raspberry Pi, 1024×600, IPS Wide Angle, MIPI DSI Interface
git clone git://github.com/waveshare/7inch-DSI-LCD-C.git cd 7inch-DSI-LCD-C chmod +x WS_7inchDSI1024x600_MAIN.sh sudo ./WS_7inchDSI1024x600_MAIN.sh sudo reboot
Note: To install the driver, you should connect the Rasberry Pi to the network
normal: Default setting right: Rotate 90 degree (anticlockwise) inverted:Rotate 180 degree left: Rotate 270 degree (anticlockwise)
Note: If you use Raspberry Pi 4, you should enable the line dtoverlay=vc4-fkms-V3D in config.txt file
If you need to adjust the touch as well as the display orientation, you need to configure it further.
sudo apt-get install xserver-xorg-input-libinput
sudo mkdir /etc/X11/xorg.conf.d
sudo cp /usr/share/X11/xorg.conf.d/40-libinput.conf /etc/X11/xorg.conf.d/
sudo nano /etc/X11/xorg.conf.d/40-libinput.conf
Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"
sudo reboot
After completing these steps. The LCD could rotate 90 degrees both display and touch function.
Note:
90 degree: Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"
180 degree: Option "CalibrationMatrix" "-1 0 1 0 -1 1 0 0 1"
270 degree: Option "CalibrationMatrix" "0 -1 1 1 0 0 0 0 1"
Modify the config.txt file.
Change the line dtoverlay=WS_7inchDSI1024x600_Screen to dtoverlay=WS_7inchDSI1024x600_Screen,Backlight=x
x is the value of the brighness, it should be in the range from 0 to 255, 0 is dimest and 255 is the brightest.
For example, you can set it as dtoverlay=WS_7inchDSI1024x600_Screen,Backlight=255
After setting, reboot the Raspberry Pi.
Waveshare provides a tool for adjusting brightness in GUI (only supports Raspberry Pi OS), you can install it with the following commands.
cd 7inch-DSI-LCD-C cd brightness sudo ./install.sh
After installing, you can choose Menu -> Accessories -> Brightness to open the tool and adjust.
The driver of the 7inch DSI LCD (C) will be in conflict with raspicam.
In this case, if you want to use the camera, you need to install the new libcamera.
libcamera-apps is an application based on libcamera, it have all the function of libcamera.
Shutdown Raspberry Pi first, connect the camera to Raspberry Pi and power it on.
Note: Please do not replug the camera while the Raspberry Pi working, otherwise, the camera interface and camera may be damaged.
sudo apt update
sudo nano /boot/config.txt
Add the following lines to the config.txt file:
#IMX219 Camera: dtoverlay=imx219 #If you use OV5647 camera, please change it to this line: #dtoverlay=ov5647 #If you use IMX477 camera, please change it to this line: #dtoverlay=imx477
Open camera by raspi-config:
sudo raspi-config
Choose Interface Options -》 P1 Camera and choose Yes -》 Finish -》 Yes, finally, reboot Raspberry Pi.
Note 1: We commend you to use the Pi 4 to install and build the libcamera-apps.
Note 2: If you are not able to install it, recommend you use the ready-to-use image.
sudo apt install libboost-dev -y sudo apt install libgnutls28-dev openssl libtiff5-dev -y sudo apt install qtbase5-dev libqt5core5a libqt5gui5 libqt5widgets5 -y sudo apt install meson -y sudo pip3 install pyyaml ply sudo pip3 install --upgrade meson
git clone git://linuxtv.org/libcamera.git cd libcamera meson build cd build meson configure -Dpipelines=raspberrypi -Dtest=false cd .. ninja -C build sudo ninja -C build install
sudo apt install libegl1-mesa-dev cd git clone https://github.com/anholt/libepoxy.git cd libepoxy mkdir _build cd _build meson ninja sudo ninja install
Install Libcamera-apps
sudo apt install cmake libboost-program-options-dev libdrm-dev libexif-dev cd git clone https://github.com/raspberrypi/libcamera-apps.git cd libcamera-apps mkdir build cd build cmake .. make -j4 <pre> Test the camera by libcamera-hello: <pre> ./libcamera-hello
About the comamnd:
libcamera-still #Similar to raspistill libcamera-vid #Similar to raspivid libcamera-raw #a version of libcamera-vid, use for save original video without compression. libcamera-hello #Basic command for previewing camera. libcamera-jpeg #A simple version of libcamera——Preview and captur JPEG.
Note, the libcamera-app will conver the original DSI driver, you need to install it again for displaying.
cd 7inch-DSI-LCD-C sudo ./WS_7inchDSI1024x600_MAIN.sh sudo reboot
For easy use, we make a script in Github.
Please update the Raspberry Pi first:
sudo apt-get update
You can install it by the following commands:
1. Download and install the libcamera-install file
git clone https://github.com/waveshare/libcamera-install cd libcamera-install sudo chmod +x install_libcamera_all.sh sudo ./install_libcamera_all.sh
2. It is successful if the line "echo "install Succeed" is printed, and it is failed if the line "echo "install Fail" is printed.
After installing, three folders are saved in the libcamera-install directory, libcamera libcamera-apps libepoxy folders. If you want to reinstall the libcamera, you need to detect these folders first.
3. Restart the software.
sudo reboot
4. Test the camera to preview for 5s
cd /home/pilibcamera-install/libcamera-apps/build ./libcamera-hello
For more information about the libcamera, please refer to:
https://www.raspberrypi.com/documentation/accessories/camera.html
https://github.com/raspberrypi/libcamera-apps/blob/main/README.md
https://datasheets.raspberrypi.com/camera/raspberry-pi-camera-guide.pdf