Skip to content

Latest commit

 

History

History
216 lines (191 loc) · 5.26 KB

README.md

File metadata and controls

216 lines (191 loc) · 5.26 KB

UCTRONICS_LCD35_RPI (SKU: U4703)

This driver is used for UCTRONICS LCD35 with SPI interface

Revision History:

  • 2018/05/30 : Add support rotate 0/ 90/ 180/ 270 degree for Pi3B and Pi3B+
  • 2018/05/30 :Optimize the bug of making kernel panic
  • 2018/06/01 : Add support rotate 0/ 90/ 180/ 270 degree for Pi zero and Pi B+

Any problems, please refer to our troubleshootings

Easy Install

wget https://raw.githubusercontent.com/UCTRONICS/UCTRONICS_LCD35_RPI/master/install
sudo chmod +x install
sudo ./install 

Detail operations

Step1: Expand the sd card first

sudo raspi-config choose Advanced Operations -> Expand Filesystem 
sudo reboot

Step2: Update your raspberry pi system

 sudo apt-get update

Step3: Download the driver package

 sudo git clone https://github.com/UCTRONICS/UCTRONICS_LCD35_RPI.git

EasyBehavior

Step4: Come in the UCTRONICS_LCD35_RPI

 cd UCTRONICS_LCD35_RPI

EasyBehavior

Step5: Get run permissions

 sudo chmod 777 UCTRONICS_LCD_backup
 sudo chmod 777 UCTRONICS_LCD35_install
 sudo chmod 777 UCTRONICS_LCD_restore
 sudo chmod 777 UCTRONICS_LCD_hdmi

EasyBehavior

Step6: backup data

 sudo ./UCTRONICS_LCD_backup

EasyBehavior

Step7: install the LCD35 driver

 sudo ./UCTRONICS_LCD35_install

EasyBehavior

wait a while the system will be installed and restarted automatically.

Reuse the pre-installation system

 sudo ./UCTRONICS_LCD_restore

display on hdmi

   sudo ./UCTRONICS_LCD_hdmi

Add more functions for the LCD :

NO1. Install calibration software for calibration

  cd UCTRONICS_LCD35_RPI
  sudo unzip Xinput-calibrator_0.7.5-1_armhf.zip 
  cd xinput-calibrator_0.7.5-1_armhf/
  sudo dpkg -i -B xinput-calibrator_0.7.5-1_armhf.deb

NO2. Install virtual keyboard

    1. Execute the following commands to install the corresponding software
 sudo apt-get update
 sudo apt-get install matchbox-keyboard
 sudo nano /usr/bin/toggle-matchbox-keyboard.sh
    1. Copy the following contents to toggle box - keyboard. Sh, save the exit
  #!/bin/bash
   #This script toggle the virtual keyboard
   PID=`pidof matchbox-keyboard`
  if [ ! -e $PID ]; then
   killall matchbox-keyboard
   else
   matchbox-keyboard -s 50 extended&
   fi
    1. Execute the following command
sudo chmod +x /usr/bin/toggle-matchbox-keyboard.sh
sudo mkdir /usr/local/share/applications
sudo nano /usr/local/share/applications/toggle-matchbox-keyboard.desktop
    1. Copy the following contents to toggle - matchbox - keyboard. Desktop, save exit
[Desktop Entry]
Name=Toggle Matchbox Keyboard 
Comment=Toggle Matchbox Keyboard` 
Exec=toggle-matchbox-keyboard.sh
Type=Application
Icon=matchbox-keyboard.png
Categories=Panel;Utility;MB
X-MB-INPUT-MECHANSIM=True
    1. To perform the following command, note that this step must use the "PI" user permission, and if the administrator privileges are used, the file will not be found
nano ~/.config/lxpanel/LXDE-pi/panels/panel
    1. Find similar commands (different versions of ICONS may differ)
Plugin {
type = launchbar
Config {
Button {
id=lxde-screenlock.desktop
}
Button {
id=lxde-logout.desktop 
 }
}
    1. Add the following code to add a Button item
 Button {
 id=/usr/local/share/applications/toggle-matchbox-keyboard.desktop
  }
    1. To restart the system with the following command, you can see a virtual keyboard icon in the top left corner
  sudo reboot

Add new ICON to desktop ?

If it's just a folder, add it directly to the desktop

If it is an executable, follow this steps:

  • step1: choose the Directory Tree -> / -> usr -> share ->applications folder

  • Step2: choose a icon you want to link

  • Step3: choose edit -> create link... ->Desktop ->OK

Rotate the screen to 0/90/180/270 degree

cd ~UCTRONICS_LCD35_RPI
  • For rotate 0 :
             sudo chmod +x UCTRONICS_LCD35_install
             sudo ./UCTRONICS_LCD35_install 
  • For rotate 90 :
            sudo chmod +x UCTRONICS_LCD35_rotation_90_install 
            sudo ./UCTRONICS_LCD35_rotation_90_install 

For rotate 180 :

            sudo chmod +x UCTRONICS_LCD35_rotation_180_install 
            sudo ./UCTRONICS_LCD35_rotation_180_install

For rotate 270 :

            sudo chmod +x UCTRONICS_LCD35_rotation_270_install 
            sudo ./UCTRONICS_LCD35_rotation_270_install

Rotation =0

Alt text

Rotation =180

Alt text