Difference between revisions of "2.2 Inch TFT Screen Display Extension Board"

From Wiki
Jump to: navigation, search
(Created page with "#High PPI 2.2 Inch TFT Screen Display Extension Board ##for Raspberry Pi Model B+, 2 Model B and 3 Model B with Multi-button and Infrared ![](2.2front.jpg) - Size: 65mm×56....")
 
Line 1: Line 1:
#High PPI 2.2 Inch TFT Screen Display Extension Board
+
2.2 Inch TFT Screen Display Extension Board
##for Raspberry Pi Model B+, 2 Model B and 3 Model B with Multi-button and Infrared
+
  
![](2.2front.jpg)
+
Features
 +
Size: 65mm×56.5mm, standard as a Raspberry Pi HAT board
 +
Screen sizing 2.2 inch and supporting a 320x240 resolution with high PPI, being small but able to provide a fine image
 +
Multi-button design: 6 buttons, meeting different demands for buttons from various users
 +
With an Infrared receiver
 +
Procedures for Applying TFT Screen Display with Raspbian Jessie
  
- Size: 65mm×56.5mm, standard as a Raspberry Pi HAT board
+
Download the simplified installation package at the bottom (or here). Transfer it to the Raspberry Pi.
- Screen sizing 2.2 inch and supporting a 320x240 resolution with high PPI, being small but able to provide a fine image
+
Finish the installation with Installation Guide which comes along with the product.
- Multi-button design: 6 buttons, meeting different demands for buttons from various users
+
Buttons
- With an Infrared receiver
+
 
+
####Procedures for Applying TFT Screen Display with Raspbian Jessie
+
![](install.jpg)
+
Download the simplified installation package at the bottom (or [here](pitft_setup.tar.gz)). Transfer it to the Raspberry Pi.  
+
  
Finish the installation with **Installation Guide** which comes along with the product.
+
There are 6 buttons on the screen, which are marked by a number beginning with "#", such as #21, #22, etc. The number indicates that the pins are connected to GPIOs defined by BCM numbering.
 +
Backlight control:
  
####Buttons
+
SJ2 is the switch for backlight control. Connect the two soldering pads of SJ2 by solder. You can use #27 to switch on/off the backlight.
![](buttons.jpg)
+
There are 6 buttons on the screen, which are marked by a number beginning with "**#**", such as **#21**, **#22**, etc. The number indicates that the pins are connected to GPIOs defined by **BCM** numbering.  
+
  
####Backlight control:
+
gpio -g mode 27 in  # Switch off
![](sj2.jpg)
+
gpio -g mode 27 out # Switch on
**SJ2** is the switch for backlight control.
+
Infrared Receiving:
Connect the two soldering pads of SJ2 by solder. You can use **#27** to switch on/off the backlight.
+
  
gpio -g mode 27 in # Switch off
+
SJ1 is the switch for IR control.
gpio -g mode 27 out # Switch on
+
1.Connect the two soldering pads of SJ1 by solder.
 +
2. Update and install the LIRC. Run:
  
####Infrared Receiving:
+
sudo apt-get update
![](sj1.jpg)
+
sudo apt-get install lirc
**SJ1** is the switch for IR control.  
+
3. Edit /boot/config.txt and add settings. IR receiver of the extension board = 26
  
1. Connect the two soldering pads of SJ1 by solder.  
+
sudo nano /boot/config.txt
2. Update and install the LIRC. Run:
+
 
 +
Add the following line to config.txt
 +
 
 +
dtoverlay=lirc-rpi,gpio_in_pin=26
 +
 
 +
4. Edit the configuration file of LIRC to enable the Infrared function:
 +
 
 +
sudo nano /etc/lirc/hardware.conf
 +
 
 +
Change the following lines:
 +
 
 +
LIRCD_ARGS="--uinput"
 +
DRIVER="default"
 +
DEVICE="/dev/lirc0"
 +
MODULES="lirc_rpi"
 +
 
 +
Note that there should be two hyphens in "--uinput".
 +
 
 +
5. Reboot the Raspberry Pi.
 +
 
 +
sudo reboot
 +
 
 +
And then, check whether the Infrared function is enabled.
 +
 
 +
ls /dev/l*
  
sudo apt-get update
+
If you see the contents are displayed as shown in the above red box, it means the function is active now.
sudo apt-get install lirc
+
 
+
1. Edit `/boot/config.txt` and add settings. IR receiver of the extension board = 26
+
  
sudo nano /boot/config.txt
+
Record the buttons
Add the following line to config.txt
+
  
dtoverlay=lirc-rpi,gpio_in_pin=26
+
sudo /etc/init.d/lirc stop
+
sudo irrecord -n -d /dev/lirc0 ~/lircd.conf
3. Edit the configuration file of LIRC to enable the Infrared function:
+
  
sudo nano /etc/lirc/hardware.conf
+
Record the buttons for your remote control as prompted. Record respectively "pause", "nextsong", "prevsong", "stop", "volumeup", and "volumedown".
Change the following lines:
+
  
LIRCD_ARGS="--uinput"
+
Overwrite the corresponding lirc file with the recorded ~/lircd.conf
DRIVER="default"
+
DEVICE="/dev/lirc0"
+
MODULES="lirc_rpi"
+
Note that there should be two hyphens in "--uinput".
+
4. Reboot the Raspberry Pi.
+
  
sudo reboot
+
sudo cp ~/lircd.conf /etc/lirc/lircd.conf
And then, check whether the Infrared function is enabled.  
+
Start lirc
+
ls /dev/l*
+
![](2.2checklirc.png)
+
If you see the contents are displayed as shown in the above red box, it means the function is active now.
+
5. Record the buttons
+
  
sudo /etc/init.d/lirc stop
+
sudo /etc/init.d/lirc start
sudo irrecord -n -d /dev/lirc0 ~/lircd.conf
+
Check the status of recording. Run
Record the buttons for your remote control as prompted. Record respectively "**pause**", "**nextsong**", "**prevsong**", "**stop**", "**volumeup**", and "**volumedown**".
+
+
Overwrite the corresponding lirc file with the recorded ~/lircd.conf
+
  
sudo cp ~/lircd.conf /etc/lirc/lircd.conf
+
irw
6. Start lirc
+
Then press the buttons recorded before in turns.
  
sudo /etc/init.d/lirc start
+
You can also view the name of the recorded and ready-for-use buttons by the command irsend
+
7. Check the status of recording. Run
+
+
irw
+
Then press the buttons recorded before in turns.
+
+
8. You can also view the name of the recorded and ready-for-use buttons by the command irsend  
+
  
irsend LIST /home/pi/lircd.conf
+
irsend LIST /home/pi/lircd.conf
You can see contents similar to the following displayed
+
You can see contents similar to the following displayed
  
irsend: 000000000000c837 pause
+
irsend: 000000000000c837 pause
irsend: 00000000000048b7 nextsong
+
irsend: 00000000000048b7 nextsong
9. Now you can send the code of the recorded buttons on the remote by the Infrared emitter. You can thus use the extension board to change programs. Refer to the following commands:
+
Now you can send the code of the recorded buttons on the remote by the Infrared emitter. You can thus use the extension board to change programs. Refer to the following commands:
  
irsend SEND_ONCE /home/pi/lircd.conf pause
+
irsend SEND_ONCE /home/pi/lircd.conf pause
irsend SEND_ONCE /home/pi/lircd.conf nextsong
+
irsend SEND_ONCE /home/pi/lircd.conf nextsong
irsend SEND_ONCE /home/pi/lircd.conf KEY_VOLUMEDOWN
+
irsend SEND_ONCE /home/pi/lircd.conf KEY_VOLUMEDOWN
irsend SEND_ONCE /home/pi/lircd.conf KEY_VOLUMEUP
+
irsend SEND_ONCE /home/pi/lircd.conf KEY_VOLUMEUP

Revision as of 09:32, 15 June 2016

2.2 Inch TFT Screen Display Extension Board

Features Size: 65mm×56.5mm, standard as a Raspberry Pi HAT board Screen sizing 2.2 inch and supporting a 320x240 resolution with high PPI, being small but able to provide a fine image Multi-button design: 6 buttons, meeting different demands for buttons from various users With an Infrared receiver Procedures for Applying TFT Screen Display with Raspbian Jessie

Download the simplified installation package at the bottom (or here). Transfer it to the Raspberry Pi. Finish the installation with Installation Guide which comes along with the product. Buttons

There are 6 buttons on the screen, which are marked by a number beginning with "#", such as #21, #22, etc. The number indicates that the pins are connected to GPIOs defined by BCM numbering.

Backlight control:

SJ2 is the switch for backlight control. Connect the two soldering pads of SJ2 by solder. You can use #27 to switch on/off the backlight.

gpio -g mode 27 in # Switch off gpio -g mode 27 out # Switch on Infrared Receiving:

SJ1 is the switch for IR control.

1.Connect the two soldering pads of SJ1 by solder. 2. Update and install the LIRC. Run:

sudo apt-get update sudo apt-get install lirc 3. Edit /boot/config.txt and add settings. IR receiver of the extension board = 26

sudo nano /boot/config.txt

Add the following line to config.txt

dtoverlay=lirc-rpi,gpio_in_pin=26

4. Edit the configuration file of LIRC to enable the Infrared function:

sudo nano /etc/lirc/hardware.conf

Change the following lines:

LIRCD_ARGS="--uinput" DRIVER="default" DEVICE="/dev/lirc0" MODULES="lirc_rpi"

Note that there should be two hyphens in "--uinput".

5. Reboot the Raspberry Pi.

sudo reboot

And then, check whether the Infrared function is enabled.

ls /dev/l*

If you see the contents are displayed as shown in the above red box, it means the function is active now.

Record the buttons

sudo /etc/init.d/lirc stop sudo irrecord -n -d /dev/lirc0 ~/lircd.conf

Record the buttons for your remote control as prompted. Record respectively "pause", "nextsong", "prevsong", "stop", "volumeup", and "volumedown".

Overwrite the corresponding lirc file with the recorded ~/lircd.conf

sudo cp ~/lircd.conf /etc/lirc/lircd.conf Start lirc

sudo /etc/init.d/lirc start Check the status of recording. Run

irw Then press the buttons recorded before in turns.

You can also view the name of the recorded and ready-for-use buttons by the command irsend

irsend LIST /home/pi/lircd.conf You can see contents similar to the following displayed

irsend: 000000000000c837 pause irsend: 00000000000048b7 nextsong Now you can send the code of the recorded buttons on the remote by the Infrared emitter. You can thus use the extension board to change programs. Refer to the following commands:

irsend SEND_ONCE /home/pi/lircd.conf pause irsend SEND_ONCE /home/pi/lircd.conf nextsong irsend SEND_ONCE /home/pi/lircd.conf KEY_VOLUMEDOWN irsend SEND_ONCE /home/pi/lircd.conf KEY_VOLUMEUP