// NeoPixel Ring simple sketch (c) 2013 Shae Erisson // released under the GPLv3 license to match the rest of the AdaFruit NeoPixel library #include // Which pin on the Arduino is connected to the NeoPixels? #define PIN 6 // How many NeoPixels are attached to the Arduino? #define NUMPIXELS 60 // When we setup the NeoPixel library, we tell it how many pixels, and which pin to use to send signals. // Note that for older NeoPixel strips you might need to change the third parameter--see the strandtest // example for more information on possible values. Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800); int delayval = 10; // delay for half a second void setup() { pixels.begin(); // This initializes the NeoPixel library. int delayval = 300; } void loop() { // For a set of NeoPixels the first NeoPixel is 0, second is 1, all the way up to the count of pixels minus one. for(int i=0;i<10;i++){ pixels.setPixelColor(0+i, pixels.Color(100,0,0)); pixels.setPixelColor(10+i, pixels.Color(100,0,0)); pixels.setPixelColor(20+i, pixels.Color(100,0,0)); pixels.setPixelColor(30+i, pixels.Color(100,0,0)); pixels.setPixelColor(40+i, pixels.Color(100,0,0)); pixels.setPixelColor(50+i, pixels.Color(100,0,0)); pixels.show(); delay(delayval); pixels.setPixelColor(0+i, pixels.Color(0,0,0)); pixels.setPixelColor(10+i, pixels.Color(0,0,0)); pixels.setPixelColor(20+i, pixels.Color(0,0,0)); pixels.setPixelColor(30+i, pixels.Color(0,0,0)); pixels.setPixelColor(40+i, pixels.Color(0,0,0)); pixels.setPixelColor(50+i, pixels.Color(0,0,0)); pixels.show(); delay(delayval); } }