#include <Adafruit_NeoPixel.h>
#define PIN 6 // On Trinket or Gemma, suggest changing this to 1
#define NUMPIXELS 48 // Popular NeoPixel ring size
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
void setup()
{
pixels.begin(); // INITIALIZE NeoPixel strip object (REQUIRED)
pinMode(4, OUTPUT);
}
void loop()
{
pixels.clear(); // Set all pixel colors to 'off'
for(int i=0; i<16; i++) { // For each pixel...
pixels.setPixelColor(i, pixels.Color(255, 255, 0));
pixels.setPixelColor(i+16, pixels.Color(255, 0 , 255));
pixels.setPixelColor(i+32, pixels.Color(0, 255 , 255));
pixels.show(); // Send the updated pixel colors to the hardware.
tone(4,i * 50);
delay(250); //pause before next pass through loop
noTone(4);
}
}