mirror of
https://github.com/italicsjenga/StripLighting.git
synced 2024-11-24 18:21:32 +11:00
38 lines
681 B
Arduino
38 lines
681 B
Arduino
|
#include <Adafruit_NeoPixel.h>
|
||
|
|
||
|
#define PIN 6
|
||
|
|
||
|
Adafruit_NeoPixel strip = Adafruit_NeoPixel(30, PIN, NEO_GRB + NEO_KHZ800);
|
||
|
|
||
|
void setup() {
|
||
|
// put your setup code here, to run once:
|
||
|
strip.begin();
|
||
|
//strip.setBrightness(50);
|
||
|
strip.show();
|
||
|
}
|
||
|
|
||
|
void loop() {
|
||
|
// put your main code here, to run repeatedly:
|
||
|
/*for(int j=100; j<256; j++)
|
||
|
{
|
||
|
for(int i=0; i<30; i++)
|
||
|
{
|
||
|
strip.setPixelColor(i, j * (52 + (i * 7)), 0, j * ((255-i) * 7));
|
||
|
}
|
||
|
strip.show();
|
||
|
|
||
|
delay(100);
|
||
|
}*/
|
||
|
strip.setPixelColor(0, 255, 255, 255);
|
||
|
strip.show();
|
||
|
delay(100);
|
||
|
|
||
|
/*for(int i=0; i<30; i++)
|
||
|
{
|
||
|
strip.setPixelColor(i, 0, 0, 0);
|
||
|
}
|
||
|
strip.show();
|
||
|
|
||
|
delay(100);*/
|
||
|
}
|