Created
May 14, 2023 20:11
-
-
Save xxlukas42/c05ade1169ad5618b7821e6554199171 to your computer and use it in GitHub Desktop.
Lolin S3 PRO LED demo for https://youtu.be/UIFmMGSgsX4
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> | |
#define PIN 38 | |
#define NUMPIXELS 1 | |
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800); | |
void setup() { | |
Serial.begin(115200); | |
pixels.begin(); | |
} | |
void loop() { | |
delay(1000); | |
Serial.println("RGB LED demo sequence..."); | |
pixels.setPixelColor(0, pixels.Color(0, 150, 0)); | |
pixels.show(); // Send the updated pixel colors to the hardware. | |
delay(2000); // Pause before next pass through loop | |
pixels.setPixelColor(0, pixels.Color(150, 0, 0)); | |
pixels.show(); // Send the updated pixel colors to the hardware. | |
delay(2000); // Pause before next pass through loop | |
pixels.setPixelColor(0, pixels.Color(0, 0, 0)); | |
pixels.show(); // Send the updated pixel colors to the hardware. | |
delay(120000); // Pause before next pass through loop | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment