PWM module and Digital Dimming on led drivers

Expansion modules and attachments
Post Reply
User avatar
Express Reef
Posts: 51
Joined: Thu Mar 21, 2013 2:19 am
Location: South Africa

PWM module and Digital Dimming on led drivers

Post by Express Reef »

Good Day All,

I did a DIY led build using steves leds. Total led power 400watt. Now I want to code my RA so that I can do Thunder storms and clouds... Is this possible? :mrgreen:
Image
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: PWM module and Digital Dimming on led drivers

Post by Sacohen »

If the Steve's LED's are capable of it (I'm assuming they are) here is a thread on the topic.

viewtopic.php?f=12&t=117&p=723&hilit=Storm+Effect#p723

Here is Roberto's post...
rimai wrote: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:

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);
}
Post Reply