Open main menu

Changes

2.2 LCD

5,224 bytes added, 17:14, 3 April 2020
{{GD Template Impl}}
[[File:2.2inch7507.jpg|thumbnail|right|Raspberry Pi 2.2 inch TFT Display sku:398437]]
[[File:2.2inch7503.jpg|thumbnail|right|Raspberry Pi 2.2 inch TFT Display sku:398437]]
[[ File:2.2inch.jpg|thumbnail|right|Raspberry Pi 2.2 inch TFT Display sku:398437]]

== Introduction ==
High PPI 2.2 inch TFT Display Shield for Raspberry Pi 3B/2B/B+/A+ With 6 Keyboards and Remote IR;
It's fit to raspberry pi 3 model B 2B/B+/A+; with 6 customized button, with IR function. you can customize your button function for your application.

== Features ==
*Demensions: 65mm x 56.5mm, it's a standard raspberry pi HAT expansion size;
*Resolution: 320 x 240, 2.2 inch, High PPI display screen;
*With 6 keyboards;
*With IR function;
*Support official Raspberry pi case

== How to use this LCD ==
===Use the shell script (Recommend)===
Please refer to [[Ugeek LCD user manual]] (NEW!)

sudo rpi-update
git clone https://github.com/geekworm-com/22LCD-script.git
cd 22LCD-script
chmod +x screen_setup.sh
sudo ./screen_setup.sh
or
sudo rpi-update
wget https://raw.githubusercontent.com/geekworm-com/22LCD-script/master/screen_setup.sh
chmod +x screen_setup.sh
sudo ./screen_setup.sh

===Use the full IMAGE with driver===
Down the image file from http://raspberrypiwiki.com/download/RPI-22-INCH-TFT/ , write the Image to micro SD card, after installing the system image to your SD card . wait for a minutes, the LCD can display.

=== How to use it on Raspbian OS===
*Upgrade to the latest Kernel
<pre>
sudo rpi-update
</pre>
*Install the GPIO library and the driver
<pre>
sudo apt-get install gcc python-pygame python-dev
sudo wget https://pypi.python.org/packages/source/R/RPi.GPIO/RPi.GPIO-0.5.11.tar.gz
sudo tar zxvf RPi.GPIO-0.5.11.tar.gz
cd RPi.GPIO-0.5.11
sudo python setup.py install
</pre>
*Deploy config.txt file to enable I2C and SPI interface
<pre>
sudo nano /boot/config.txt
#Apend the follwoing line:
dtparam=i2c_arm=on,spi=on
</pre>
*Deploy modules, and start up the screen
<pre>
sudo nano /etc/modules
fbtft_device name=pitft rotate=270 speed=48000000 fps=30
</pre>
*Attention: Please ignore the step 3 and 4 if you use the latest official jessie system, only deploy the config.txt file
<pre>
sudo nano /boot/config.txt
dtparam=i2c_arm=on,spi=on
dtoverlay=pitft28-resistive, rotate=270 speed=48000000 fps=30
</pre>
*Deploy cmdline.txt file to show the console
<pre>
sudo nano /boot/cmdline.txt
#add this line before "rootwait"
fbcon=map:10 fbcon=font:VGA8x8
</pre>
[[File:20150717110006-300x203.png]]

then save & reboot;

===How to turn on/off backlight ===
gpio -g mode 27 in
gpio -g mode 27 out

===How to enter Graph model===
* Log in, then execute
<pre>
sudo mv /usr/share/X11/xorg.conf.d/99–fbturbo.conf ~
sudo nano ~/.profile
#append the following line;
export FRAMEBUFFER=/dev/fb1
#then save & close ~/.profile file;
</pre>

* Edit config file, and add screen device;
sudo nano /usr/share/X11/xorg.conf.d/99-pitft.conf

append the following line;

Section “Device”
Identifier "PiTFT"
Driver "fbdev"
Option "fbdev" "/dev/fb1"
EndSection

save & close this file;

* Config auto login in graph model via raspi-config
sudo raspi-config

select "Enable Boot to Desktop/Scratch", then select "Desktop log in as user ‘pi’ at the graphical desktop", then save & reboot;

then you can enter directly graph model;

for "2017-03-02-raspbian-jessie" version, please install a component using the command below; ==Added on 2017.03.09==

sudo apt-get install xserver-xorg-video-fbdev

=== How to DIY the six button ===
* Log in Raspberry by ssh and install related python and software
<pre>
$sudo apt-get update
$sudo apt-get install libudev-dev
$sudo apt-get install python-pip
$sudo pip install rpi.gpio
$sudo pip install python-uinput
</pre>
* Register the uinput module (You can add it to/etc/modules file, it’ll be registered automatically after powering)
<pre>
$sudo modprobe uinput
</pre>
* Download this sample ([[File:Python-keys.zip]]) and unzip it, and copy into raspberry. (NOTE: it's only a demo code, you can study it then develop your application.)
* Run the procedure of imitated keyboard or rocker, press the button and check it;
<pre>
$sudo python rpi-2.2TFT-kbrd.py
or
$sudo python rpi-2.2TFT-jstk.py
or
$sudo python rpi-2.2TFT-mouse.py

Attention: uinput means uinput.KEY_XX (XX means Button. Take A for example, that is uinput.KEY_A)
</pre>

== Document & Download ==
* http://raspberrypiwiki.com/download/RPI-22-INCH-TFT/
* [https://github.com/geekworm-com/22LCD-script github]
* DIY button sample code: [[File:Python-keys.zip]];
* [https://github.com/tuomasjjrasanen/python-uinput python-uinput Lib]
* [http://pypi.python.org/pypi/RPi.GPIO/ RPi.GPIO Lib]

== FAQs ==
Q: Is it support Dual screen display?

A: Yes,Support dual screen disply.

[[File:Dual-screen-display.jpg|500px]]

==Cases==
Raspberry Pi Official Case can refer to [[Raspberry Pi Official Case SKU:397320]]
<gallery>
File:Official case for raspberry pi 2 & B+.jpeg
2.2inch7461.jpg
2.2inch7462.jpg
case.jpg
</gallery>

<gallery>
CNC-IMG-8183.jpg
CNC-IMG-8177.jpg
CNC-IMG-8179.jpg
CNC-IMG-8173.jpg
</gallery>


[[Category:Product Manual]]
[[Category:Raspberry pi]]
<comments/>