int main ( void ) { enableLEDs(); turnOffAllLEDs(); while(1) { runOS(); PROGRAM_TICKS += 1; } return 0; };
Pendant::Pendant(uint8_t _modes) { modes = _modes; ADCSRA = 0; // turn off ADC to save power GIMSK |= _BV(PCIE0); // enable pin change interrupts setBrightness(brightness); // Create the LED array. FastLED.addLeds< APA102, PENDANT_LED_DATA_PIN, PENDANT_LED_CLOCK_PIN, BGR >(leds, PENDANT_NUM_LEDS); // Enable an internal pullup resistor on the button pin. // HIGH is normal, LOW is pressed pinMode(PENDANT_BUTTON_PIN, INPUT_PULLUP); // Turn on the power switch for the LEDs. pinMode(PENDANT_LED_PWR_PIN, OUTPUT); enableLEDs(); }