Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs1-24fa
project03
Commits
54bd61a2
Commit
54bd61a2
authored
8 months ago
by
Adam Blank
Browse files
Options
Download
Email Patches
Plain Diff
Update code.py
parent
37c683b3
master
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
code.py
+17
-15
code.py
with
17 additions
and
15 deletions
+17
-15
code.py
View file @
54bd61a2
try
:
import
board
import
neopixel
from
adafruit_apds9960.apds9960
import
APDS9960
import
touchio
import
board
import
neopixel
from
adafruit_apds9960.apds9960
import
APDS9960
import
touchio
from
src.interact
import
run
from
src.interact
import
run
# Setup board
i2c
=
board
.
I2C
()
apds
=
APDS9960
(
i2c
)
pixels
=
neopixel
.
NeoPixel
(
board
.
NEOPIXEL
,
2
)
touch
=
touchio
.
TouchIn
(
board
.
TOUCH2
)
apds
.
enable_proximity
=
True
print
(
"Loaded Trinkey..."
)
# Setup board
i2c
=
board
.
I2C
()
apds
=
APDS9960
(
i2c
)
pixels
=
neopixel
.
NeoPixel
(
board
.
NEOPIXEL
,
2
)
touch
=
touchio
.
TouchIn
(
board
.
TOUCH2
)
apds
.
enable_proximity
=
True
print
(
"Loaded Trinkey..."
)
# Call our run function
run
(
apds
,
pixels
,
touch
)
\ No newline at end of file
# Call our run function
run
(
apds
,
pixels
,
touch
)
except
ModuleNotFoundError
:
pass
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help