Getting Started

Installing the library Copy Miled library into your Arduino libraries directory. Include MiLed in Your Sketch Write code Example code for making the first led blink in red #include <MiLed.h> #define DATA_PIN 11 #define LED_COUNT 8 MiLed ml(DATA_PIN,LED_COUNT); void setup() { } void loop() { ml[0] = Led(30,0,0); ml.show(); delay(500); ml[0] = Led(0); ml.show(); delay(500); } Example code showing some of the effects #include <MiLed.h> #define DATA_PIN 11 #define LED_COUNT 8 MiLed ml(DATA_PIN,LED_COUNT); void setup() { } void loop() { effects::gravitypush(ml, Led(30,0,0),35); effects::sendfadeleds(ml,Led(70)); effects::firework(ml); }

December 30, 2023

Effects

all of the effects are in the effects namespace void sendfadeleds(MiLed& miled,LedColor color,int del = 50); void pushledsrandom(MiLed& miled,int num,int del = 50); void rainbow(MiLed& miled); void rainbowpush(MiLed& miled); void rainbowpushchanging(MiLed& miled); void gradient(MiLed& miled,LedColor color1,LedColor color2); void gradientmove(MiLed& miled,LedColor color1,LedColor color2); void gravity(MiLed& miled,const LedColor& color,int del = 50); void gravitypush(MiLed& miled,const LedColor& color,int del = 50); void firework(MiLed& miled,int del = 25); void pushleds(MiLed& miled, const LedColor& color, int num, int del = 50); miled: a reference to the MiLed instance...

December 30, 2023