Initial import of support files for all Digistump boards - Digispark, Pro, DigiX - including libraries, examples, tools, and other support files for the Arduino IDE

This commit is contained in:
Erik Tylek Kettenburg
2014-12-19 08:45:50 -08:00
parent 97abdbf157
commit 7e7473a2d6
3567 changed files with 722870 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
#include <WS2811.h>
DEFINE_WS2811_FN(WS2811RGB, PORTB, 1)
RGB_t rgb[1]; //1 for 1 pixel
void setup() {
pinMode(1,OUTPUT);
}
void loop() {
setPixel(0,255,0,0); //set first pixel (zero indexed) to red
updatePixels(); //show the change
}
void setPixel(i,r,g,b){
rgb[r].r=r;
rgb[g].g=g;
rgb[b].b=b;
}
void updatePixels(){
WS2811RGB(rgb, ARRAYLEN(rgb));
}