initial import
This commit is contained in:
28
stage2/src/main.cc
Normal file
28
stage2/src/main.cc
Normal file
@@ -0,0 +1,28 @@
|
||||
#include <Adafruit_NeoPixel.h>
|
||||
|
||||
|
||||
Adafruit_NeoPixel pixels(1, 11, NEO_GRB + NEO_KHZ800);
|
||||
|
||||
|
||||
void
|
||||
init()
|
||||
{
|
||||
Serial.begin(115200);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
main()
|
||||
{
|
||||
static bool on = false;
|
||||
Serial.println("blink");
|
||||
|
||||
if (on) {
|
||||
pixels.clear();
|
||||
} else {
|
||||
pixels.setPixelColor(0, pixels.color(0, 255, 0));
|
||||
}
|
||||
pixels.show();
|
||||
|
||||
delay(1000);
|
||||
}
|
||||
Reference in New Issue
Block a user