Created
May 9, 2021 01:17
-
-
Save gallaugher/147a43162d72580e99754b216d2b880b to your computer and use it in GitHub Desktop.
Simple Red LED Strip
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Adafruit_NeoPixel.h> | |
//RgbColor BLACK(0, 0, 0); | |
//RgbColor RED(128, 0, 0); | |
#define LED_PIN 12 | |
#define LED_COUNT 9 | |
// Declare our NeoPixel strip object: | |
Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800); | |
uint32_t red = strip.Color(255, 0, 0); | |
int led = 12; // the pin the LED is connected to | |
void setup() { | |
pinMode(led, OUTPUT); // Declare the LED as an output | |
} | |
void loop() { | |
strip.begin(); | |
strip.fill(red); | |
strip.show(); // Initialize all pixels to 'off' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment