Add ifdefs for my trinket-based one

This commit is contained in:
Neale Pickett 2021-12-21 16:30:03 -07:00
parent 3b6bf9b089
commit 2298e077e2
1 changed files with 15 additions and 3 deletions

View File

@ -9,16 +9,23 @@
#define FLASH_EEPROM true #define FLASH_EEPROM true
#endif #endif
//#define DEBUG #ifdef ARDUINO_TRINKET_M0
#include <Adafruit_DotStar.h>
Adafruit_DotStar dotstar = Adafruit_DotStar(1, INTERNAL_DS_DATA, INTERNAL_DS_CLK, DOTSTAR_BGR);
#define LEDS_PIN 2
#else
// Which pins your NeoPixels are connected to // Which pins your NeoPixels are connected to
#define LEDS_PIN 2 #define LEDS_PIN 4
#endif
// How many LEDS you have. 24 for xmas advent, 9 for menorah, etc. // How many LEDS you have. 24 for xmas advent, 9 for menorah, etc.
#define NUM_LEDS 24 #define NUM_LEDS 24
// Want one of them to be white? // Want one of them to be white?
#define THE_WHITE_ONE 23 #define THE_WHITE_ONE (NUM_LEDS - 1)
// How many milliseconds between twinkling // How many milliseconds between twinkling
#define DELAY_MS 1000 #define DELAY_MS 1000
@ -57,6 +64,11 @@ void setup() {
pinMode(LED_BUILTIN, OUTPUT); pinMode(LED_BUILTIN, OUTPUT);
#ifdef ARDUINO_TRINKET_M0
dotstar.begin();
dotstar.show();
#endif
#if defined(DEBUG) #if defined(DEBUG)
lastLightOn = NUM_LEDS - 1; lastLightOn = NUM_LEDS - 1;
#elif defined(FLASH_AS_EEPROM_h) #elif defined(FLASH_AS_EEPROM_h)