Skip to content

Instantly share code, notes, and snippets.

@xxlukas42
Created May 14, 2023 20:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xxlukas42/c05ade1169ad5618b7821e6554199171 to your computer and use it in GitHub Desktop.
Save xxlukas42/c05ade1169ad5618b7821e6554199171 to your computer and use it in GitHub Desktop.
Lolin S3 PRO LED demo for https://youtu.be/UIFmMGSgsX4
#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