Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
accessory:display:how_to_use_the_lcd_shield [2021/07/28 11:44]
joshua [Find the framebuffer number]
accessory:display:how_to_use_the_lcd_shield [2021/08/02 10:11] (current)
joshua [Touchscreen]
Line 297: Line 297:
 If the pointer is not working as you intended, you may calibrate the touchscreen works. If the pointer is not working as you intended, you may calibrate the touchscreen works.
  
-Install the calibrator ​tool.+Install the calibrator ​utilities.
  
 <code bash target> <code bash target>
-$ sudo apt install xinput-calibrator+$ sudo apt install ​xserver-xorg-input-evdev ​xinput-calibrator
 </​code>​ </​code>​
  
-Open terminal on the LCD shield and enter the following command.+And there are some things you have to prepare. 
 + 
 +<tabbox Odroid-C1/​XU4>​ 
 + 
 +Create ​X11 configuration file under the **/​etc/​X11/​xorg.conf.d** directory like the below. 
 + 
 +<code bash target>​ 
 +$ sudo vi /​etc/​X11/​xorg.conf.d/​99-calibration.conf 
 +</​code>​ 
 + 
 +<tabbox Odroid-C2/​N2/​C4>​ 
 + 
 +Create a X11 configuration file under the **/​usr/​share/​X11/​xorg.conf.d** directory like the below. 
 + 
 +<code bash target>​ 
 +$ sudo vi /​usr/​share/​X11/​xorg.conf.d/​99-calibration.conf 
 +</​code>​ 
 + 
 +</​tabbox>​ 
 + 
 +Put the following contents into that new file. 
 + 
 +<​code>​ 
 +Section "​InputClass"​ 
 +        Identifier ​     "​calibration"​ 
 +        MatchProduct ​   "​ADS7846 Touchscreen"​ 
 +        Driver "​evdev"​ 
 +EndSection 
 +</​code>​ 
 + 
 +Restart the lightdm service. 
 + 
 +<code bash target>​ 
 +sudo service lightdm restart 
 +</​code>​ 
 + 
 +Now enter the following command ​to start calibration.
  
 <code bash target> <code bash target>
Line 320: Line 356:
         Identifier ​     "​calibration"​         Identifier ​     "​calibration"​
         MatchProduct ​   "​SX865X Touchscreen"​         MatchProduct ​   "​SX865X Touchscreen"​
-        Option ​ "MinX" ​ "2867+        Option ​ "Calibration" ​  ​"3748 165 133 3867
-        Option ​ "MaxX" ​ "​62395"​ +        Option ​ "SwapAxes" ​     "​0"​
-        Option ​ "​MinY" ​ "​4471"​ +
-        Option ​ "​MaxY" ​ "​61268"​ +
-        Option ​ "​SwapXY" ​       ​"​0" ​# unless it was already set to 1 +
-        Option ​ "​InvertX" ​      "​0" ​ # unless it was already set +
-        Option ​ "​InvertY" ​      "​0" ​ # unless it was already set+
 EndSection EndSection
 </​file>​ </​file>​
  
-Copy that **Section** block to the **/​etc/​X11/​xorg.conf.d/99-calibration.conf** ​as a file.+Copy that **Option** properties of the **Section** block into the **99-calibration.conf** file you have created. 
 + 
 +So that completed **99-calibration.conf** file looks like this. 
 + 
 +<​file>​ 
 +Section "​InputClass"​ 
 +        Identifier ​     "​calibration"​ 
 +        MatchProduct ​   "​ADS7846 Touchscreen"​ 
 +        Option ​ "​Calibration" ​  "​3748 165 133 3867"​ 
 +        Option ​ "​SwapAxes" ​     "​0"​ 
 +        Driver "​evdev"​ 
 +EndSection 
 +</​file>​
  
 <WRAP help> <WRAP help>
-  * if the **/​etc/​X11/​xorg.conf.d** directory ​is absent, create one and put the file into that new directory+  * If your board uses **/​usr/​share/​X11/​xorg.conf.d** directory, then you have to remove all the **/​etc/​X11/​xorg.conf.d** directory and the containing files
-<code bash target>​ +  * If your board uses **/​etc/​X11/​xorg.conf.d** directory but it is absent, create one and put the file into that new directory.
-$ sudo mkdir /​etc/​X11/​xorg.conf.d +
-</​code>​+
 </​WRAP>​ </​WRAP>​