From f4fbb400d1843a3644ae4e1d5a9f7426d5449cc2 Mon Sep 17 00:00:00 2001 From: krishmo118 Date: Wed, 26 Feb 2025 20:21:58 +0000 Subject: [PATCH] Upload files to "BareBones" BareBones Code Commit --- BareBones/barebones.ino | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 BareBones/barebones.ino diff --git a/BareBones/barebones.ino b/BareBones/barebones.ino new file mode 100644 index 0000000..c101f8e --- /dev/null +++ b/BareBones/barebones.ino @@ -0,0 +1,40 @@ +#include + +// How many leds in your strip? +#define NUM_LEDS 300 + +//defining locations of pins +#define DATA_PIN 2 +#define BUTTON_PIN 4 + +// Define the array of leds +CRGB leds[NUM_LEDS]; + +//assigning locations of pins +int buttonPin = 8; +int ledPin = 13; + + +void setup() { + + FastLED.addLeds(leds, NUM_LEDS); // GRB ordering is assumed + Serial.begin(115200); + pinMode(BUTTON_PIN, INPUT_PULLUP); //use internal pullup resistor + +} //void setup + + +void loop() { + // Move a single LED down the strip + for (int i = 0; i < NUM_LEDS; i++) { + leds[i] = CRGB::Red; // Set the current LED to red + FastLED.show(); // Display the updated LED colors + //delay(0.001); // Wait for 100 milliseconds + delayMicroseconds(100); + + + + leds[i] = CRGB::Black; // Turn off the current LED + FastLED.show(); // Update the strip + } +} \ No newline at end of file