diff --git a/NeoPixel.ino b/NeoPixel.ino deleted file mode 100644 index fccaeb7..0000000 --- a/NeoPixel.ino +++ /dev/null @@ -1,56 +0,0 @@ -#include -#define NUM_LEDS 144 -#define DATA_PIN 6 - -CRGB leds[NUM_LEDS]; - -void setup() -{ - FastLED.addLeds(leds, NUM_LEDS); -} - -void loop() -{ - sweep(255,0,0,30); - sweep(0,0,0,30); - sweep(0,255,0,30); - sweep(0,0,0,30); - sweep(0,0,255,30); - sweep(0,0,0,30); - sweep(255,255,255,30); - sweep(0,0,0,30); - -} - -void sweep(byte red, byte green, byte blue, int d) -{ - for (int dot = 0; dot < NUM_LEDS; dot++) - { - leds[dot] = CRGB( red, green, blue); // set this pixel to color - FastLED.show(); - delay(d); - } -} -/* - //Example 1: set color from red, green, and blue components individually - // The three color channel values can be referred to as "red", "green", and "blue"... - leds[i].red = 50; - leds[i].green = 100; - leds[i].blue = 150; - // ...or, using the shorter synonyms "r", "g", and "b"... - leds[i].r = 50; - leds[i].g = 100; - leds[i].b = 150; - // ...or as members of a three-element array: - leds[i][0] = 50; // red - leds[i][1] = 100; // green - leds[i][2] = 150; // blue - //Example 2: set color from red, green, and blue components all at once - leds[i] = CRGB( 50, 100, 150); - // Example 3: set color via 'hex color code' (0xRRGGBB) - leds[i] = 0xFF007F; - // Example 4: set color via any named HTML web color - leds[i] = CRGB::HotPink; - // Example 5: set color via setRGB - leds[i].setRGB( 50, 100, 150); -*/ diff --git a/README.md b/README.md index b29c414..6d753be 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,26 @@ # PitLEDArduinoThing A repository for programs that will run on an arduino controlling the LED lights for the pit. + + +Todo list: + +to create: + +random color switch + +fade + +sweep- add number of sweeps + +hue fade + +hue sweep + +to test: + +swirl + +rain + +completed: + diff --git a/Sweep.ino b/Sweep.ino new file mode 100644 index 0000000..1850fab --- /dev/null +++ b/Sweep.ino @@ -0,0 +1,28 @@ +#include +#define NUM_LEDS 144 +#define DATA_PIN 6 + +CRGB leds[NUM_LEDS]; + +void setup() +{ + FastLED.addLeds(leds, NUM_LEDS); +} + +void loop() +{ + sweep(255,0,0,30,4); +} + +void sweep(byte red, byte green, byte blue, int d, int times, int startPoint) +{ + for (int dot = 0; dot < NUM_LEDS/times; dot++) + { + for(int i = 0; i< times; i++) + { + leds[(dot+i*NUM_LEDS/times + startPoint)%NUM_LEDS] = CRGB( red, green, blue); // set this pixel to color, mod is to be safe + } + FastLED.show(); + delay(d); + } +}