From de4653177904b5633a8afc2a258613a966210301 Mon Sep 17 00:00:00 2001 From: OroArmor Date: Wed, 5 Dec 2018 19:24:27 -0800 Subject: [PATCH 1/5] Update README.md --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index b29c414..7acf8a2 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,14 @@ # PitLEDArduinoThing A repository for programs that will run on an arduino controlling the LED lights for the pit. + + +Todo list: + +to create: +pinwheel +random color switch +fade + +to test: +swirl +rain From c6b30fad0a9fa697bd05e959660aa12b57741723 Mon Sep 17 00:00:00 2001 From: OroArmor Date: Thu, 6 Dec 2018 10:29:14 -0800 Subject: [PATCH 2/5] Update README.md --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7acf8a2..b12c7eb 100644 --- a/README.md +++ b/README.md @@ -5,10 +5,17 @@ A repository for programs that will run on an arduino controlling the LED lights Todo list: to create: -pinwheel random color switch fade +sweep- add number of sweeps + +hue fade +hue sweep + to test: swirl rain + +completed: + From 24b6095109f7b00207f649c93d6c39b39adb90da Mon Sep 17 00:00:00 2001 From: OroArmor Date: Thu, 6 Dec 2018 10:33:14 -0800 Subject: [PATCH 3/5] Update README.md --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index b12c7eb..6d753be 100644 --- a/README.md +++ b/README.md @@ -5,16 +5,21 @@ A repository for programs that will run on an arduino controlling the LED lights Todo list: to create: + random color switch + fade sweep- add number of sweeps hue fade + hue sweep to test: + swirl + rain completed: From 23156fde1154c0ee780e756b7aed3d6d1acae968 Mon Sep 17 00:00:00 2001 From: OroArmor Date: Thu, 6 Dec 2018 10:36:28 -0800 Subject: [PATCH 4/5] Added number to repeat --- NeoPixel.ino | 56 ---------------------------------------------------- Sweep.ino | 28 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 56 deletions(-) delete mode 100644 NeoPixel.ino create mode 100644 Sweep.ino 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/Sweep.ino b/Sweep.ino new file mode 100644 index 0000000..0de4146 --- /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) +{ + for (int dot = 0; dot < NUM_LEDS/times; dot++) + { + for(int i = 0; i< times; i++) + { + leds[(dot+i*NUM_LEDS/times)%NUM_LEDS] = CRGB( red, green, blue); // set this pixel to color, mod is to be safe + } + FastLED.show(); + delay(d); + } +} From f959c98746c2e0b2ae6badf39208572b23e6f43b Mon Sep 17 00:00:00 2001 From: OroArmor Date: Thu, 6 Dec 2018 10:37:55 -0800 Subject: [PATCH 5/5] centering added future proofing different led placement with startpoint --- Sweep.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sweep.ino b/Sweep.ino index 0de4146..1850fab 100644 --- a/Sweep.ino +++ b/Sweep.ino @@ -14,13 +14,13 @@ void loop() sweep(255,0,0,30,4); } -void sweep(byte red, byte green, byte blue, int d, int times) +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)%NUM_LEDS] = CRGB( red, green, blue); // set this pixel to color, mod is to be safe + 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);