#include "Adafruit_NeoPixel.h"
#ifdef__AVR__
#include<avr/power.h>
#endif
#define PIN 6
#define NUMPIXELS 10
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
int delayval = 500;//delay for half a second
void setup() {
#if defined (__AVR_ATtiny85__)
if (F_CPU == 16000000) clock_prescale_set(clock_div_1);
#endif
pixels.setBrightness(255);
pixels.begin();
// put your setup code here, to run once:
}
void loop() {
for(int i=0;i<NUMPIXELS;i++){
pixels,setPixelColor(i, pixels.Color(0,150,0));
pixels,show();
delay(delayval);
}
// put your main code here, to run repeatedly:
}
哪里错了 一直报错 大佬教教小白吧
|