Created
November 14, 2022 03:53
-
-
Save neosarchizo/14501c75535c6c7cdab06d07293a39d6 to your computer and use it in GitHub Desktop.
DSLogic - 네오픽셀 디버깅하기
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> | |
#ifdef __AVR__ | |
#include <avr/power.h> | |
#endif | |
#define PIN 6 | |
#define NUMPIXELS 16 | |
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800); | |
void setup() { | |
pixels.begin(); | |
} | |
void loop() { | |
pixels.clear(); | |
for(int i=0; i<NUMPIXELS; i++) { | |
pixels.setPixelColor(i, pixels.Color(0, 255, 0)); | |
} | |
pixels.show(); | |
delay(1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment