Skip to content

Instantly share code, notes, and snippets.

View Jerware's full-sized avatar

Jeremy Williams Jerware

View GitHub Profile
@avilleret
avilleret / apa102_withGlobalBrightness.ino
Last active November 6, 2016 19:16
apa102_withGlobalBrightness
#include <FastLED.h>
template <uint8_t DATA_PIN, uint8_t CLOCK_PIN, EOrder RGB_ORDER = BGR, uint8_t SPI_SPEED = DATA_RATE_MHZ(24)>
class APA102Controller_WithBrightness : public CLEDController {
typedef SPIOutput<DATA_PIN, CLOCK_PIN, SPI_SPEED> SPI;
SPI mSPI;
uint8_t bBaseValue;
void startBoundary() { mSPI.writeWord(0); mSPI.writeWord(0); }