Page 1 of 1
Forum

Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!

Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.

Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!



Arduino - All LED e...
 
Share:
Notifications
Clear all

[Solved] Arduino - All LED effects in one Sketch

76 Posts
22 Users
0 Reactions
22.9 K Views
(@kevlarr)
New Member
Joined: 7 years ago
Posts: 4
 

Thanks Again Hans! https://youtu.be/FVIWFfdorvQ


   
ReplyQuote
(@waynerigley)
New Member
Joined: 6 years ago
Posts: 1
 

hello all, im currently running 1 scope of FastLED and was looking for more, found you guys here ! after reading the posts is there an updated file sketch ? can someone point me in the right direction ? thank you advance 


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2864
Topic starter  

Hi Waynerigley!

Some sketches can be found in this post, or these articles;

- Arduino – All LEDStrip effects in one (NeoPixel and FastLED)
- Arduino – LEDStrip effects for NeoPixel and FastLED

I guess I'm not sure what sketch you're looking for 


   
ReplyQuote
(@tahurl)
New Member
Joined: 6 years ago
Posts: 2
 

I am still struggling to get all the effects to run on an endless loop.  If anyone has done that can they please post the updated sketch?  If so then I think it easier to just "//" any effects we don't want.

Thanks 

Dan H 


   
ReplyQuote
(@tahurl)
New Member
Joined: 6 years ago
Posts: 2
 

The main struggle im having is with   twinkle, sparkle, snowsparkle...they only go on for a sec..

To fix this im using the "for" command for each.. (as posted above) 

EX)

for(int i; i<=10; i++) { SnowSparkle(0x10, 0x10, 0x10, 20, random(100,1000)); }

But it only work one time thru the loop.  After the first time those effects get skipped? (Im hoping to run this whole show on endless loop)

can someone maybe post better code to use then the "for" and post how that sketch should be as example for "Snowsparkle?

Sorry Still new at all this..

One more question?  How can I dim all these effects?  Them seem to be set at highest brightness?

Thanks,

Dan H


   
ReplyQuote
(@eidolonpyro)
New Member
Joined: 6 years ago
Posts: 2
 

@tahurlI think you need to return int i to a value less than 10 before the effect will run again. Outside of your for(int i; i<=10; i++) loop set int i back to 0

void loop() {
   for(int i; i<=10; i++) { SnowSparkle(0x10, 0x10, 0x10, 20, random(100,1000)); }
   i = 0
}

   
ReplyQuote
(@eidolonpyro)
New Member
Joined: 6 years ago
Posts: 2
 

Or just do it inline: "int i =0" in the for loop parameters.

void loop() {
   for(int i = 0; i<=10; i++) { SnowSparkle(0x10, 0x10, 0x10, 20, random(100,1000)); }
}


   
ReplyQuote
(@johndlcg)
New Member
Joined: 6 years ago
Posts: 2
 

hi there, is there a way that you can use a ir remote control to change the effects and control the speed of them?


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2864
Topic starter  

Hi John, I'm pretty sure there is a way to do this, but it will most likely not be a simple drop-in replacement of the switch.
The biggest challenge will be to make the IR receiver act like a switch and usually this is done in the Arduino code - which would conflict with the fact that it needs to be a "switch" to trigger the interrupt.


   
ReplyQuote
(@dictograf)
New Member
Joined: 6 years ago
Posts: 3
 

Hello, Unfortunately I still get stuck on the bouncing balls. I have tried the While Mills method and the For method and neither of them work.

Any ideas? I am using an Arduino Nano

Thank you


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2864
Topic starter  

Did you look at Challenge 1 in the All-Effects-In-One article?
(apologies if you already did)


   
ReplyQuote
(@johndlcg)
New Member
Joined: 6 years ago
Posts: 2
 

hello everyone,

im working on a project to chage the effects with an IR remote control, until now i clould make the effect to run with a key press on the sketch, but it doesnt loop:

i have 2 questions: (im not a programmer, just trial and error)

1.- how could i make the loop to continue when option selected until another key is pressed.

2 -how could i break the process if i press other remote key while running.

im using  part of all leds effects from Hans to accomplish this, looking to use all the effects with a remote controll

thanks


   
ReplyQuote
(@dictograf)
New Member
Joined: 6 years ago
Posts: 3
 

Hello Hans,

I replaced the Boncingcoloredballs code with what you recommended.

I then got the following error:

 too few arguments to function 'void BouncingColoredBalls(int, byte (*)[3], boolean)'

I removed the third argument "boolean continuous" and put it on a separate line

It works perfectly now.

Thank you for your help


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2864
Topic starter  

Hi Dictograf,

Did you use the code from the original article or the All-in-one article?
The All-in-one article uses a slightly different code in order to stop the function easier (that's why the boolean was added).
If you tried using this with the code from the orginal article, then you'd indeed get this error message, since the original code doesn't use the boolean. 

Glad it works now!


   
ReplyQuote
(@dictograf)
New Member
Joined: 6 years ago
Posts: 3
 

Hello Hans,

I used the "All in one" code.

I had to change the LED type to NEO_GRBW.

And for some reason I had to set the led count to 80, even though I am using the 60 led ring.

After looking at the videos you made of all of the effects, I noticed that some are not working for me.

So I will need to figure out why.

Thank you

Peter


   
ReplyQuote
Page 4 / 6
Share: