LED Lightning Storm Simuation

Do you have a question on how to do something.
Ask in here.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: LED Lightning Storm Simuation

Post 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.
Roberto.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: LED Lightning Storm Simuation

Post 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
bmhair03
Posts: 166
Joined: Sun Mar 20, 2011 1:22 pm

Re: LED Lightning Storm Simuation

Post 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.
Last edited by bmhair03 on Sun Jun 26, 2011 7:51 pm, edited 1 time in total.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: LED Lightning Storm Simuation

Post by rimai »

Cool.
Does it look good?
Roberto.
bmhair03
Posts: 166
Joined: Sun Mar 20, 2011 1:22 pm

Re: LED Lightning Storm Simuation

Post by bmhair03 »

Yes it looks really nice. still working on the upload.
bmhair03
Posts: 166
Joined: Sun Mar 20, 2011 1:22 pm

Re: LED Lightning Storm Simuation

Post by bmhair03 »

Heres the video remember very bad quaity but you can see the effect
http://www.youtube.com/watch?v=ivWYJ6j-6lM
bmhair03
Posts: 166
Joined: Sun Mar 20, 2011 1:22 pm

Re: LED Lightning Storm Simuation

Post by bmhair03 »

Is it possible to make the lighting faster or sharper? Or is that the drivers
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: LED Lightning Storm Simuation

Post by rimai »

Nice.
Agreed. Needs more contrast between between peeks.
Let me work on it.
Roberto.
bmhair03
Posts: 166
Joined: Sun Mar 20, 2011 1:22 pm

Re: LED Lightning Storm Simuation

Post by bmhair03 »

You the Man Roberto! Thanks for the help.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: LED Lightning Storm Simuation

Post 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.
Roberto.
bmhair03
Posts: 166
Joined: Sun Mar 20, 2011 1:22 pm

Re: LED Lightning Storm Simuation

Post by bmhair03 »

Will try it tonight. how long does the stom last?
bmhair03
Posts: 166
Joined: Sun Mar 20, 2011 1:22 pm

Re: LED Lightning Storm Simuation

Post by bmhair03 »

Oh does it resume back to the previous PWM from the slope.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: LED Lightning Storm Simuation

Post 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.
Roberto.
bmhair03
Posts: 166
Joined: Sun Mar 20, 2011 1:22 pm

Re: LED Lightning Storm Simuation

Post 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!!!!!!
aranax
Posts: 120
Joined: Thu Jun 02, 2011 11:54 pm

Re: LED Lightning Storm Simuation

Post 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
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: LED Lightning Storm Simuation

Post 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?
Roberto.
aranax
Posts: 120
Joined: Thu Jun 02, 2011 11:54 pm

Re: LED Lightning Storm Simuation

Post 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
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: LED Lightning Storm Simuation

Post 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?
Roberto.
aranax
Posts: 120
Joined: Thu Jun 02, 2011 11:54 pm

Re: LED Lightning Storm Simuation

Post 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
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: LED Lightning Storm Simuation

Post by rimai »

Can you start a new thread for this?
Roberto.
aranax
Posts: 120
Joined: Thu Jun 02, 2011 11:54 pm

Re: LED Lightning Storm Simuation

Post by aranax »

Image
Post Reply