Page 2 of 2

Re: LED Lightning Storm Simuation

Posted: Sun Jun 26, 2011 4:42 pm
by rimai
I think it's got to do with the following line:

Code: Select all

    ReefAngel.PWM.SetDaylight(PWMSlope(10,30,19,30,15,65,60,ReefAngel.PWM.GetDaylightValue()));
Try removing it.
I'll only be able to test tomorrow. I have LED string to test at the office.

Re: LED Lightning Storm Simuation

Posted: Sun Jun 26, 2011 4:52 pm
by binder
rimai wrote:I think it's got to do with the following line:

Code: Select all

    ReefAngel.PWM.SetDaylight(PWMSlope(10,30,19,30,15,65,60,ReefAngel.PWM.GetDaylightValue()));
Try removing it.
I'll only be able to test tomorrow. I have LED string to test at the office.
I would think that having the PWMSlope function in use would affect the PWM output with the selection of the Cloud cover or Thunderstorm since it continually sets the PWM values.

curt

Re: LED Lightning Storm Simuation

Posted: Sun Jun 26, 2011 5:23 pm
by bmhair03
Got it working by commenting out a redondit line. Stays in storm mode dosen't reset to the before PWM values. Will post the video when I figure out how.

Re: LED Lightning Storm Simuation

Posted: Sun Jun 26, 2011 5:26 pm
by rimai
Cool.
Does it look good?

Re: LED Lightning Storm Simuation

Posted: Sun Jun 26, 2011 7:50 pm
by bmhair03
Yes it looks really nice. still working on the upload.

Re: LED Lightning Storm Simuation

Posted: Mon Jun 27, 2011 9:26 am
by bmhair03
Heres the video remember very bad quaity but you can see the effect
http://www.youtube.com/watch?v=ivWYJ6j-6lM

Re: LED Lightning Storm Simuation

Posted: Mon Jun 27, 2011 9:28 am
by bmhair03
Is it possible to make the lighting faster or sharper? Or is that the drivers

Re: LED Lightning Storm Simuation

Posted: Mon Jun 27, 2011 9:40 am
by rimai
Nice.
Agreed. Needs more contrast between between peeks.
Let me work on it.

Re: LED Lightning Storm Simuation

Posted: Mon Jun 27, 2011 11:27 am
by bmhair03
You the Man Roberto! Thanks for the help.

Re: LED Lightning Storm Simuation

Posted: Mon Jun 27, 2011 12:09 pm
by rimai
I changed to this:

Code: Select all

void StandardThunderstorm()
{
  byte value=random(100);
  if (value>60) ReefAngel.PWM.SetDaylight(50); else ReefAngel.PWM.SetDaylight(0);
}
It looks much better :)
To make it trigger faster than every whole minute, use this instead:

Code: Select all

  if ((second(now())%10)<=3) StandardThunderstorm(); else ReefAngel.PWM.SetDaylight(0);
This code will actually make it last 3s every 10s, so you can have see the effect faster.
3s duration seems to give better result than just 1 second.

Re: LED Lightning Storm Simuation

Posted: Mon Jun 27, 2011 8:11 pm
by bmhair03
Will try it tonight. how long does the stom last?

Re: LED Lightning Storm Simuation

Posted: Mon Jun 27, 2011 8:12 pm
by bmhair03
Oh does it resume back to the previous PWM from the slope.

Re: LED Lightning Storm Simuation

Posted: Mon Jun 27, 2011 8:14 pm
by rimai
Not with this code.
It will only show how it will look.
Then, we can come up with a formula to trigger the effect.

Re: LED Lightning Storm Simuation

Posted: Mon Jun 27, 2011 8:37 pm
by bmhair03
I see said the blind man. Possibly one of the timers set to ramdom? I do not use wave maker or dosing if that helps. Shoot you have my .pde ! Ill shut up now. Thanks for doing eveything and me just asking. :) I wish I could be more of a help. REEF ANGEL RULES!!!!!!

Re: LED Lightning Storm Simuation

Posted: Sat Jul 16, 2011 11:54 am
by aranax
Hey guys, sorry to revive an old thread but....I'm having problems trying this out.

Is there a way to add in random cloud cover and thunderstorms into my current PWMSlope? I have 4 separate drivers and I'd like to simulate cloud cover and dim the blues then spike the whites for thunderstorms.

The current cloud cover and TStorm effects don't take into consideration 4 separate drivers (at least I don't think it does :))

Here is some info on my setup.

Driver 0 - Royal Blue
Driver 1 - Regular Blue
Driver 2 - Cool White
Driver 3 - Warm White

PWMSlope:
PWMChannel[LEDPWM0]=PWMSlope(10,30,22,00,0,50,240,PWMChannel[LEDPWM0]);
PWMChannel[LEDPWM1]=PWMSlope(10,00,22,15,0,50,240,PWMChannel[LEDPWM1]);
PWMChannel[LEDPWM2]=PWMSlope(11,0,21,30,0,40,240,PWMChannel[LEDPWM2]);
PWMChannel[LEDPWM3]=PWMSlope(11,30,20,00,0,40,240,PWMChannel[LEDPWM3]);

Thanks.

Jeremiah

Re: LED Lightning Storm Simuation

Posted: Sat Jul 16, 2011 3:21 pm
by rimai
How often would you like the cloud to happen??
Do you want just the channel 0 and 1 to dim when cloud effect occurs?
What about thunderstorm? Is channel 2 and 3 going to be 0% and then spikes of white to get the thundrestorm effect?

Re: LED Lightning Storm Simuation

Posted: Sat Jul 16, 2011 10:41 pm
by aranax
Ideally, clouds would happen randomly every few days or so. Not that big of a deal for now as long as it's not every day.

For clouds all channels would dim with channels 0 and 1 (blues) being the dominant colors. Kinda like moonlights.

Thunder storms should happen randomly with the beginning resembling cloud cover. No random TStorms when the lights are running "normally". Spikes of channel 2 (Cool white) maybe some warm white as well (what ever is easiest) would be cool along with random number of spikes per cycle. Ie. 1-x spikes of the white channels per random TStorm call.

Naturally, lighting should return to normal after the random effects end.

...getting wave makers to turn on/cycle more violently during TStorms would be a cool next step...

Jeremiah

Re: LED Lightning Storm Simuation

Posted: Sun Jul 17, 2011 8:26 am
by rimai
Ok, let's go with the could effect first.
If I understood correctly, you want an overcast type of effect and not a passing cloud, correct?
It would happen every few days and last for how long?
If we choose to pick the day of the month as a possible trigger, we could check for even days, for example. Then for every even day, you can pick a % chance for that to happen. Would that work for you?

Re: LED Lightning Storm Simuation

Posted: Sun Jul 17, 2011 4:37 pm
by aranax
that would work. I guess passing clouds with a random duration is what I was thinking about. Is it hard to program one versus the other? Is there a difference i.e a fairly long duration passing cloud is like an overcast effect, correct?

I guess the duration would range from 5 minutes to 2 hours (??)

Even day as a trigger sounds good.

Thanks Robert.

Jeremiah

Re: LED Lightning Storm Simuation

Posted: Mon Jul 18, 2011 8:51 am
by rimai
Can you start a new thread for this?

Re: LED Lightning Storm Simuation

Posted: Mon Jul 18, 2011 8:09 pm
by aranax