Skip to content

Instantly share code, notes, and snippets.

@Workshopshed
Last active July 22, 2016 12:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Workshopshed/8dec4ed8b89b3d89e5820114150f4bf7 to your computer and use it in GitHub Desktop.
Save Workshopshed/8dec4ed8b89b3d89e5820114150f4bf7 to your computer and use it in GitHub Desktop.
A demo of the boards
#include "FastLED.h"
#define NUM_LEDS 14
#define DATA_PIN 4
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
FastLED.clear();
face();
}
void loop() {
smile();
FastLED.show();
delay(350);
talk();
FastLED.show();
delay(350);
}
void face() {
smile();
eyes();
FastLED.show();
}
void eyes() {
leds[0] = CRGB::Blue;
leds[2] = CRGB::Blue;
}
void smile()
{
leds[7] = CRGB::Red;
leds[10] = CRGB::Red;
leds[11] = CRGB::Red;
leds[12] = CRGB::Red;
leds[13] = CRGB::Red;
leds[8] = CRGB::Black;
leds[9] = CRGB::Black;
}
void talk()
{
leds[7] = CRGB::Black;
leds[10] = CRGB::Black;
leds[8] = CRGB::Red;
leds[9] = CRGB::Red;
leds[11] = CRGB::Black;
leds[12] = CRGB::Red;
leds[13] = CRGB::Black;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment