FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
vscode-python-devicesimulator/src/base_circuitpython/board.py at dev · microsoft/vscode-python-devicesimulator · GitHub
This repository was archived by the owner on Dec 23, 2021. It is now read-only.
microsoft
/
vscode-python-devicesimulator
Public archive
Notifications
You must be signed in to change notification settings
Fork
49
Star
177
Code
Issues
21
Pull requests
10
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
vscode-python-devicesimulator
/
src
/
base_circuitpython
/
board.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
128 lines (101 loc) · 1.75 KB
Breadcrumbs
vscode-python-devicesimulator
/
src
/
base_circuitpython
/
board.py
Copy path
File metadata and controls
128 lines (101 loc) · 1.75 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
# dummy class for references to board display to work
# https://learn.adafruit.com/arduino-to-circuitpython/the-board-module
import
terminal_handler
class
__Display
:
def
__init__
(
self
):
self
.
active_group
=
None
self
.
terminal
=
terminal_handler
.
Terminal
()
def
show
(
self
,
group
=
None
):
if
group
!=
self
.
active_group
:
self
.
active_group
=
group
if
group
==
None
:
self
.
terminal
.
_Terminal__draw
()
return
# if the group has no attribute called
# "draw", then it is liable for updating itself
# when it calls show
if
hasattr
(
group
,
"_Group__draw"
):
group
.
_Group__draw
()
DISPLAY
=
__Display
()
# default pin for neopixel,
# shows that this could
# refer to the CPX
# or CLUE neopixel pin
NEOPIXEL
=
"D00"
# ETC PINS WITHIN THE CLUE THAT MAY BE REFERENCED
# found by runing print(dir(board)) on clue
A0
=
0
A1
=
0
A2
=
0
A3
=
0
A4
=
0
A5
=
0
A6
=
0
A7
=
0
ACCELEROMETER_GYRO_INTERRUPT
=
0
BUTTON_A
=
0
BUTTON_B
=
0
D0
=
0
D1
=
0
D2
=
0
D3
=
0
D4
=
0
D5
=
0
D6
=
0
D7
=
0
D8
=
0
D9
=
0
D10
=
0
D11
=
0
D12
=
0
D13
=
0
D14
=
0
D15
=
0
D16
=
0
D17
=
0
D18
=
0
D19
=
0
D20
=
0
I2C
=
0
L
=
0
MICROPHONE_CLOCK
=
0
MICROPHONE_DATA
=
0
MISO
=
0
MOSI
=
0
P0
=
0
P1
=
0
P2
=
0
P3
=
0
P4
=
0
P5
=
0
P6
=
0
P7
=
0
P8
=
0
P9
=
0
P10
=
0
P11
=
0
P12
=
0
P13
=
0
P14
=
0
P15
=
0
P16
=
0
P17
=
0
P18
=
0
P19
=
0
P20
=
0
PROXIMITY_LIGHT_INTERRUPT
=
0
RX
=
0
SCK
=
0
SCL
=
0
SDA
=
0
SPEAKER
=
0
SPI
=
0
TFT_BACKLIGHT
=
0
TFT_CS
=
0
TFT_DC
=
0
TFT_MOSI
=
0
TFT_RESET
=
0
TFT_SCK
=
0
TX
=
0
UART
=
0
WHITE_LEDS
=
0
Back
|
FazBrowse Home
|
New Git URL