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();
}


2 comments:

  1. Could you please explain how to wire this whole thing up?

    ReplyDelete

Note: Only a member of this blog may post a comment.