-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.py
206 lines (203 loc) · 3.62 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
## URLs for VCR clock display
urlPHP = 'http://<path-to-file>/json.php?tv=<client>' #URL to php file that generates JSON
urlJSON = 'http://<path-to-file>/<client>.json' #URL of generated JSON file
## Display and Refresh Settings
clockMode = "24h" #set clock to 12h or 24h mode
transitionDelay = 5 #ms delay between letters, set higher for slower transition
loopDelay = 4900 #ms between data updates
scrollDelay = 8 #ms for scroll speed (lower is faster)
showDate = False #whether or not to show the date in the "off" state (True or False)
charWidth = 20 #maximum single-line width of display
## VFD Connector to GPIO Settings
pinout = {
'J1-14':24, # Reset
'J1-12':6, # Ground
'J1-11':4, # +5V @ 370mA (TYP)
'J1-10':23,# D0 (LSB)
'J1-9':40, # D1
'J1-8':38, # D2
'J1-7':36, # D3
'J1-6':32, # D4
'J1-5':37, # D5
'J1-4':35, # D6
'J1-3':33, # D7
'J1-2':31, # Write Strobe
'J1-1':29 # Busy
}
## Character Dictionary
charDict = { #dictionary of characters and corresponding hex values
" ":'20',
'!':'21',
'"':'22',
'#':'23',
'$':'24',
'%':'25',
'&':'26',
'\'':'27',
'(':'28',
')':'29',
'*':'2A',
'+':'2B',
',':'2C',
'-':'2D',
'.':'2E',
'/':'2F',
'0':'30',
'1':'31',
'2':'32',
'3':'33',
'4':'34',
'5':'35',
'6':'36',
'7':'37',
'8':'38',
'9':'39',
':':'3A',
';':'3B',
'<':'3C',
'=':'3D',
'>':'3E',
'?':'3F',
'@':'40',
'A':'41',
'B':'42',
'C':'43',
'D':'44',
'E':'45',
'F':'46',
'G':'47',
'H':'48',
'I':'49',
'J':'4A',
'K':'4B',
'L':'4C',
'M':'4D',
'N':'4E',
'O':'4F',
'P':'50',
'Q':'51',
'R':'52',
'S':'53',
'T':'54',
'U':'55',
'V':'56',
'W':'57',
'X':'58',
'Y':'59',
'Z':'5A',
'[':'5B',
'¥':'5C',
']':'5D',
'^':'5E',
'_':'5F',
'`':'60',
'a':'61',
'b':'62',
'c':'63',
'd':'64',
'e':'65',
'f':'66',
'g':'67',
'h':'68',
'i':'69',
'j':'6A',
'k':'6B',
'l':'6C',
'm':'6D',
'n':'6E',
'o':'6F',
'p':'70',
'q':'71',
'r':'72',
's':'73',
't':'74',
'u':'75',
'v':'76',
'w':'77',
'x':'78',
'y':'79',
'z':'7A',
'{':'7B',
'₤':'7C',
'}':'7D',
'°':'7E',
'Ä':'A0',
'Å':'A1',
'Á':'A2',
'Ç':'A3',
'Â':'A4',
'Æ':'A5',
'É':'A6',
'È':'A7',
'Ê':'A8',
'Ï':'A9',
'Í':'AA',
'Ì':'AB',
'Î':'AC',
'Ö':'AD',
'Ñ':'AE',
'Ø':'AF',
'Ó':'B0',
'Ò':'B1',
'À':'B2',
'ß':'B3',
'Ë':'B4',
'Ü':'B5',
'Ú':'B6',
'Ù':'B7',
'Û':'B8',
'±':'BA',
'÷':'BB',
'→':'BC',
'⇒':'BD',
'◆':'BE',
'ä':'C0',
'å':'C1',
'á':'C2',
'ç':'C3',
'â':'C4',
'æ':'C5',
'é':'C6',
'è':'C7',
'ê':'C8',
'ï':'C9',
'í':'CA',
'ì':'CB',
'î':'CC',
'ö':'CD',
'ñ':'CE',
'ø':'CF',
'ó':'D0',
'ò':'D1',
'à':'D2',
'¢':'D3',
'ë':'D4',
'ü':'D5',
'ú':'D6',
'ù':'D7',
'û':'D8',
'○':'D9',
'⊙':'DA',
'●':'DB',
'▫':'DC',
'▪':'DD',
'◇':'DE',
'⓿':'E0',
'❶':'E1',
'❷':'E2',
'❸':'E3',
'❹':'E4',
'❺':'E5',
'❻':'E6',
'❼':'E7',
'❽':'E8',
'❾':'E9',
'¡':'80',
'½':'312F32',
'⅓':'312F33',
'¼':'312F34',
'¾':'332F34',
'¿':'EA',
'–':'2D',
'…':'2E2E2E',
}