5inch HDMI LCD (B) (Firmware Rev 1.1) User Manual

From Waveshare Wiki
Jump to: navigation, search

Working with Raspberry Pi

How to program Raspbian image file

In order to use with Raspberry Pi, you should configure the original system first. Of course, you can program a ready-to-use system image file to your Raspberry Pi board as well. In this section, we will illustrate how to program the image file by taking the ready-to-use system image file, 5inch_HDMI_B_RPI_Raspbian-150405.img, as an example. This image file supports Raspberry Pi Model B/B+/A+/2B.

  1. Copy the file with the expansion name .img to your PC;
  2. Connect a TF card to your PC, and format your TF card with the SDFormatter.exe
    Notices: The capability of TF card in used here should be more than 4GB. In this operation, a TF card reader is also required, which has to be purchased separately.
  3. Start the Win32DiskImager.exe, and select the system image file copied into your PC, then, click the button Write to program the system image file.

Hardware connection

  1. Connect the LCD to the HDMI on the Raspberry Pi board with a HDMI cable;
  2. Connect the USB Touch interface on the LCD to the USB interface on the Raspberry Pi board with a USB type-A male to micro-B cable.

Screen touch calibration

Connecting to Raspberry Pi via SSH

  1. Enter the system terminal to calibrate the touch screen. The simple method is to connect a keyboard and a HDMI screen to the Raspberry Pi board, to enter the Graphical Desktop for calibrating operation. However, some users may have no HDMI screen, so we present the SSH method for remote connection to the Raspberry Pi board. To use this method, you should make sure your PC and the Raspberry Pi board can find each other in the network. Normally, they can do so when connected to a same router.
  2. Open the software PuTTY, and enter the IP address of the Raspberry Pi board (you can enter the router setting page on your PC to check the IP address). Then, set the Port to 22, and click the button Open.
  3. Enter the user name and the password:
    User Name: pi
    Password: raspberry
  4. When finished, you can enter the system terminal for operation.

Calibration steps

  1. After connecting to the Raspberry Pi board, enter the following command under the terminal:
    DISPLAY=:0.0 xinput_calibrator
    After entering the calibration interface, there will be a prompt for four-point calibration shown in the screen:
    Touchscreen Calibration
    Press the point, use a stylus to increase precision.
    (To abort, press any key or wait)
  2. Click the points marked with the red cross pattern one by one to finish the touch calibration.
  3. When finished, the system will generate a string of new calibration data, such as:
    Section “InputClass”
    Identifier “calibration”
    MatchProduct “ADS7843 TouchController”
    Option “Calibration” “253 3957 224 3820”
    EndSection
  4. Create a txt file on your PC, and copy the data above into the file for future use.
  5. Remove the calibration file in the system by the following command:
    sudo rm /etc/X11/xorg.conf.d/99-calibration.conf
  6. Create a new calibration file by the following commands:
    sudo rm /etc/X11/xorg.conf.d/
    sudo mkdir /etc/X11/xorg.conf.d
    sudo nano /etc/X11/xorg.conf.d/99-calibration.conf
  7. When finished, the text editor Nano will be run. Please paste the content in the new txt file into the text editor.
  8. Press the keys Ctrl+X and select the option Y, then press Enter to save the configuration and exit.
  9. Execute the command sudo reboot to restart the system. When finished, the touch configuration will be valid.

Virtual keyboard of Raspberry Pi

Virtual keyboard of Raspberry Pi

The Virtual keyboard of Raspbian system enables you to save the USB resource, providing easy system operations. After the LCD is working properly, this function can be invoked by the following command:

DISPLAY=:0.0 matchbox-keyboard -s 100 extended

Now, the virtual keyboard is ready to use, as the figure shows.

How to configure original Raspbian image file

In the section above, we presented the steps of image programming by taking the ready-to-use system image file programming as an example, since the ready-to-use image is easier to use and understand. However, you can freely customize your system by configuring the original Raspbian image file to support this LCD module.

How to install driver script

  1. Copy the file RPI2B_B_B+_USB_TOUCH_RES_5.0_RASPBIAN.tar.gz into the Raspbian system, and unzip it. That is, enter the terminal and input the following command:
    sudo tar  zxvf  RPI2B_B_B+_USB_TOUCH_RES_5.0_RASPBIAN.tar.gz
  2. Run the script USB_TOUCH_RES_5.0_RASPBIAN located at the folder RPI2B_B_B+_USB_TOUCH_RES_5.0_RASPBIAN by the following commands:
    cd RPI2B_B_B+_USB_TOUCH_RES_5.0_RASPBIAN
    sudo ./USB_TOUCH_RES_5.0_RASPBIAN
  3. When finished, the system will reboot automatically. And the LCD module can work properly, including display and touch functions, after the system rebooted.

How to enter graphical desktop

Notice: The Raspbian system boots to terminal interface by default. To make the operations simple when using with a LCD, it is recommended to set the system to boot to graphical desktop directly. Please follow the steps below to configure the system.

  1. Enter the Raspbian system, and input the following command:
    sudo raspi-config
  2. Select the option Enable Boot to Desktop/Scratch by using the Arrow keys, Space key or/and Enter key.
  3. Select the option Desktop Login as user ‘Pi’ at the graphical desktop.
  4. When you see the prompt “Would you like to reboot now?”, select the option Yes to reboot the system.

How to use with the Ubuntu system

Program the image file 5inch_HDMI_B_RPI_Ubuntu-150405.img to the board. This image file supports Raspberry Pi 2B. User Name: linaro Password: linaro

How to use with BeagleBones

How to program Angstrom image file

If this LCD module is used for display only, you can program the latest Angstrom image file to the board directly without any change. The BeagleBone Black will read the display parameters of the 5 inch HDMI displayer and set the resolution to 800*480 automatically. When using this LCD module as a touch screen, you should program the image file 5inch_HDMI_B_BB_Black_Angstrom-150424.img provided by the CD to the board. Please follow the steps below to program the image file.

  1. Copy the file with the expansion name .img to your PC;
  2. Connect a TF card to your PC, and format your TF card with the SDFormatter.exe
    Notices: The capability of TF card in used here should be more than 4GB. In this operation, a TF card reader is also required, which has to be purchased separately.
  3. Start the Win32DiskImager.exe, and select the system image file copied into your PC, then, click the button Write to program the system image file.
  4. After programming the image file, please insert the TF card to your board, press the key uBOOT and hold it till power up. Then, you will enter the system located at the TF card. And BeagleBone will take about 40 minutes to copy the system in the TF card into the on-board eMMC. When finished, the 4 LED indicators on the board will light up at a same time. After the system rebooted, you can enter the graphical desktop directly.

Hardware connection

  1. Connect the LCD to the HDMI on the BeagleBone board with a HDMI to micro HDMI cable;
  2. Connect the USB Touch interface on the LCD to the USB interface on the BeagleBone board with USB type-A male to micro-B cable. (BeagleBone has two USB interfaces, one for host and the other for client. In here, you should connect the LCD module to the USB host interface).

Screen touch calibration

  1. Remove the calibration file in the system: /etc/pointercal.xinput. Explanation: Connecting a mouse to the board, you can perform any remove operations in the graphical desktop. For SSH connection, the user name is root, no password.
  2. After rebooted, the Pi will enter the calibration interface automatically before start the system. There will be a prompt for four-point calibration shown in the screen:
    Touchscreen Calibration
    Press the point, use a stylus to increase precision.
    (To abort, press any key or wait)
  3. Click the points marked with the red cross pattern one by one to finish the touch calibration;
  4. When finished, the system will write the new calibration data into the file /etc/pointercal.xinput.

How to use with Banana Pi

Before powering up the Banana Pi, you should connect it to a LCD displayer properly, since the Banana Pi may read the resolution parameters of the LCD displayer on startup. And the connection should be remained till the Banana Pi enters the desktop. In this case, even if you disconnect the LCD displayer and reconnect it again to the Banana Pi, the LCD can still work properly.

How to program Raspbian_For_BananaPi image file

Program the image file 5inch_HDMI_B_BananaPi_Raspbian-150410.img to the borad. This image file supports the modules BananaPi Pro and BananaPi.

  1. Copy the file with the expansion name .img to your PC;
  2. Connect a TF card to your PC, and format your TF card with the SDFormatter.exe
    Notices: The capability of TF card in used here should be more than 4GB. In this operation, a TF card reader is also required, which has to be purchased separately.
  3. Start the Win32DiskImager.exe, and select the system image file copied into your PC, then, click the button Write to program the system image file.

Hardware connection

  1. Connect the LCD to the HDMI on the Banana Pi board with a HDMI cable;
  2. Connect the USB Touch interface on the LCD to the USB interface on the Banana Pi board with a dual micro USB cable.

How to load WiFi driver of BananaPi Pro

Comparing with the Banana Pi, the BananaPi Pro has added an on-board WiFi module. When using the BananaPi Pro, you can use SSH to connect to the Pi and execute the following command to load the WiFi driver:

sudo modprobe ap6210

Connecting to Banana Pi via SSH

  1. Enter the system terminal to calibrate the touch screen. The simple method is to connect a keyboard and a HDMI screen to the Banana Pi board, to enter the Graphical Desktop for calibrating operation. However, some users may have no HDMI screen, so we present the SSH method for remote connection to the Banana Pi board. To use this method, you should make sure your PC and the Banana Pi board can find each other in the network. Normally, they can do so when connected to a same router.
  2. Open the software PuTTY, and enter the IP address of the Banana Pi board (you can enter the router setting page on your PC to check the IP address). Then, set the Port to 22, and click the button Open.
  3. Enter the user name and the password:
    User Name: bananapi
    Password: bananapi
  4. When finished, you can enter the system terminal for operation.

Calibration steps

  1. After connecting to the Banana Pi board, enter the following command under the terminal:
    DISPLAY=:0.0 xinput_calibrator
    After entering the calibration interface, there will be a prompt for four-point calibration shown in the screen:
    Touchscreen Calibration
    Press the point, use a stylus to increase precision.
    (To abort, press any key or wait)
  2. Click the points marked with the red cross pattern one by one to finish the touch calibration.
  3. When finished, the system will generate a string of new calibration data, such as:
    Section “InputClass”
    Identifier “calibration”
    MatchProduct “ADS7843 TouchController”
    Option “Calibration” “253 3957 224 3820”
    EndSection
  4. Create a txt file on your PC, and copy the data above into the file for future use.
  5. Remove the calibration file in the system by the following command:
    sudo rm /etc/X11/xorg.conf.d/99-calibration.conf
  6. Create a new calibration file by the following commands:
    sudo rm /etc/X11/xorg.conf.d/
    sudo mkdir /etc/X11/xorg.conf.d
    sudo nano /etc/X11/xorg.conf.d/99-calibration.conf
  7. When finished, the text editor Nano will be run. Please paste the content in the new txt file into the text editor.
  8. Press the keys Ctrl+X and select the option Y, then press Enter to save the configuration and exit.
  9. Execute the command sudo reboot to restart the system. When finished, the touch configuration will be valid.

How to load WiFi driver of BananaPi Pro

Comparing with the Banana Pi, the BananaPi Pro has added an on-board WiFi module. When using the BananaPi Pro, you can use SSH to connect to the Pi and execute the following command to load the WiFi driver:

sudo modprobe ap6210

How to use with the Lubuntu system

Program the image file 5inch_HDMI_B_BananaPi_Lubuntu-150410.img to the board. This image file supports the modules BananaPi Pro and BananaPi. User name: bananapi Password: bananapi