Difference between revisions of "Template:RPi LCD User Manual"

From Waveshare Wiki
Jump to: navigation, search
Line 42: Line 42:
  
 
=== Method 2. Using Ready-to-use image ===
 
=== Method 2. Using Ready-to-use image ===
The image file with pre-installed driver is located in the IMAGE directory of the CD. When finished the programming (How to write an image to a micro SD card for your Pi? See [[RPi-Image-Installation-Guides|RPi Image Installation Guides]] for more details), 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.
+
The image file with pre-installed driver is located in the IMAGE directory of the CD. Write the image to your micro SD card (How to write an image to a micro SD card for your Pi? See [[RPi-Image-Installation-Guides|RPi Image Installation Guides]] for more details). Then insert the card to your Pi, power up and enjoy it.
  
 
== Toggle between LCD and HDMI display ==
 
== Toggle between LCD and HDMI display ==

Revision as of 02:49, 7 July 2016

Getting Started

Enabling the virtual keyboard

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.

Method 1. Driver installation

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 for HDMI are changed. If you want to use another HDMI monitor, please run the following command:

sudo ./LCD-hdmi

Method 2. Using Ready-to-use image

The image file with pre-installed driver is located in the IMAGE directory of the CD. Write the image to your micro SD card (How to write an image to a micro SD card for your Pi? See RPi Image Installation Guides for more details). Then insert the card to your Pi, power up and enjoy it.

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 reboot:

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.