Skip to content

Instantly share code, notes, and snippets.

@tana
Created October 23, 2021 10:13
Show Gist options
  • Save tana/94f889748755ba174853727b51533c91 to your computer and use it in GitHub Desktop.
Save tana/94f889748755ba174853727b51533c91 to your computer and use it in GitHub Desktop.
LED blink using M5Stamp C3
#include <Adafruit_NeoPixel.h>
const int NUM_LEDS = 1;
const int LED_PIN = 2;
Adafruit_NeoPixel pixels(NUM_LEDS, LED_PIN, NEO_GRB + NEO_KHZ800);
void setup() {
Serial.begin(115200);
pixels.begin();
}
void loop() {
Serial.println("Hello");
pixels.setPixelColor(0, 100, 0, 0);
pixels.show();
delay(500);
pixels.setPixelColor(0, 0, 0, 0);
pixels.show();
delay(500);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment