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!
[Solved] Arduino - All LED effects in one Sketch
(@kevlarr)
New Member
Joined: 7 years ago
Posts: 4
November 25, 2018 1:42 PM
(@waynerigley)
New Member
Joined: 6 years ago
Posts: 1
December 8, 2018 8:48 AM
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
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2864
(@tahurl)
New Member
Joined: 6 years ago
Posts: 2
December 13, 2018 9:45 PM
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
(@tahurl)
New Member
Joined: 6 years ago
Posts: 2
December 13, 2018 10:09 PM
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
(@eidolonpyro)
New Member
Joined: 6 years ago
Posts: 2
December 22, 2018 5:51 AM
@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
}
(@eidolonpyro)
New Member
Joined: 6 years ago
Posts: 2
December 22, 2018 8:37 AM
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)); }
}
(@johndlcg)
New Member
Joined: 6 years ago
Posts: 2
January 2, 2019 4:09 PM
hi there, is there a way that you can use a ir remote control to change the effects and control the speed of them?
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2864
Topic starter
January 3, 2019 10:05 AM
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.
(@dictograf)
New Member
Joined: 6 years ago
Posts: 3
January 13, 2019 7:46 PM
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
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2864
(@johndlcg)
New Member
Joined: 6 years ago
Posts: 2
January 16, 2019 9:07 AM
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
(@dictograf)
New Member
Joined: 6 years ago
Posts: 3
January 17, 2019 7:10 PM
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
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2864
Topic starter
January 17, 2019 9:59 PM
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!
(@dictograf)
New Member
Joined: 6 years ago
Posts: 3
January 18, 2019 5:15 PM
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