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