Grove - LED Strip Driver
LED Strip Driver kan hjälpa dig att styra ljusstyrkan hos en enfärgad LED-remsa, liksom färg och luminans av en RGB-LED-remsa genom Arduino
Kompatibilitet
- Arduino
Port
- Digital
Bibliotek
https://github.com/SeeedDocument/Grove-LED_Strip_Driver/raw/master/res/LEDStripDriver_library.zip
Exempelkod
Arduino
#include "RGBdriver.h"
#define CLK 2//pins definitions for the driver
#define DIO 3
RGBdriver Driver(CLK,DIO);
void setup()
{
}
void loop()
{
unsigned int i;
while(1){
for(i = 0;i < 256;i ++)
{
Driver.begin(); // begin
Driver.SetColor(0,0,i); //Blue. First node data. SetColor(R,G,B)
Driver.end();
delay(10);
}
for(i = 255;i > 0;i --)
{
Driver.begin(); // begin
Driver.SetColor(0,0,i); //Blue. first node data
Driver.end();
delay(10);
}
}
}