Easy to do that with RA
LED Lightning Storm Simuation
-
rimai
- Posts: 12857
- Joined: Fri Mar 18, 2011 6:47 pm
Re: LED Lightning Storm Simuation
You could always do it with saltwater and then turn off and just rinse with freshwater at the end.
Easy to do that with RA
Easy to do that with RA
Roberto.
-
alexwbush
- Posts: 327
- Joined: Tue Mar 22, 2011 12:45 am
- Location: San Diego, CA
Re: LED Lightning Storm Simuation
very true. My concern would be with salt splashing. Most see that already in their sump... nasty stuff.
But, back on topic of programming, I should have LEDs Monday and then let the fun begin!
Roberto, how did you code the PWM expansion for cloud modes? Is it hard coded? Or is there another .h or .cpp file?
But, back on topic of programming, I should have LEDs Monday and then let the fun begin!
Roberto, how did you code the PWM expansion for cloud modes? Is it hard coded? Or is there another .h or .cpp file?
-
alexwbush
- Posts: 327
- Joined: Tue Mar 22, 2011 12:45 am
- Location: San Diego, CA
Re: LED Lightning Storm Simuation
ok, step 1: random number generator
-
rimai
- Posts: 12857
- Joined: Fri Mar 18, 2011 6:47 pm
-
bmhair03
- Posts: 159
- Joined: Sun Mar 20, 2011 1:22 pm
Re: LED Lightning Storm Simuation
Roberto,
How many drivers do you need to have to run these feature? 6 ?
How many drivers do you need to have to run these feature? 6 ?
-
rimai
- Posts: 12857
- Joined: Fri Mar 18, 2011 6:47 pm
Re: LED Lightning Storm Simuation
You can do storm with just one driver, but you won't get much cloud effect from just 1.
You can achieve a dim down and up, but it won't appear as a passing cloud (to the human eyes).
You can achieve a dim down and up, but it won't appear as a passing cloud (to the human eyes).
Roberto.
-
alexwbush
- Posts: 327
- Joined: Tue Mar 22, 2011 12:45 am
- Location: San Diego, CA
Re: LED Lightning Storm Simuation
thats one reason I was thinking lightning storm or just cloud cover. Most people have 22 drivers (one blue, one white). But running different drivers for different rows would be pretty cool for effects.
-
rimai
- Posts: 12857
- Joined: Fri Mar 18, 2011 6:47 pm
Re: LED Lightning Storm Simuation
For those who want to try this with the standard PWM channels, all you have to do is set different values of PWM randomly.
Something like this:
Something like this:
Code: Select all
#include <ReefAngel_Features.h>
#include <ReefAngel_Globals.h>
#include <ReefAngel_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <ReefAngel_EEPROM.h>
#include <ReefAngel_NokiaLCD.h>
#include <ReefAngel_ATO.h>
#include <ReefAngel_Joystick.h>
#include <ReefAngel_LED.h>
#include <ReefAngel_TempSensor.h>
#include <ReefAngel_Relay.h>
#include <ReefAngel_PWM.h>
#include <ReefAngel_Timer.h>
#include <ReefAngel_Memory.h>
#include <ReefAngel.h>
void setup()
{
ReefAngel.Init(); //Initialize controller
randomSeed(analogRead(0));
}
void loop()
{
ReefAngel.ShowInterface();
if (second(now())==0) StandardThunderstorm(); else ReefAngel.PWM.SetDaylight(0);
}
void StandardThunderstorm()
{
byte value=random(255);
ReefAngel.PWM.SetDaylight(value);
}
Roberto.
-
alexwbush
- Posts: 327
- Joined: Tue Mar 22, 2011 12:45 am
- Location: San Diego, CA
Re: LED Lightning Storm Simuation
sounds good! but doesn't the code above return a value between 0 and 255 for the LED percentage? Shouldn't it be 0-100 or 15-100 for us meanwell driver folks?
For meanwells, maybe something like:
For meanwells, maybe something like:
Code: Select all
#include <ReefAngel_Features.h>
#include <ReefAngel_Globals.h>
#include <ReefAngel_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <ReefAngel_EEPROM.h>
#include <ReefAngel_NokiaLCD.h>
#include <ReefAngel_ATO.h>
#include <ReefAngel_Joystick.h>
#include <ReefAngel_LED.h>
#include <ReefAngel_TempSensor.h>
#include <ReefAngel_Relay.h>
#include <ReefAngel_PWM.h>
#include <ReefAngel_Timer.h>
#include <ReefAngel_Memory.h>
#include <ReefAngel.h>
void setup()
{
ReefAngel.Init(); //Initialize controller
randomSeed(analogRead(0));
}
void loop()
{
ReefAngel.ShowInterface();
if (second(now())==0) StandardThunderstorm(); else ReefAngel.PWM.SetDaylight(0);
}
void StandardThunderstorm()
{
//for meanwells 15%-100%
byte value=random(85);
if (value > 0) value = value+15;
ReefAngel.PWM.SetDaylight(value);
}
-
rimai
- Posts: 12857
- Joined: Fri Mar 18, 2011 6:47 pm
-
bmhair03
- Posts: 159
- Joined: Sun Mar 20, 2011 1:22 pm
Re: LED Lightning Storm Simuation
Very nice . will try it tomorrow and film it 
-
bmhair03
- Posts: 159
- Joined: Sun Mar 20, 2011 1:22 pm
Re: LED Lightning Storm Simulation
if i wanted to try the cloud since i have 2 drivers what is the code for that . Now i might even break my 24 LEDS into 3 strand and add a third driver . Roberto can u PM me availability of the PWM expansion. And is it possible to mod Gen 1 boxes to work with it.
-
rimai
- Posts: 12857
- Joined: Fri Mar 18, 2011 6:47 pm
Re: LED Lightning Storm Simuation
Although it is possible to mod it, you would have to send it to me. It's not as simple.
Roberto.
-
bmhair03
- Posts: 159
- Joined: Sun Mar 20, 2011 1:22 pm
Re: LED Lightning Storm Simuation
I have the code uploaded .What are the item that I put values in .Just the random (85) spot and what dose the % represent. will this just control 1 channel or both.
-
bmhair03
- Posts: 159
- Joined: Sun Mar 20, 2011 1:22 pm
Re: LED Lightning Storm Simuation
When i add the above code All that happens is my daylights start pulsing rapidly
-
bmhair03
- Posts: 159
- Joined: Sun Mar 20, 2011 1:22 pm
Re: LED Lightning Storm Simuation
Here is t the .pde
You do not have the required permissions to view the files attached to this post.
-
rimai
- Posts: 12857
- Joined: Fri Mar 18, 2011 6:47 pm
Re: LED Lightning Storm Simuation
It should pulse for just one second though.
The code will pulse everytime you have a whole minute for 1 second.
I'm curious to see a video. Can you create one?
The code will pulse everytime you have a whole minute for 1 second.
I'm curious to see a video. Can you create one?
Roberto.
-
bmhair03
- Posts: 159
- Joined: Sun Mar 20, 2011 1:22 pm
Re: LED Lightning Storm Simuation
yes i can make a video. It didnt stop for me just kept strobing .
-
rimai
- Posts: 12857
- Joined: Fri Mar 18, 2011 6:47 pm
-
bmhair03
- Posts: 159
- Joined: Sun Mar 20, 2011 1:22 pm
Re: LED Lightning Storm Simuation
sounds go you know what your doing unlike me.
-
rimai
- Posts: 12857
- Joined: Fri Mar 18, 2011 6:47 pm
Re: LED Lightning Storm Simuation
I think it's got to do with the following line:
Try removing it.
I'll only be able to test tomorrow. I have LED string to test at the office.
Code: Select all
ReefAngel.PWM.SetDaylight(PWMSlope(10,30,19,30,15,65,60,ReefAngel.PWM.GetDaylightValue()));
I'll only be able to test tomorrow. I have LED string to test at the office.
Roberto.
-
binder
- Posts: 2865
- Joined: Fri Mar 18, 2011 6:20 pm
- Location: Illinois
- Contact:
Re: LED Lightning Storm Simuation
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.rimai wrote:I think it's got to do with the following line:Try removing it.Code: Select all
ReefAngel.PWM.SetDaylight(PWMSlope(10,30,19,30,15,65,60,ReefAngel.PWM.GetDaylightValue()));
I'll only be able to test tomorrow. I have LED string to test at the office.
curt
-
bmhair03
- Posts: 159
- Joined: Sun Mar 20, 2011 1:22 pm
Re: LED Lightning Storm Simuation
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: 12857
- Joined: Fri Mar 18, 2011 6:47 pm
-
bmhair03
- Posts: 159
- Joined: Sun Mar 20, 2011 1:22 pm
Re: LED Lightning Storm Simuation
Yes it looks really nice. still working on the upload.
-
bmhair03
- Posts: 159
- Joined: Sun Mar 20, 2011 1:22 pm
Re: LED Lightning Storm Simuation
Heres the video remember very bad quaity but you can see the effect
http://www.youtube.com/watch?v=ivWYJ6j-6lM
http://www.youtube.com/watch?v=ivWYJ6j-6lM
-
bmhair03
- Posts: 159
- Joined: Sun Mar 20, 2011 1:22 pm
Re: LED Lightning Storm Simuation
Is it possible to make the lighting faster or sharper? Or is that the drivers
-
rimai
- Posts: 12857
- Joined: Fri Mar 18, 2011 6:47 pm
Re: LED Lightning Storm Simuation
Nice.
Agreed. Needs more contrast between between peeks.
Let me work on it.
Agreed. Needs more contrast between between peeks.
Let me work on it.
Roberto.
-
bmhair03
- Posts: 159
- Joined: Sun Mar 20, 2011 1:22 pm
Re: LED Lightning Storm Simuation
You the Man Roberto! Thanks for the help.
-
rimai
- Posts: 12857
- Joined: Fri Mar 18, 2011 6:47 pm
Re: LED Lightning Storm Simuation
I changed to this:
It looks much better 
To make it trigger faster than every whole minute, use this instead:
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.
Code: Select all
void StandardThunderstorm()
{
byte value=random(100);
if (value>60) ReefAngel.PWM.SetDaylight(50); else ReefAngel.PWM.SetDaylight(0);
}
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);
3s duration seems to give better result than just 1 second.
Roberto.
