Difference between revisions of "Pi-1.3-LCD-HAT"
From SB-Components Wiki
(→Pinout) |
(→Pinout) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 27: | Line 27: | ||
== Pinout == | == Pinout == | ||
− | |||
<table class="wikitable"> | <table class="wikitable"> | ||
<tr> <th>1.3" LCD HAT </th> <th>Raspberry Pi (BCM) </th></tr> | <tr> <th>1.3" LCD HAT </th> <th>Raspberry Pi (BCM) </th></tr> | ||
Line 37: | Line 36: | ||
<tr> <td> LCD RST </td> <td> GPIO 27 </td></tr> | <tr> <td> LCD RST </td> <td> GPIO 27 </td></tr> | ||
<tr> <td> LCD BL </td> <td> GPIO 24 </td></tr> | <tr> <td> LCD BL </td> <td> GPIO 24 </td></tr> | ||
+ | <tr> <td> KEY 1 </td> <td> GPIO 21 </td></tr> | ||
+ | <tr> <td> KEY 2 </td> <td> GPIO 20 </td></tr> | ||
+ | <tr> <td> KEY 3 </td> <td> GPIO 16 </td></tr> | ||
+ | <tr> <td> KEY 4 </td> <td> GPIO 12 </td></tr> | ||
<tr> <td> JOYSTICK UP </td> <td> GPIO 26 </td></tr> | <tr> <td> JOYSTICK UP </td> <td> GPIO 26 </td></tr> | ||
<tr> <td> JOYSTICK DOWN </td> <td> GPIO 6 </td></tr> | <tr> <td> JOYSTICK DOWN </td> <td> GPIO 6 </td></tr> | ||
<tr> <td>JOYSTICK LEFT</td> <td> GPIO 13 </td></tr> | <tr> <td>JOYSTICK LEFT</td> <td> GPIO 13 </td></tr> | ||
<tr> <td>JOYSTICK RIGHT</td> <td> GPIO 5 </td></tr> | <tr> <td>JOYSTICK RIGHT</td> <td> GPIO 5 </td></tr> | ||
− | <tr> <td>JOYSTICK | + | <tr> <td>JOYSTICK CENTER</td> <td> GPIO 19 </td></tr> |
− | |||
</table> | </table> | ||
Latest revision as of 10:26, 30 July 2021
1.3 inch LCD HAT
1.3” LCD HAT is a 1.3-inch diagonal display HAT with 240 x 240 resolution, 65K RGB colors, clear and colorful displaying effect, Four Push buttons and a joystick, designed for the Raspberry Pi to expand its engagement via SPI communication by providing a standard 40 pin GPIO interface. The 1.3" LCD HAT includes an integrated ST7789VM display driver and SPI interface, reducing the number of IO pins required. It features a 5-input joystick that is internally connected through a stackable GPIO connector header.
Features
- Raspberry Pi compatibility
- 4-wire SPI Communication
- Standard Raspberry Pi 40 Pins GPIO
- 4 directions + attached band Central press button Joystick Control
- 4- Push Buttons
- 1.3-inch Diagonal Display
- Handy and Useful
Specifications
- Operating Voltage - 3.3 V
- Pixel Size - 0.0975(H)x 0.0975(V) mm
- Pixels - 240×240 resolution
- Display Colour - 65K RGB
- Display Driver - ST7789VM
Pinout
1.3" LCD HAT | Raspberry Pi (BCM) |
---|---|
LCD DIN | GPIO 10 |
LCD CLK | GPIO 11 |
LCD DC | GPIO 25 |
LCD CS | GPIO 8 |
LCD RST | GPIO 27 |
LCD BL | GPIO 24 |
KEY 1 | GPIO 21 |
KEY 2 | GPIO 20 |
KEY 3 | GPIO 16 |
KEY 4 | GPIO 12 |
JOYSTICK UP | GPIO 26 |
JOYSTICK DOWN | GPIO 6 |
JOYSTICK LEFT | GPIO 13 |
JOYSTICK RIGHT | GPIO 5 |
JOYSTICK CENTER | GPIO 19 |
Installation
Python
- Open a terminal and run the following commands to enable SPI:
sudo raspi-config
- Choose Interfacing Options -> SPI -> Yes
- You can also use GUI method to enable SPI Go to Menu > Preferences > Raspberry Pi Configuration > Interfaces, and enable SPI
- Stack 1.3 inch LCD HAT on top of Raspberry Pi GPIO Header pins.
- Make Sure SPI is Enabled (As mentioned above)
- Now clone 1.3 inch LCD HAT Github repository by running below command in terminal
git clone https://github.com/sbcshop/1.3-LCD-HAT.git
- Enter dowloaded directory
cd 1.3-LCD-HAT
- Now run main.py by running the below command. It will display some text and an image on LCD.
python3 main.py
- You can also run "Button_demo.py" file to test joystick and buttons.
python3 Button_demo.py
Resources
Github
Datasheet
- [ ST7789VM Datasheet]