MessageTorch - torch fire animation with WS2812 leds + message display

Yes, that's how my params function expects it. I just built a simplistic parser to allow setting more than one single param per API call (but as said, still limited as the string length that can be passed via the cloud API is limited to ~50 chars).

@Elijah: from a http POST point of view the request only has two paramters, one is called "access_token" and needs to carry a valid token, the other is called "args" and carries the MeesageTorch specific parameter string which ist of form param=value[[,param2=value2],param3=value3] etc.

There's no way to get rid of the "args=" prefix, that's how the Spark Cloud API works. In all your examples, you omitted the "args=", that's why they didn't work.

You seem to have found out that the prefix can be anything in the form of "yyy=". However, that's probably more of an accident in spark's current cloud code, so I'd recommend to stick with "args=" because that's what the specs say.

So to set mode=2, just issue:

curl https://api.spark.io/v1/devices/zzzzzz/params -d access_token=ttttt -d "args=mode=2"
3 Likes

FWIW, I found that your average Parmesan Cheese container is just about the right size to hold 2m of LED strip, with about 10 rows at 12 LEDs per row (for a 60/m strip). I just peeled off the label, then used some solvent to clean off any remaining adhesive (I used OOPS spray).

3 Likes

I really enjoy this project and the drivers by @luz have been terrific!

Hereā€™s a picture from when I took down the setup showing how I used some clay to keep everything secure around the cylinder:

Happy hacking!

1 Like

OHHHH nice trick! I couldnā€™t get a right diameter but gonna look around some more :wink:

@luz, I HAVE DONE IT! :smiley:

But it seems like the diameter is still a little too large and the text needs to be shifted.

This will be on public display if i my topic gets picked for an upcoming Geek conference ( http://geekcamp.sg/talk/view/53b2dca8161c687314000000)

WOOHOOO!!!

4 Likes

I like that version :smiley: - the larger diameter makes the text more readable!
BTW, you can easily shift the baseline of the text by changing the text_base_line variable (or same named parameter via the cloud)

1 Like

Hey @luz, your smaller diameter presents the flame so well!

Iā€™m thinking of changing to 80mm diameter as well. What do you think? :slight_smile:

How many leds are working now with the latest flash and ram optimizations?

Might have to place me an order

Had 240 running. 4m length of led :slight_smile:

@Hootie81, each 5m length has 300 LEDS which requires a display buffer of 900 bytes. My guess is that with the latest RAM optimization, you should be able to do 10m length. :smile:

2 Likes

in that caseā€¦ 3x 4m lengths ordered!

1 Like

@Hootie81, I canā€™t wait to hear hot that goes! Please keep us updated :stuck_out_tongue:

2 Likes

The buffer for the driver is only 2 bytes per LED (I squeezed 3*5bit brightness value into 2 buffer bytes, and expand these on the fly into 3 byte RGB PWM values).

However, the flame animation calculation also needs 2 extra buffer bytes per LED, so the total bytes is 4*(number of LEDs). With this and disabling cheerlights, I got it running with 240 LEDs on FW v2.3.

1 Like

@luz, very cool! However, I have it working with 240 LEDs AND cheerlights and no other modifications! Any thoughts?

I think it was still v2.2 when I did those optimisations in my code. Probably v2.3 has already some more memory free than v2.2 had.
I havenā€™t pushed beyond 240 LEDs so far (as I donā€™t have more than these 240 right now). Iā€™m eager to hear how it goes with @Hootie81 connecting 12 meters :smile: ā€¦

Another thought: the fact that omitting cheerlight or digitalstrom options made so much difference in RAM usage canā€™t be the code itself (itā€™s a few lines, almost no RAM used). So it was probably because both features defined their own spark cloud function handler, which apparently was quite RAM consuming in the spark core fw. Maybe v2.3 had some fixes in this regard as well.

@luz, there were MAJOR RAM optimizations done in v2.3. The v2.2 TCP and UDP clients had large buffers allocated to them (which is now reduced) and I believe in future versions, this allocation will be done dynamically instead of statically as is done now. Thatā€™s why I believe doing 12 meters is feasible now :stuck_out_tongue:

1 Like

Hi @luz and everyone here,

First of all, I want to say that I love your project! It looks so cool!

I have a little questionā€¦ Is it normal that randomly some leds blinks bright blue very fast?

@Dragonsshout, YES thatā€™s normal! Thatā€™s like the random ā€œsparkā€ or flare-up that you might see in a real fire. :smile:

2 Likes

Thank you very much for your answer @peekay123, I was not sure if it was normal ! :smiley:

Do know if it is easy to disable this feature? I cannot find the part in the code which do this flare-upā€¦

@Dragonsshout, there is a variable called ā€œrandom_spark_probabilityā€ with a default value of 2. If you set that to zero, it may stop the effect.

@peekay123, I already tried that, but if you set ā€œrandom_spark_probabilityā€ to zero, there are no flames anymore, but only the two first row are glowing.