sowbug / G35Arduino

An Arduino library for GE Color Effects G-35 holiday lights.
Other
64 stars 24 forks source link

Question about loop of programs #27

Closed Mukrosz closed 8 years ago

Mukrosz commented 8 years ago

Hi,

Thanks a lot for the code! I used TiconHalloween2012 for Halloween last year and trying to use it again this year. 2x 50 bulb strings with arduino uno.

I am having trouble with programs looping continuously. I had the same issue last year but never occurred to me to try and ask about it. After about 3 loops of 7 programs, lights get stuck on the last program (i.e case 6: SpookyFlicker(lights)).

Isn't it on a continuous loop? Sorry, my programming skills are dated from 1998. I can scramble my way around through just enough to make sense heh.

Any help or suggestion would be greatly appreciated!

sowbug commented 8 years ago

Glad you're enjoying the code. Unfortunately there isn't enough in the issue description to tell what the problem might be. It appears you have customized the code, as TiconHalloween2012 has 5 programs, not 7. I'd start with the unmodified example, confirm it works, then gradually reapply changes until you've isolated the bug.

Mukrosz commented 8 years ago

Thanks for the reply! Yes, i changed the list of programs. I will revert to the original and go from there. But it should be on an infinite loop, correct?

sowbug commented 8 years ago

That's right. https://github.com/sowbug/G35Arduino/blob/master/HalloweenPrograms.cpp#L15 is the line that decides which program to switch to.

All reported problems ever with this library have been caused by either of the following:

Mukrosz commented 8 years ago

Makes me wonder if there is something wrong with my power then. I added 20 feet worth of well insulated wire slack between the led bulbs and the Arduino so I could run Arduino from the garage. It's been 3 years now that i've used these lights successfully. V+ goes directly to the stock power supplies (2 strings) instead of Arduino, Data on pin 8,9 and V- from both strings on GND pin. Is it common for power/voltage efficiency to deteriorate over time (voltage drop), providing the fact, I extended the length. Though, the program stops exactly at the same point every time though, so it is probably me screwing something up with the coding. Every year i have to teach myself whatever the heck i did the year before:)

Anyways, enough rambling, thanks a ton for your response! really appreciate it!

sowbug commented 8 years ago

You're right it's probably your code, but voltage problems will show symptoms when certain patterns are displayed that use more current than others. For example, white means the separate R/G/B LEDs in the bulb are all on at the same time.

Mukrosz commented 8 years ago

Thank you very much. Tried it out today with unmodified code, yet with the same grave result, stops after a few loops. The issue turned out to be my arduino board. Not sure whats wrong with it. I think the extreme cold we have here during winter finally got to it. Luckily, I happen to have another arduino uno and that one works just fine.

Is there a way to change the speed at which Creeper, PumpkinChase operate? They both are quite fast for me:)

Once again, thanks so much for your time!