Study/아두이노( Arduino)
NeoPixel 구동에 필요한 최소 소스코드
흰군
2018. 4. 2. 13:18
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 |
#include <Adafruit_NeoPixel.h>
#define PIN 6
Adafruit_NeoPixel strip = Adafruit_NeoPixel(60, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
strip.begin();
strip.show();
}
void loop() {
for(uint16_t i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, strip.Color(255, 0, 0));
strip.show();
delay(50);
}
} |
cs |