ALA Example - RgbStripSequence

This is one of the examples to the Arduino Light Animation (ALA) library.

Example to demonstrate how to create an animation sequence for a WS2812 RGB LED strip using ALA library.


#include "AlaLedRgb.h"

AlaLedRgb rgbStrip;


AlaSeq seq[] =
{
  { ALA_OFF,            1000, 2000, alaPalNull },
  { ALA_ON,             1000, 2000, alaPalRgb },
  { ALA_SPARKLE,        1000, 9000, alaPalRgb },
  { ALA_CYCLECOLORS,    3000, 6000, alaPalRgb },
  { ALA_OFF,            1000, 1000, alaPalNull },
  { ALA_FADECOLORSLOOP, 3000, 6000, alaPalRgb },
  { ALA_SPARKLE2,       1000, 6000, alaPalRgb },
  { ALA_OFF,            1000, 1000, alaPalNull },
  { ALA_SPARKLE2,       1000, 6000, alaPalFire },
  { ALA_PIXELSMOOTHSHIFTRIGHT, 6000, 2000, alaPalRgb },
  { ALA_OFF,            1000, 1000, alaPalNull },
  { ALA_MOVINGBARS,     3000, 6000, alaPalRgb },
  { ALA_COMET,          3000, 6000, alaPalRgb },
  { ALA_COMETCOL,       3000, 6000, alaPalRgb },
  { ALA_OFF,            1000, 1000, alaPalNull },
  { ALA_GLOW,           3000, 6000, alaPalRgb },
  { ALA_OFF,            1000, 1000, alaPalNull },
  { ALA_FIRE,           1000, 6000, alaPalFire },
  { ALA_OFF,            1000, 1000, alaPalNull },
  { ALA_BOUNCINGBALLS,  1000, 6000, alaPalRgb },
  { ALA_OFF,            1000, 1000, alaPalNull },
  { ALA_BUBBLES,        1000, 6000, alaPalRainbow },
  { ALA_ENDSEQ }
};


void setup()
{
  delay(1000);
  
  rgbStrip.initWS2812(60, 6);
  
  rgbStrip.setBrightness(0x444444);

  rgbStrip.setAnimation(seq);
}

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


6 comments:

  1. so how do you pick just one sequence? like the comet sequence for example?

    Im using this with a rgb neopixel 60 strip in a replica proton pack from the new ghostbusters movie.

    it needs to constantly cycle in a clockwise pattern with a fading tail like the comet sequence.

    also there needs not to be too much of a gap in between each pass around.

    the proton pack synchrotron has a constant spiraling pattern that I'm trying to achieve .

    tommyb345@yahoo.com

    ReplyDelete
    Replies
    1. Delete the rest of the animations n remain with the comet...then u can change the speed and duration respectively ( 3000, 6000)

      Delete
  2. How can I make the sequence run continuously? Mine runs one time and then stops.

    ReplyDelete
  3. ?????? How can I make the sequence run continuously? Mine runs one time and then stops.

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. When I run this example sketch, the "Fire" pattern is green. I have had similar issues with other sketches. I think my strip is GRB rather than RGB. Is there a way to correct for this?

    ReplyDelete

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