From 0b4a52872bfdabf64463f6cf196d2a7c6acfbeda Mon Sep 17 00:00:00 2001 From: David Todd Date: Sun, 26 Jan 2020 17:17:16 -0600 Subject: [PATCH] Setup board --- board.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 board.py diff --git a/board.py b/board.py new file mode 100644 index 0000000..b6e2b52 --- /dev/null +++ b/board.py @@ -0,0 +1,12 @@ +import micropython_dotstar as dotstar +from machine import Pin, SPI + +# Configure some globals, such as the LED board +TOTAL_DOTS = 256 +DOTSTAR_CLOCK = Pin(18) +DOTSTAR_TX = Pin(19) +DOTSTAR_RX = Pin(17) # Note: This is unused as the LEDs don't send data back + +# Setup the LED board +DOTSTAR_SPI = SPI(sck=DOTSTAR_CLOCK, mosi=DOTSTAR_TX, miso=DOTSTAR_RX) +BOARD = dotstar.DotStar(DOTSTAR_SPI, TOTAL_DOTS, brightness=0.2, auto_write=False) \ No newline at end of file