Template: RPi LCD User Manual
Programming the image file
RPi LCD needs to use a SPI interface, but in the original image file of Raspberry Pi, the displayer is driven via a HDMI port. So the original image is not applicable for RPi LCD, and you should use the system image file provided by Waveshare.
The image file provided by Waveshare is located at the directory of IMAGE in the CD provided with the product (for more information about how to programming the image file, please refer to the document Writing IMG files to SD Card). When finished the programming, please power on the module, and wait more than 30 secs. Then, you will see the boot screen of Raspbian shown in the LCD and enter the desktop of the system.
Descriptions: Under LCD display mode, the screen touch function is available. For data inputting, you can click the start menu in the bottom-left of the screen, and select Accessories->Keyboard, to enable the Virtual Keyboard for command inputting, as Figure 1 shows.
Figure 1: Enabling the virtual keyboard |
Toggle between LCD and HDMI display
LCD display switch to HDMI display
The default boot mode of the system image in CD selects LCD display. And there will be no output to the external HDMI displayer if you apply one under this mode. In case that you want to use HDMI display, please execute the following commands:
sudo su HDMI-SYS-SHOW
The system will load the driver (wait several minutes). And the Raspberry Pi will reboot automatically, when the driver loaded. After the module rebooted, waiting more than 30 seconds, there will be information display on the HDMI screen. And then, you will enter into Startx interface.
HDMI display switch to LCD display
If you need to use LCD display again, please operate the following commands to switch to this mode:
sudo su
- When using 3.2inch RPi LCD, please input:
LCD32-SYS-SHOW
- When using 3.5inch RPi LCD, please input:
LCD35-SYS-SHOW
- When using 4nch RPi LCD, please input:
LCD4-SYS-SHOW
- When using 5inch HDMI LCD, please input:
LCD5-SYS-SHOW
When finished the commands above, the system will load the driver (wait several minutes). And the Raspberry Pi will reboot automatically, when the driver download finished. After the module rebooted, waiting more than 30 seconds, there will be information display on the HDMI screen. And then, you will enter into system interface.
Descriptions: Under the HDMI display mode, you should use an external keyboard or SSH method for command inputting, since the virtual keyboard is not available. Or you can set a serial port as a debugging interface for command inputting.
Touch screen calibration
Enter the following commands for touch screen calibration:
su pi DISPLAY=:0.0 xinput_calibrator
After running these commands, there will be a prompt for four-point calibration shown in the LCD screen. Click the points one by one to finish the touch calibration. Then, the new calibration data will be displayed in the terminal, as shows below. Please get these data for future use.
Doing dynamic recalibration: Setting new calibration data: 126, 3734, 3892, 199
Enter the following command to edit 99-calibration.conf:
sudo nano /etc/X11/xorg.conf.d/99-calibration.conf
Then, the old calibration data will be displayed in the terminal:
Section “InputClass” Identifier “calibration” MatchProduct “ADS7846 Touchscreen” Option “Calibration” “160 3723 3896 181” Option “SwapAxes” “1” EndSection
Modify the calibration data to the new calibration data displayed in the step 2):
Section “InputClass” Identifier “calibration” MatchProduct “ADS7846 Touchscreen” Option “Calibration” “126, 3734, 3892, 199” Option “SwapAxes” “1” EndSection
Press the keys Ctrl+X, and select the option Y to save the modification.
The modification will be valid after rebooting the system. Enter the following command for system rebooting:
sudo reboot
Notices: In case of inaccurate touch, please perform screen calibration again and reboot the system.
How to work with a camera
RPi LCD can also work with an external camera to take photos. In this operation, a Raspberry Pi camera is required, which should be purchased separately. To work with a camera, you should enter the terminal, and input:
cd /home/pi/camera/ Camera
Then, waiting several seconds, the camera application will be started automatically. Now, you can capture pictures by double clicking the screen.
Appendix
Default entering the console after power up
You can perform more operations to Raspberry Pi module by entering the console of the Raspbain.
Edit the file rc.local. you should enter the terminal, and input:
sudo nano /etc/rc.local
(Eidt the file rc.local)
Find out the following line:
su –l pi –c “startx-- -dpi 60”
Add the symbol “#”before this line, as follows:
#su –l pi –c “startx-- -dpi 60”
Press the keys Ctrl+X, and select the option Y to save the modification.
Reboot the system:
sudo reboot
After the system rebooted, you will enter the console automatically.
Modifying the font size
Following the steps listed below, you can modify the font size
Edit the file rc.local. You should enter the terminal and input:
sudo nano /etc/rc.local
(Edit the file rc.local)
Find out the following line:
su –l pi –c “startx-- -dpi 60”
Modify the figure following the “dpi”. It is suggested to modify to “60”. Press the keys Ctrl+X and select the option Y to save the modification.
Reboot the system:
sudo reboot
The modification will be valid after the system rebooted.