Updated internal LED code to work better with bundler
This commit is contained in:
parent
3bb9bc2b54
commit
97c8ca29fc
2 changed files with 17 additions and 9 deletions
|
|
@ -7,11 +7,15 @@ import time
|
|||
import board
|
||||
|
||||
# For Trinket M0, Gemma M0, ItsyBitsy M0 Express, and ItsyBitsy M4 Express
|
||||
import adafruit_dotstar
|
||||
led = adafruit_dotstar.DotStar(board.APA102_SCK, board.APA102_MOSI, 1)
|
||||
if hasattr(board, "APA102_SCK"):
|
||||
import adafruit_dotstar
|
||||
|
||||
led = adafruit_dotstar.DotStar(board.APA102_SCK, board.APA102_MOSI, 1)
|
||||
# For Feather M0 Express, Metro M0 Express, Metro M4 Express, Circuit Playground Express, QT Py M0
|
||||
# import neopixel
|
||||
# led = neopixel.NeoPixel(board.NEOPIXEL, 1)
|
||||
else:
|
||||
import neopixel
|
||||
|
||||
led = neopixel.NeoPixel(board.NEOPIXEL, 1)
|
||||
|
||||
led.brightness = 0.3
|
||||
|
||||
|
|
|
|||
|
|
@ -7,12 +7,16 @@ import time
|
|||
import board
|
||||
from rainbowio import colorwheel
|
||||
|
||||
# For Trinket M0, Gemma M0, ItsyBitsy M0 Express and ItsyBitsy M4 Express
|
||||
import adafruit_dotstar
|
||||
led = adafruit_dotstar.DotStar(board.APA102_SCK, board.APA102_MOSI, 1)
|
||||
# For Trinket M0, Gemma M0, ItsyBitsy M0 Express, and ItsyBitsy M4 Express
|
||||
if hasattr(board, "APA102_SCK"):
|
||||
import adafruit_dotstar
|
||||
|
||||
led = adafruit_dotstar.DotStar(board.APA102_SCK, board.APA102_MOSI, 1)
|
||||
# For Feather M0 Express, Metro M0 Express, Metro M4 Express, Circuit Playground Express, QT Py M0
|
||||
# import neopixel
|
||||
# led = neopixel.NeoPixel(board.NEOPIXEL, 1)
|
||||
else:
|
||||
import neopixel
|
||||
|
||||
led = neopixel.NeoPixel(board.NEOPIXEL, 1)
|
||||
|
||||
led.brightness = 0.3
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue