Difference between revisions of "Template:RPi LCD User Manual"
Line 15: | Line 15: | ||
tar xvf LCD-show-YYMMDD.tar.gz | tar xvf LCD-show-YYMMDD.tar.gz | ||
cd LCD-show/ | cd LCD-show/ | ||
+ | {{#switch: {{FULLPAGENAME}} | ||
+ | | 3.2inch RPi LCD (B) = | ||
* For 3.2inch RPi LCD (B), run the command: | * For 3.2inch RPi LCD (B), run the command: | ||
sudo ./LCD32-show | sudo ./LCD32-show | ||
+ | | 3.5inch RPi LCD (A) = | ||
* For 3.5inch RPi LCD (A), run the command: | * For 3.5inch RPi LCD (A), run the command: | ||
sudo ./LCD35-show | sudo ./LCD35-show | ||
+ | | 4inch RPi LCD (A) = | ||
* For 4inch RPi LCD (A), run the command: | * For 4inch RPi LCD (A), run the command: | ||
sudo ./LCD4-show | sudo ./LCD4-show | ||
+ | | 5inch HDMI LCD = | ||
* For 5inch HDMI LCD, run the command: | * For 5inch HDMI LCD, run the command: | ||
sudo ./LCD5-show | sudo ./LCD5-show | ||
+ | | #default = | ||
+ | * For 3.2inch RPi LCD (B), run the command: | ||
+ | sudo ./LCD32-show | ||
+ | * For 3.5inch RPi LCD (A), run the command: | ||
+ | sudo ./LCD35-show | ||
+ | * For 4inch RPi LCD (A), run the command: | ||
+ | sudo ./LCD4-show | ||
+ | * For 5inch HDMI LCD, run the command: | ||
+ | sudo ./LCD5-show | ||
+ | }} | ||
3. Then wait a few minutes, the system will restart automatically. When finished, the RPi LCD is ready to use. | 3. Then wait a few minutes, the system will restart automatically. When finished, the RPi LCD is ready to use. | ||
Revision as of 02:36, 13 June 2016
Getting Started
The RPi LCD can be driven in two ways: Method 1. install driver to your Raspbian OS. Method 2. use the Ready-to-use image file of which LCD driver was pre-installed. What's the difference? Method 1 enables your LCD on the latest Raspbian OS while Method 2 eliminates cumbersome steps of LCD driver installation. It is advised that Raspberry Pi old users follow Method 1 and new users follow Method 2.
Method 1. Driver installation
Tips: Before installing LCD driver, some virtual keyboard software is recommended, e.g. matchbox-keyboard, how to install. This is not necessary but which implements LCD touch input.
1. Configure your Pi:
sudo raspi-config
Set as:
- Select Expand Filesystem.
- Boot Option -> Desktop Autologin (may differ depending on Raspbian revision)
2. Copy the driver (choose the driver according to your OS) into your OS then Run the following commands:
tar xvf LCD-show-YYMMDD.tar.gz cd LCD-show/
- For 3.2inch RPi LCD (B), run the command:
sudo ./LCD32-show
- For 3.5inch RPi LCD (A), run the command:
sudo ./LCD35-show
- For 4inch RPi LCD (A), run the command:
sudo ./LCD4-show
- For 5inch HDMI LCD, run the command:
sudo ./LCD5-show
3. Then wait a few minutes, the system will restart automatically. When finished, the RPi LCD is ready to use.
4. Once this LCD is enabled, meanwhile the default settings of HDMI port is changed. If you want to use a HDMI monitor, please run the following command:
sudo ./LCD-hdmi
Method 2. To use the Ready-to-use image
The image file with driver pre-installed is located at the directory of IMAGE/ in the CD come with the product. When finished the programming, please power on the module, and wait a while. Then you will see the boot screen of Raspbian shown in the LCD and enter the desktop of the system.
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 command:
sudo ./LCD-hdmi
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:
- When using 3.2inch RPi LCD, please input:
sudo ./LCD32-show
- When using 3.5inch RPi LCD, please input:
sudo ./LCD35-show
- When using 4nch RPi LCD, please input:
sudo ./LCD4-show
- When using 5inch HDMI LCD, please input:
sudo ./LCD5-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
This LCD can be calibrated using a program called xinput_calibrator which is pre-installed on the CD image. However, it was not pre-installed on original Raspbian OS. So in this case, you should get and install the program manually with
sudo apt-get install -y xinput-calibrator
Enter the following commands for touch screen calibration:
sudo 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: 3919, 208, 236, 3913
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" "3919 208 236 3913" 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.