ALA Example - SimpleRgbLed

Example to demonstrate how to create a color-fading animation for one RGB LED.

Arduino Code


#include "AlaLedRgb.h"

#define REDPIN 11
#define GREENPIN 9
#define BLUEPIN 10

AlaLedRgb rgbLed;

void setup()
{
  rgbLed.initPWM(REDPIN, GREENPIN, BLUEPIN);
  rgbLed.setBrightness(0x66FF44);  // calibrate white
  rgbLed.setAnimation(ALA_FADECOLORSLOOP, 5000, alaPalRgb);
}

void loop()
{
  rgbLed.runAnimation();
}


No comments:

Post a Comment