Commit 643fec5b authored by Adam Blank's avatar Adam Blank
Browse files

autocommit

parent f5fd921f
No related merge requests found
Showing with 10 additions and 3 deletions
+10 -3
......@@ -3,18 +3,25 @@ try:
import neopixel
from adafruit_apds9960.apds9960 import APDS9960
import touchio
import supervisor
supervisor.runtime.autoreload = True
except ModuleNotFoundError:
pass
else:
from interact import run
print("Setting up Trinkey...")
# Setup board
i2c = board.I2C()
apds = APDS9960(i2c)
pixels = neopixel.NeoPixel(board.NEOPIXEL, 2)
pixels = neopixel.NeoPixel(board.NEOPIXEL, 2, brightness=0.2)
touch = touchio.TouchIn(board.TOUCH2)
apds.enable_proximity = True
print("Loaded Trinkey...")
# Call our run function
run(apds, pixels, touch)
print("Starting our code!")
try:
run(apds, pixels, touch)
except KeyboardInterrupt:
print("asdf")
pass
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment