Skip to content

Commit f1fea6b

Browse files
committed
init
1 parent e5b7274 commit f1fea6b

File tree

7 files changed

+303
-0
lines changed

7 files changed

+303
-0
lines changed

README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Graphic ST7565 LCD Display with Python (on Raspberry Pi)
2+
3+
This guide shows you how to connect the [Graphic ST7565 Positive LCD (128x64) from Adafruit](https://www.adafruit.com/products/250) to the Raspberry Pi (1 or 2) and control it with Python. The provided script is very simple and works as a proof of concept.
4+
5+
I created this guide because I could not find a complete guide how to use the ST7565 with python.
6+
7+
![image of the running display](images/display.jpg)
8+
9+
## Connecting the wires
10+
11+
1. Solder wires to the LCD
12+
2. Connect the wires with the Raspberry Pi:
13+
14+
15+
| LCD Pin | Raspberry Pi Pin Name (GPIO.BCM) | Raspberry Pi Pin Number |
16+
|-----| |-----| |-----|
17+
| CS| BCM 2 | 3 |
18+
| RST| BCM 3 | 5 |
19+
| A0| BCM 4 | 7 |
20+
| CLK| BCM 27 | 13 |
21+
| SI| BCM 17 | 11 |
22+
| VDD| 3.3V | 1 |
23+
| GND| GND | 6 |
24+
| R- | (not tested) | - |
25+
| A+ | 3.3V | 1 |
26+
| G- | (not tested) | - |
27+
| B- | (not tested) | - |
28+
29+
See the position of the Pins at http://pinout.xyz/.
30+
31+
![image of the pins on raspberry pi](images/pins-rasp1.jpg)
32+
![image of the pins on raspberry pi](images/pins-rasp2.jpg)
33+
34+
## Installing requirements
35+
The Raspbian operating system provides the required python binary and the [Rpi.GPIO Module] (https://sourceforge.net/projects/raspberry-gpio-python/).
36+
37+
38+
## Python software
39+
Copy the python file [display.py](display.py) to the Raspberry Pi and run it. Extend the script. It is very simple and just a proof of work. The script is based on the Forum discussion at https://www.raspberrypi.org/forums/viewtopic.php?f=32&t=25029
40+
41+
You might want to try as well:
42+
- https://github.com/MaliceWitch/ST7565-Pi-Python
43+
- https://github.com/larsks/py-st7565
44+
45+
### Specification
46+
If you with to develop it further, you should look at the specification: https://cdn-shop.adafruit.com/product-files/250/TG12864H3-04MA0_A00.pdf
47+
48+
## Further reading
49+
- http://www.ladyada.net/learn/lcd/st7565.html
50+
- C Code for Arduino: https://github.com/adafruit/ST7565-LCD

TG12864H3-04MA0_A00.pdf

1.06 MB
Binary file not shown.

display.py

Lines changed: 253 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,253 @@
1+
"""
2+
Proof of concept for the Graphic ST7565 LCD Display
3+
on Raspberry Pi.
4+
Based on code from: https://www.raspberrypi.org/forums/viewtopic.php?f=32&t=25029
5+
"""
6+
7+
import RPi.GPIO as GPIO
8+
import time
9+
10+
11+
LCD_CS = 2
12+
LCD_RST = 3
13+
LCD_A0 = 4
14+
LCD_CLK = 27
15+
LCD_SI = 17
16+
17+
18+
def main():
19+
io_init()
20+
lcd_init()
21+
lcd_ascii168_string(0, 0, "abcdefghijklmnop")
22+
lcd_ascii168_string(0, 2, "This is a demo. ")
23+
lcd_ascii168_string(0, 4, " synox @ github ")
24+
lcd_ascii168_string(0, 6, "0123456789! :) ")
25+
26+
27+
def io_init():
28+
GPIO.setmode(GPIO.BCM)
29+
# GPIO.setwarnings(False)
30+
GPIO.setup(LCD_CS, GPIO.OUT)
31+
GPIO.setup(LCD_RST, GPIO.OUT)
32+
GPIO.setup(LCD_A0, GPIO.OUT)
33+
GPIO.setup(LCD_CLK, GPIO.OUT)
34+
GPIO.setup(LCD_SI, GPIO.OUT)
35+
36+
37+
def lcd_init():
38+
GPIO.output(LCD_CS, True)
39+
GPIO.output(LCD_RST, False)
40+
GPIO.output(LCD_RST, True)
41+
lcd_tranfer_data(0xe2, 0) # Internal reset
42+
43+
lcd_tranfer_data(0xa2, 0) # Sets the LCD drive voltage bias ratio ## TODO: i set to a2 instead of a3
44+
##A2: 1/9 bias
45+
##A3: 1/7 bias (ST7565V)
46+
47+
lcd_tranfer_data(0xa0, 0) # Sets the display RAM address SEG output correspondence
48+
##A0: normal
49+
##A1: reverse
50+
51+
lcd_tranfer_data(0xc8, 0) # Select COM output scan direction
52+
##C0~C7: normal direction
53+
##C8~CF: reverse direction
54+
55+
lcd_tranfer_data(0xa4, 0) # Display all points ON/OFF
56+
##A4: normal display
57+
##A5: all points ON
58+
59+
lcd_tranfer_data(0xa6, 0) # Sets the LCD display normal/inverted
60+
##A6: normal
61+
##A7: inverted
62+
63+
lcd_tranfer_data(0x2F, 0) # select internal power supply operating mode
64+
##28~2F: Operating mode
65+
66+
lcd_tranfer_data(0x60, 0) # Display start line set
67+
##40~7F Display start address
68+
69+
lcd_tranfer_data(0x27, 0) # V5 voltage regulator internal resistor ratio set(contrast)
70+
##20~27 small~large
71+
72+
lcd_tranfer_data(0x81, 0) # Electronic volume mode set
73+
##81: Set the V5 output voltage
74+
75+
lcd_tranfer_data(0x30, 0) # Electronic volume register set
76+
##00~3F: electronic volume register
77+
78+
lcd_tranfer_data(0b10101111, 0) # Display ON/OFF
79+
## 0b10101111: ON
80+
## 0b10101110: OFF
81+
lcd_clear()
82+
83+
84+
def lcd_ascii168_string(x_pos, y_pos, string):
85+
string_len = len(string)
86+
for i in range(0, string_len):
87+
lcd_ascii168(x_pos + i * 8, y_pos, ord(string[i]) - 32)
88+
89+
90+
def lcd_ascii168(x_pos, y_pos, char):
91+
lcd_set_page(y_pos, x_pos)
92+
93+
94+
for i in range(0, 8):
95+
lcd_tranfer_data(ASCII168[char][i], 1)
96+
97+
lcd_set_page(y_pos + 1, x_pos)
98+
for i in range(8, 16):
99+
lcd_tranfer_data(ASCII168[char][i], 1)
100+
101+
102+
def lcd_clear():
103+
GPIO.output(LCD_CS, False)
104+
for i in range(0, 8):
105+
lcd_set_page(i, 0)
106+
for j in range(0, 128):
107+
lcd_tranfer_data(0x00, 1)
108+
GPIO.output(LCD_CS, True)
109+
110+
111+
def lcd_set_page(page, column):
112+
lsb = column & 0x0f
113+
msb = column & 0xf0
114+
msb >>= 4
115+
msb |= 0x10
116+
page |= 0xb0
117+
lcd_tranfer_data(page, 0)
118+
lcd_tranfer_data(msb, 0)
119+
lcd_tranfer_data(lsb, 0)
120+
121+
122+
def lcd_tranfer_data(value, A0):
123+
GPIO.output(LCD_CS, False)
124+
GPIO.output(LCD_CLK, True)
125+
if (A0):
126+
GPIO.output(LCD_A0, True)
127+
else:
128+
GPIO.output(LCD_A0, False)
129+
lcd_byte(value)
130+
GPIO.output(LCD_CS, True)
131+
132+
133+
def lcd_byte(bits):
134+
tmp = bits
135+
for i in range(0, 8):
136+
GPIO.output(LCD_CLK, False)
137+
if (tmp & 0x80):
138+
GPIO.output(LCD_SI, True)
139+
else:
140+
GPIO.output(LCD_SI, False)
141+
tmp = (tmp << 1)
142+
GPIO.output(LCD_CLK, True)
143+
144+
145+
ASCII168 = (
146+
147+
(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
148+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00), # " ",0
149+
(0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x30, 0x00, 0x00, 0x00), # "!",1
150+
(0x00, 0x10, 0x0C, 0x06, 0x10, 0x0C, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00), # """,2
151+
(0x40, 0xC0, 0x78, 0x40, 0xC0, 0x78, 0x40, 0x00, 0x04, 0x3F, 0x04, 0x04, 0x3F, 0x04, 0x04, 0x00), # "#",3
152+
(0x00, 0x70, 0x88, 0xFC, 0x08, 0x30, 0x00, 0x00, 0x00, 0x18, 0x20, 0xFF, 0x21, 0x1E, 0x00, 0x00), # "$",4
153+
(0xF0, 0x08, 0xF0, 0x00, 0xE0, 0x18, 0x00, 0x00, 0x00, 0x21, 0x1C, 0x03, 0x1E, 0x21, 0x1E, 0x00), # "%",5
154+
(0x00, 0xF0, 0x08, 0x88, 0x70, 0x00, 0x00, 0x00, 0x1E, 0x21, 0x23, 0x24, 0x19, 0x27, 0x21, 0x10), # "&",6
155+
(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xB0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00), # ",",7
156+
(0x00, 0x00, 0x00, 0xE0, 0x18, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x07, 0x18, 0x20, 0x40, 0x00), # "(",8
157+
(0x00, 0x02, 0x04, 0x18, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x20, 0x18, 0x07, 0x00, 0x00, 0x00), # ")",9
158+
(0x40, 0x40, 0x80, 0xF0, 0x80, 0x40, 0x40, 0x00, 0x02, 0x02, 0x01, 0x0F, 0x01, 0x02, 0x02, 0x00), # "*",10
159+
(0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x1F, 0x01, 0x01, 0x01, 0x00), # "+",11
160+
(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xB0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00), # ",",12
161+
(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01), # "-",13
162+
(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00), # ".",14
163+
(0x00, 0x00, 0x00, 0x00, 0x80, 0x60, 0x18, 0x04, 0x00, 0x60, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00), # "/",15
164+
(0x00, 0xE0, 0x10, 0x08, 0x08, 0x10, 0xE0, 0x00, 0x00, 0x0F, 0x10, 0x20, 0x20, 0x10, 0x0F, 0x00), # "0",16
165+
(0x00, 0x10, 0x10, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x3F, 0x20, 0x20, 0x00, 0x00), # "1",17
166+
(0x00, 0x70, 0x08, 0x08, 0x08, 0x88, 0x70, 0x00, 0x00, 0x30, 0x28, 0x24, 0x22, 0x21, 0x30, 0x00), # "2",18
167+
(0x00, 0x30, 0x08, 0x88, 0x88, 0x48, 0x30, 0x00, 0x00, 0x18, 0x20, 0x20, 0x20, 0x11, 0x0E, 0x00), # "3",19
168+
(0x00, 0x00, 0xC0, 0x20, 0x10, 0xF8, 0x00, 0x00, 0x00, 0x07, 0x04, 0x24, 0x24, 0x3F, 0x24, 0x00), # "4",20
169+
(0x00, 0xF8, 0x08, 0x88, 0x88, 0x08, 0x08, 0x00, 0x00, 0x19, 0x21, 0x20, 0x20, 0x11, 0x0E, 0x00), # "5",21
170+
(0x00, 0xE0, 0x10, 0x88, 0x88, 0x18, 0x00, 0x00, 0x00, 0x0F, 0x11, 0x20, 0x20, 0x11, 0x0E, 0x00), # "6",22
171+
(0x00, 0x38, 0x08, 0x08, 0xC8, 0x38, 0x08, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00), # "7",23
172+
(0x00, 0x70, 0x88, 0x08, 0x08, 0x88, 0x70, 0x00, 0x00, 0x1C, 0x22, 0x21, 0x21, 0x22, 0x1C, 0x00), # "8",24
173+
(0x00, 0xE0, 0x10, 0x08, 0x08, 0x10, 0xE0, 0x00, 0x00, 0x00, 0x31, 0x22, 0x22, 0x11, 0x0F, 0x00), # "9",25
174+
(0x00, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00), # ":",26
175+
(0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x60, 0x00, 0x00, 0x00, 0x00), # ";",27
176+
(0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x08, 0x00, 0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x00), # "<",28
177+
(0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00), # "=",29
178+
(0x00, 0x08, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x00), # ">",30
179+
(0x00, 0x70, 0x48, 0x08, 0x08, 0x08, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x36, 0x01, 0x00, 0x00), # "?",31
180+
(0xC0, 0x30, 0xC8, 0x28, 0xE8, 0x10, 0xE0, 0x00, 0x07, 0x18, 0x27, 0x24, 0x23, 0x14, 0x0B, 0x00), # "@",32
181+
(0x00, 0x00, 0xC0, 0x38, 0xE0, 0x00, 0x00, 0x00, 0x20, 0x3C, 0x23, 0x02, 0x02, 0x27, 0x38, 0x20), # "A",33
182+
(0x08, 0xF8, 0x88, 0x88, 0x88, 0x70, 0x00, 0x00, 0x20, 0x3F, 0x20, 0x20, 0x20, 0x11, 0x0E, 0x00), # "B",34
183+
(0xC0, 0x30, 0x08, 0x08, 0x08, 0x08, 0x38, 0x00, 0x07, 0x18, 0x20, 0x20, 0x20, 0x10, 0x08, 0x00), # "C",35
184+
(0x08, 0xF8, 0x08, 0x08, 0x08, 0x10, 0xE0, 0x00, 0x20, 0x3F, 0x20, 0x20, 0x20, 0x10, 0x0F, 0x00), # "D",36
185+
(0x08, 0xF8, 0x88, 0x88, 0xE8, 0x08, 0x10, 0x00, 0x20, 0x3F, 0x20, 0x20, 0x23, 0x20, 0x18, 0x00), # "E",37
186+
(0x08, 0xF8, 0x88, 0x88, 0xE8, 0x08, 0x10, 0x00, 0x20, 0x3F, 0x20, 0x00, 0x03, 0x00, 0x00, 0x00), # "F",38
187+
(0xC0, 0x30, 0x08, 0x08, 0x08, 0x38, 0x00, 0x00, 0x07, 0x18, 0x20, 0x20, 0x22, 0x1E, 0x02, 0x00), # "G",39
188+
(0x08, 0xF8, 0x08, 0x00, 0x00, 0x08, 0xF8, 0x08, 0x20, 0x3F, 0x21, 0x01, 0x01, 0x21, 0x3F, 0x20), # "H",40
189+
(0x00, 0x08, 0x08, 0xF8, 0x08, 0x08, 0x00, 0x00, 0x00, 0x20, 0x20, 0x3F, 0x20, 0x20, 0x00, 0x00), # "I",41
190+
(0x00, 0x00, 0x08, 0x08, 0xF8, 0x08, 0x08, 0x00, 0xC0, 0x80, 0x80, 0x80, 0x7F, 0x00, 0x00, 0x00), # "J",42
191+
(0x08, 0xF8, 0x88, 0xC0, 0x28, 0x18, 0x08, 0x00, 0x20, 0x3F, 0x20, 0x01, 0x26, 0x38, 0x20, 0x00), # "K",43
192+
(0x08, 0xF8, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x3F, 0x20, 0x20, 0x20, 0x20, 0x30, 0x00), # "L",44
193+
(0x08, 0xF8, 0xF8, 0x00, 0xF8, 0xF8, 0x08, 0x00, 0x20, 0x3F, 0x00, 0x3F, 0x00, 0x3F, 0x20, 0x00), # "M",45
194+
(0x08, 0xF8, 0x30, 0xC0, 0x00, 0x08, 0xF8, 0x08, 0x20, 0x3F, 0x20, 0x00, 0x07, 0x18, 0x3F, 0x00), # "N",46
195+
(0xE0, 0x10, 0x08, 0x08, 0x08, 0x10, 0xE0, 0x00, 0x0F, 0x10, 0x20, 0x20, 0x20, 0x10, 0x0F, 0x00), # "O",47
196+
(0x08, 0xF8, 0x08, 0x08, 0x08, 0x08, 0xF0, 0x00, 0x20, 0x3F, 0x21, 0x01, 0x01, 0x01, 0x00, 0x00), # "P",48
197+
(0xE0, 0x10, 0x08, 0x08, 0x08, 0x10, 0xE0, 0x00, 0x0F, 0x18, 0x24, 0x24, 0x38, 0x50, 0x4F, 0x00), # "Q",49
198+
(0x08, 0xF8, 0x88, 0x88, 0x88, 0x88, 0x70, 0x00, 0x20, 0x3F, 0x20, 0x00, 0x03, 0x0C, 0x30, 0x20), # "R",50
199+
(0x00, 0x70, 0x88, 0x08, 0x08, 0x08, 0x38, 0x00, 0x00, 0x38, 0x20, 0x21, 0x21, 0x22, 0x1C, 0x00), # "S",51
200+
(0x18, 0x08, 0x08, 0xF8, 0x08, 0x08, 0x18, 0x00, 0x00, 0x00, 0x20, 0x3F, 0x20, 0x00, 0x00, 0x00), # "T",52
201+
(0x08, 0xF8, 0x08, 0x00, 0x00, 0x08, 0xF8, 0x08, 0x00, 0x1F, 0x20, 0x20, 0x20, 0x20, 0x1F, 0x00), # "U",53
202+
(0x08, 0x78, 0x88, 0x00, 0x00, 0xC8, 0x38, 0x08, 0x00, 0x00, 0x07, 0x38, 0x0E, 0x01, 0x00, 0x00), # "V",54
203+
(0xF8, 0x08, 0x00, 0xF8, 0x00, 0x08, 0xF8, 0x00, 0x03, 0x3C, 0x07, 0x00, 0x07, 0x3C, 0x03, 0x00), # "W",55
204+
(0x08, 0x18, 0x68, 0x80, 0x80, 0x68, 0x18, 0x08, 0x20, 0x30, 0x2C, 0x03, 0x03, 0x2C, 0x30, 0x20), # "X",56
205+
(0x08, 0x38, 0xC8, 0x00, 0xC8, 0x38, 0x08, 0x00, 0x00, 0x00, 0x20, 0x3F, 0x20, 0x00, 0x00, 0x00), # "Y",57
206+
(0x10, 0x08, 0x08, 0x08, 0xC8, 0x38, 0x08, 0x00, 0x20, 0x38, 0x26, 0x21, 0x20, 0x20, 0x18, 0x00), # "Z",58
207+
(0x00, 0x00, 0x00, 0xFE, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x40, 0x40, 0x40, 0x00), # "[",59
208+
(0x00, 0x00, 0x00, 0x00, 0x80, 0x60, 0x18, 0x04, 0x00, 0x60, 0x18, 0x06, 0x01, 0x00, 0x00, 0x00), # "/",60
209+
(0x00, 0x02, 0x02, 0x02, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x7F, 0x00, 0x00, 0x00), # "]",61
210+
(0x00, 0x00, 0x04, 0x02, 0x02, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00), # "^",62
211+
(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01), # "-",63
212+
(0x00, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x38, 0xC0, 0x00), # "\",64
213+
(0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x19, 0x24, 0x22, 0x22, 0x22, 0x3F, 0x20), # "a",65
214+
(0x08, 0xF8, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x11, 0x20, 0x20, 0x11, 0x0E, 0x00), # "b",66
215+
(0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x0E, 0x11, 0x20, 0x20, 0x20, 0x11, 0x00), # "c",67
216+
(0x00, 0x00, 0x00, 0x80, 0x80, 0x88, 0xF8, 0x00, 0x00, 0x0E, 0x11, 0x20, 0x20, 0x10, 0x3F, 0x20), # "d",68
217+
(0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x1F, 0x22, 0x22, 0x22, 0x22, 0x13, 0x00), # "e",69
218+
(0x00, 0x80, 0x80, 0xF0, 0x88, 0x88, 0x88, 0x18, 0x00, 0x20, 0x20, 0x3F, 0x20, 0x20, 0x00, 0x00), # "f",70
219+
(0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x6B, 0x94, 0x94, 0x94, 0x93, 0x60, 0x00), # "g",71
220+
(0x08, 0xF8, 0x00, 0x80, 0x80, 0x80, 0x00, 0x00, 0x20, 0x3F, 0x21, 0x00, 0x00, 0x20, 0x3F, 0x20), # "h",72
221+
(0x00, 0x80, 0x98, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x3F, 0x20, 0x20, 0x00, 0x00), # "i",73
222+
(0x00, 0x00, 0x00, 0x80, 0x98, 0x98, 0x00, 0x00, 0x00, 0xC0, 0x80, 0x80, 0x80, 0x7F, 0x00, 0x00), # "j",74
223+
(0x08, 0xF8, 0x00, 0x00, 0x80, 0x80, 0x80, 0x00, 0x20, 0x3F, 0x24, 0x02, 0x2D, 0x30, 0x20, 0x00), # "k",75
224+
(0x00, 0x08, 0x08, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x3F, 0x20, 0x20, 0x00, 0x00), # "l",76
225+
(0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x20, 0x3F, 0x20, 0x00, 0x3F, 0x20, 0x00, 0x3F), # "m",77
226+
(0x80, 0x80, 0x00, 0x80, 0x80, 0x80, 0x00, 0x00, 0x20, 0x3F, 0x21, 0x00, 0x00, 0x20, 0x3F, 0x20), # "n",79
227+
(0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x1F, 0x20, 0x20, 0x20, 0x20, 0x1F, 0x00), # "o",80
228+
(0x80, 0x80, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xA1, 0x20, 0x20, 0x11, 0x0E, 0x00), # "p",81
229+
(0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x0E, 0x11, 0x20, 0x20, 0xA0, 0xFF, 0x80), # "q",82
230+
(0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x80, 0x00, 0x20, 0x20, 0x3F, 0x21, 0x20, 0x00, 0x01, 0x00), # "r",83
231+
(0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x33, 0x24, 0x24, 0x24, 0x24, 0x19, 0x00), # "s",84
232+
(0x00, 0x80, 0x80, 0xE0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x20, 0x20, 0x00, 0x00), # "t",85
233+
(0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x1F, 0x20, 0x20, 0x20, 0x10, 0x3F, 0x20), # "u",86
234+
(0x80, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x80, 0x00, 0x01, 0x0E, 0x30, 0x08, 0x06, 0x01, 0x00), # "v",87
235+
(0x80, 0x80, 0x00, 0x80, 0x00, 0x80, 0x80, 0x80, 0x0F, 0x30, 0x0C, 0x03, 0x0C, 0x30, 0x0F, 0x00), # "w",88
236+
(0x00, 0x80, 0x80, 0x00, 0x80, 0x80, 0x80, 0x00, 0x00, 0x20, 0x31, 0x2E, 0x0E, 0x31, 0x20, 0x00), # "x",89
237+
(0x80, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x81, 0x8E, 0x70, 0x18, 0x06, 0x01, 0x00), # "y",90
238+
(0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x21, 0x30, 0x2C, 0x22, 0x21, 0x30, 0x00), # "z",91
239+
(0x00, 0x00, 0x00, 0x00, 0x80, 0x7C, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x40, 0x40), # "{",92
240+
(0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00), # "|",93
241+
(0x00, 0x02, 0x02, 0x7C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x3F, 0x00, 0x00, 0x00, 0x00), # "}",94
242+
(0x00, 0x06, 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00), # "~",95
243+
)
244+
245+
246+
GPIO.setwarnings(False)
247+
main()
248+
249+
try:
250+
while True:
251+
time.sleep(1.0)
252+
except:
253+
GPIO.cleanup()

images/display.jpg

468 KB
Loading

images/pins-display.jpg

349 KB
Loading

images/pins-rasp1.jpg

497 KB
Loading

images/pins-rasp2.jpg

460 KB
Loading

0 commit comments

Comments
 (0)