Wall's Corners Wall's Corners Author
Title: 3.5inch RPi LCD (A)
Author: Wall's Corners
Rating 5 of 5 Des:
How to apply the RPi LCD in a custom Raspbian system mirror image? In some cases, you may be inconvenient to use the image supplied by us,...

How to apply the RPi in a custom Raspbian system mirror image?

In some cases, you may be inconvenient to use the image supplied by us, then you can install the LCD driver on an original system.

Configure your Pi:

sudo raspi-config
  • Select Expand Filesystem.
  • You should make sure the custom mirror image used can boot to desktop. Check the configuration: Enable Boot to Desktop/Scratch -> Desktop Log in as user ‘pi’ at the graphical desktop

Download RPi LCD driver and extract it. Copy the file LCD-show.tar.gz into your custom mirror image via the network or an U disk. Run the following command:

tar xvf LCD-show.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

Then, wait a few minutes, the system will restart . When finished, the RPi LCD is ready to use.

To switch to HDMI display, run the command:

sudo ./LCD-hdmi

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 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 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 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.

Share This:

View more at: http://yoursmart.mobi

About Author

Advertisement

Post a Comment

 
Top