AlaLed RgbStripSequence-based Code plays only once (Solved)

Hi, I am fighting with WS2812 Leds. In my ALA library i found this convenient example called RgbStripSequence. It plays a load of different sequences. You can pick one by simply deleting the rest. This is what I did, only the sequence runs only 1,5 times! Also my OSX 10.9.5 has shut down several times when I tried to upload different “motherfuckations” of my code.
I have earlier succesfully extracted another animation (Comet) from the same example. I have copied&pasted everything from that earlier one into my new adventure and now it plays my strip once and then -as if on the 2nd page- it stops leaving 5 leds on in 5 colours, spread over the strip randomly. Here’s my code: ///////////////////////////////////////////////////////////////////////////////////////////
//
// ALA library example: RgbStripSequence
//
// Example to demonstrate how to create an animation sequence for a
// WS2812 RGB LED strip.
//
// Web page: ALA Example - RgbStripSequence - Yet Another Arduino Blog
//
///////////////////////////////////////////////////////////////////////////////////////////
#include <AlaLedRgb.h>

#define NUM_LEDS 60
#define PIN 6

AlaLedRgb rgbStrip;

AlaSeq seq =
{ ALA_BUBBLES, 1000, 6000, alaPalRainbow };

void setup() {

(60);
delay(500);

rgbStrip. initWS2812 (60, 6);

rgbStrip. setBrightness (0x444444);

rgbStrip. setAnimation(seq);
}

void loop()
{

rgbStrip.runAnimation();

int (num1);
int animation;
int currAnim;

}

First: always use code tags if you post code! As you haven't done yet, read the sticky post at the top of the topic!

You removed to much from the sequence array. The end marker is mandatory. With this seq initialization it might work:

AlaSeq seq[] = {
 { ALA_BUBBLES,        1000, 6000, alaPalRainbow },
 { ALA_ENDSEQ }
};

Also my OSX 10.9.5 has shut down several times when I tried to upload different

Are you using an external power supply? It sounds like you are drawing too much current from the USB socket. At 60mA per LED that is too much current for a computer to supply.

Dear GrumpyMike, Dear Pylon,

I do use a 5V 4A external power supply, with common ground. The whole setup works the same, with or without USB connection to the computer.

Tomorrow I'll try Pylon's suggestion because I did NOT delete { ALA_ENDSEQ }. It's got a good feel.

Eventually I would want to change the colour of BUBBLES in a blueish white and use that to create rain in a painting-like panel, theme: Autumn. Checking WS2812 projects, there just isn't much rain to be found....

I did juices, running up a tree on a similar panel, theme: Spring, using the COMET animation. See https://vimeo.com/241713860 for a makeshift video.

This is why I was so surprised that things didn't work when I tried to cut&paste the code like I did with COMET.

Could my 2812 strip fail to comply with ALA / Adafruit?

Could my 2812 strip fail to comply with ALA / Adafruit?

No, do you have the resistor and large capacitor like they suggest?

But your quote in my reply #2 suggests you have something wrong that you are missing and so not telling us about.

220 uF 10V and a 220 ohm resistor on data

That is fine but your Mac crashing during upload suggests you have something not quite right with the wiring or power supply.

Thanx Grumpy,

I have now made the stand-alone situation with common + as well. I think that when I first wrote, I did not have that external 5V going to the Arduino yet.

I have no more trouble uploading, since I have already uploaded a couple of trials of the animation.

Could this be "what I was not telling you about" ?

The animation now runs, needs some filing and sanding but it runs.

Thanx

Could this be "what I was not telling you about" ?

Yes indeed. :)

I am learning now to save good codes as "read only". I have messed up a lot of code, since some part of me still wants to believe very hard in the Plug&Play concept.

In the "ALA library example RgbLedSequence" I have found the piece of code that could help me adjust the colors of the sequence {BUBBLES} I am currently working on (see Nov 21, 2017, 11:19 pm ). So I got THAT far ;-)

The fact though is, that in a earlier stage of cut&paste frenzy I have changed the default settings in the example RgbLedSequence and I cannot seem to retrieve them. I have updated the library but that didn't help.

the piece of code I am trying to restore is the custom palette :

AlaLedRgb rgbLed;

// custom palette :         black     white     black     red       green     blue
AlaColor mycolors_[6] = { 0x000000, 0xFFFFFF, 0x000000, 0xFF0000, 0x00FF00, 0x6000FF };
AlaPalette mycolors = { 6, mycolors_ };


AlaSeq seq[] =

This project is reaching it's deadline. I have underestimated the bumpy ride that working with Arduino can be for beginners. I spent the last couple days trying to figure out those color-settings / trying to find "custom palette", but hey, I did! I realize that I have to learn more about coding and libraries, because I think WS2812 ledstrips are just GreaT and I have already been asked to design the lighting of a wallmounted logo of a small company.. I have been working with a sound-artist on R and G and B ledstrips in combination with a 12V light-organ and a microphone (see https://vimeo.com/209928195 ) and I cannot wait to try something similar with WS2812. Next year I have to buy a good tutorial book.

Gerrit

I DID IT!! I Cracked it!! Myself!!!

AlaLedRgb rgbStrip;

// custom palette :         black     white     black     red       green     blue
AlaColor mycolors_[6] = { 0x000000, 0xFFFFFF, 0x000000, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF };
AlaPalette mycolors = { 6, mycolors_ };

AlaSeq seq[] = {
  { ALA_OFF,            1000, 1, alaPalNull },
  { ALA_BUBBLES,        100, 1800, mycolors },
  { ALA_ENDSEQ }
};

void setup() {

  rgbStrip. initWS2812 (60, 6);
  
  rgbStrip. setBrightness (0x66FF44); //THIS is the blueish white

  rgbStrip. setAnimation(seq);

I think I can go now and find out how to close this post. Thanx every respondant!!

You just edit the first post and add (Solved) At the end of the title.