Datasheet

Arduino Code
Plug in GEMMA over USB and load the following code into your Adafruit Arduino IDE. If you haven't before, check out
our Introducing GEMMA guide to get started with the software.
This sketch is a mash-up of two very basic Arduino examples: blink and fade. You can modify it to display the patterns
of light you like best or code up your own sketch starting with the examples provided from inside Arduino.
int brightness = 0; // how bright the LED is
int fadeAmount = 5; // how many points to fade the LED by
int counter = 0; // counter to keep track of cycles
// the setup routine runs once when you press reset:
void setup() {
// declare pins to be an outputs:
pinMode(0, OUTPUT);
pinMode(2, OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
// set the brightness of the analog-connected LEDs:
analogWrite(0, brightness);
// change the brightness for next time through the loop:
brightness = brightness + fadeAmount;
// reverse the direction of the fading at the ends of the fade:
if (brightness == 0 || brightness == 255) {
fadeAmount = -fadeAmount;
counter++;
}
// wait for 15 milliseconds to see the dimming effect
delay(15);
// turns on the other LEDs every four times through the fade by
// checking the modulo of the counter.
// the modulo function gives you the remainder of
// the division of two numbers:
if (counter % 4 == 0) {
digitalWrite(2, HIGH);
} else {
digitalWrite(2, LOW);
}
}
© Adafruit Industries https://learn.adafruit.com/adafruit-led-sequins Page 15 of 19