Reef Central Online Community

Go Back   Reef Central Online Community > General Interest Forums > Do It Yourself
Blogs FAQ Calendar Mark Forums Read

Notices

User Tag List

Reply
Thread Tools
Unread 10/15/2012, 07:54 AM   #1726
muda
Registered Member
 
muda's Avatar
 
Join Date: Mar 2005
Location: Lithuania
Posts: 157
Can experts look at this

There is sketch for lights only. So croped significantly. Moon part is written by Liquid Arts if I remember it correct.
Unfortunatelly moons not working. Im not strong on coding but It seems to me that there are some flaws. Please check where I am right and where not.

1. Moon phase calculation ( return phase is outside loop, so it works only at reset and keeps that phase for ever until next reset .
2. "Moon led setup" part is all messed up and I dont even understand what it is for and how works.
Like this : if ( ((hour == 7) && (minute < 00)) || (hour < 7))//Off at 730am. How it is off at 7:30 am I cant get as wel las how minute can be below 0.
3. Please explain how this works : " fBlueIntensity /= 1.5; " Is division or what ?
(arduino reference says it must be: result = value1 / value2
4. How do I setup intensity for min and max moon light ?

Code:
  /*******************************************************************************
Light blue+white+moon
 * ------------------------------
 * 0                      A0    
 * 1                      A1 
 * 2                      A2
 * 3  MOON LED PWM        A3
 * 4  LCD                 A4 RTC
 * 5  LCD                 A5 RTC
 * 6  LCD         
 * 7  LCD
 * 8 
 * 9  PWM --
 * 10 LED      PWM
 * 11 LED      PWM
 * 12 LCD
 * 13 LCD
 * -------------------------------
   **********************************************************************************/
   
#include 

#include "Wire.h" 
#define DS1307_I2C_ADDRESS 0x68 // Set rtc

/*|||||||||||||||||||  L E D   D I M M I N G   P A R T  ||||||||||||||||||||||||||*/

int bluemin = 0 ;          // minimmum dimming value of blue LEDs, range of 0-255
int whitemin = 0 ;         // minimum dimming value of white LEDs, range of 0-255

int photoperiod = 360 ;    // amount of time array is on at full power in minutes
int ontime = 8 ;           // when start photoperiod fade in
int ramptime = 240 ;       // time for LEDs to dim on and off in minutes
 
/*|||||||||||||||||||||||||||||||||  P I N    ||||||||||||||||||||||||||||||||||||||*/

int blue = 11;             // blue  LEDs connected to digital pin 11 (pwm)
int white = 10;            // white LEDs connected to digital pin 10 (pwm)
int moon = 3;
int iBlueIntensity;	//declare the integer of blue intensity
float fBlueIntensity;	//declare the floating point version of blue intensity

int bluepercent[] =  { 1, 1, 2, 2, 3, 4, 5, 6, 9, 9, 15, 26, 52, 78, 100, 128, 134, 150, 170, 190, 190, 200,  200, 200, 200 };
int whitepercent[]=  { 0, 0, 0, 0, 0, 0, 0, 1, 2, 3,  4,  7, 12, 23,  35,  50,  70,  80,  90, 100, 120, 130,  140, 150, 160 };

int abc(sizeof(bluepercent)/sizeof(bluepercent[0]));

 /*|||||||||||||||||||||||||||  R T C   C L O C K   D S 1 3 0 7  |||||||||||||||||||||||||||||||*/

byte decToBcd(byte val)
{
  return ( (val/10*16) + (val%10) );
}
byte bcdToDec(byte val)
{
  return ( (val/16*10) + (val%16) );
}
void setDateDs1307(byte second,
byte minute, 
byte hour,
byte dayOfWeek,
byte dayOfMonth,
byte month,
byte year)
{
  Wire.beginTransmission(DS1307_I2C_ADDRESS);
  Wire.send(0);
  Wire.send(decToBcd(second));
  Wire.send(decToBcd(minute));
  Wire.send(decToBcd(hour));
  Wire.send(decToBcd(dayOfWeek));
  Wire.send(decToBcd(dayOfMonth));
  Wire.send(decToBcd(month));
  Wire.send(decToBcd(year));
  Wire.endTransmission();
}
void getDateDs1307(byte *second,
byte *minute,
byte *hour,
byte *dayOfWeek,
byte *dayOfMonth,
byte *month,
byte *year)
{
  Wire.beginTransmission(DS1307_I2C_ADDRESS);
  Wire.send(0);
  Wire.endTransmission();
  Wire.requestFrom(DS1307_I2C_ADDRESS, 7);
 
  *second = bcdToDec(Wire.receive() & 0x7f);
  *minute = bcdToDec(Wire.receive());
  *hour = bcdToDec(Wire.receive() & 0x3f);
  *dayOfWeek = bcdToDec(Wire.receive());
  *dayOfMonth = bcdToDec(Wire.receive());
  *month = bcdToDec(Wire.receive());
  *year = bcdToDec(Wire.receive());
}

/*|||||||||||||||||||||||||||  D E F I N E  :  L U N A R P H A S E ||||||||||||||||||||||||||||||*/

int moonPhase(int moonYear, int moonMonth, int moonDay)
{
  int dayFromYear, dayFromMonth;
  double julianDay;
  int phase;

  if (moonMonth < 3)		//keep the month before march
  {
    moonYear--;			//take away a year
    moonMonth += 12;		//add an extra 12 months (the year taken away from before)
  }
  ++moonMonth;
  dayFromYear = 365.25 * moonYear; //get days from current year
  dayFromMonth = 30.6 * moonMonth; //get number of days from the current month
  julianDay = dayFromYear + dayFromMonth + moonDay - 694039.09; //add them all  
  julianDay /= 29.53;		//divide by the length of lunar cycle
  phase = julianDay;		//take integer part
  julianDay -= phase;		//get rid of the int part
  phase = julianDay*8 + 0.5;	//get it between 0-8 and round it by adding .5
  phase = phase & 7;		//get a number between 1-7
  return phase; 		//1 == new moon, 4 == full moon
}
/*||||||||||||||||||||||||||||||  D E F I N E  :  O N E S E C O N D ||||||||||||||||||||||||||||||*/

void onesecond() //function that runs once per second while program is running
{
  byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;
  getDateDs1307(&second, &minute, &hour, &dayOfWeek, &dayOfMonth, &month, &year);
  
   delay(1000);
}
/*||||||||||||||||||||||||||||||||||  S E T U P  P I N   |||||||||||||||||||||||||||||||||||||||||*/

void setup() {
 
  pinMode(moon, OUTPUT);

/*|||||||||||||||||||||||||||||||  S E T U P - C L O C K  ||||||||||||||||||||||||||||||||||||||||*/

  byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;
  Wire.begin();

  second = 
  0;
  minute = 04;
  hour = 18;
  dayOfWeek = 1;  // Sunday is 0
  dayOfMonth = 12;
  month = 10;
  year = 12;
  
  
  //setDateDs1307(second, minute, hour, dayOfWeek, dayOfMonth, month, year); //set clock here

  
  analogWrite(blue, bluemin);
  analogWrite(white, whitemin);
  }

/*|||||||||||||||||@@@@@@@@@@@@@@@@@@@@@@@@@@@|||||  L O O P |||||||@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@||||||||||||||||||||||*/
 
void loop()
{
  onesecond();

  /*|||||||||||||||||||||||||||||||||||||||||||||||  L U N A R |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||*/


  float fSecond, fHour, fMinute;		//turn the times read from the RTC into float for math ops
  byte second, minute, hour, dayOfWeek, dayOfMonth, month, year; //declare variables to hold the times
  getDateDs1307(&second, &minute, &hour, &dayOfWeek, &dayOfMonth, &month, &year); //read the RTC times
  int daybyminute = ((hour * 60) + minute);     //converts time of day to a single value in minutes
  fSecond = (float) second;			//sets fSecond as the float version of the integer second from the RTC
  fMinute = (float) minute;			//same as above, but for the minute
  fHour = (float) hour;				//same as above, but for the hour
  int lunarCycle = moonPhase(year, month, dayOfMonth); //get a value for the lunar cycle
 
  /*------------------------------ MOON LED SETUP ------------------------------------------//

  if ( ((hour == 7) && (minute < 00)) || (hour < 7))//Off at 730am.
  {
    fBlueIntensity = 255;		//...then we want the blue LED at the max brightness (255)
  }

  else if (hour > 17) //&& (hour < 19))             // On at 5pm
  {	
    fBlueIntensity = 255 * (((fHour - 19) + (fMinute / 59)) / 7);   //...set intensity out of 255 based on time since 17:00
  }
  else
  {
    fBlueIntensity = 0;
  }
*/
 //--------- Account for the moon cycle with the blue LEDs ---------//

   if (lunarCycle == 0)		                //new moon
  {
    fBlueIntensity /= 2;
  }
  if ((lunarCycle == 1) || (lunarCycle == 7))	//cresent
  {
    fBlueIntensity /= 1.75 ;
  }
  if ((lunarCycle == 2) || (lunarCycle == 6))	//half moon
  {
   fBlueIntensity /= 1.5;
  }
  if ((lunarCycle == 3) || (lunarCycle == 5))	//gibbous
  {
    fBlueIntensity /= 1.25;
  }

  //full moon is full intensity 


  //------------------- FLOAT TO INT ----------------------//
  
  iBlueIntensity = (int) fBlueIntensity;

  //---  Prepare the intensities to be written to pin ----//

  if (iBlueIntensity < 0) //if the blue intensity is less then 0, set it to 0
  {
    iBlueIntensity = 0;
  }
  analogWrite(moon, iBlueIntensity);
  delay(1000);

/*||||||||||||||||||||||||||||||||  R A M P   T I M E   C A L C U L A T I O N ||||||||||||||||||||||||||||||||*/


  int rampup;
     if (daybyminute >= (ontime*60))
       rampup = (((ontime*60) + ramptime) - daybyminute);
     else
       rampup = ramptime;

    int rampdown;
    if (((ontime * 60) + photoperiod + ramptime) <= daybyminute)
      rampdown = (((ontime*60) + photoperiod + 2*ramptime) - daybyminute);
    else
      rampdown = ramptime;

    /*||||||||||||||||||||||||||||||||||||||||||   F A D E  I N ||||||||||||||||||||||||||||||||||||||||||||||*/

 if (daybyminute >= (ontime*60))
   { if (daybyminute < ((ontime*60) + ramptime))
    {
     int i;
      for (int i = 0; i < abc; i++)
{
  analogWrite(blue, bluepercent[i]);
  analogWrite(white, whitepercent[i]);
  
       int countdown = ((rampup*60)/abc);
       while (countdown>0)
        {
          onesecond();
          countdown--;
         }
       }
     }
    }    

 /*|||||||||||||||||||||||||||||||||||||||||||||||     M A X     |||||||||||||||||||||||||||||||||||||||||||||*/

if ( daybyminute >= ((ontime * 60) + ramptime))
  {
    if ( daybyminute < ((ontime * 60) + ramptime + photoperiod ))
     {
    analogWrite(blue, 180);
    analogWrite(white, 180);
      }
  }
   
  /*|||||||||||||||||||||||||||||||||||||||||||||   F A D E  O U T   |||||||||||||||||||||||||||||||||||||||||*/
  
   if ( daybyminute >= ((ontime * 60) + photoperiod + ramptime))
   
  {
    if ( daybyminute < (ontime * 60) + photoperiod + (ramptime *2) )
    { 
        for (int i = abc-1; i >= 0; i--)
{
  analogWrite(blue, bluepercent[i]);
  analogWrite(white, whitepercent[i]);
       
        int countdown = ((rampdown*60)/abc); // calculates seconds to next step
        while (countdown>0)
        {
          onesecond(); 
          countdown--;
          }
     }
    }
  }
 

//*||||||||||||||||||||||||||||||||||||||||||||||||  Night Time ||||||||||||||||||||||||||||||||||||||||||||||*/

  if  (daybyminute >= (((ontime * 60) + photoperiod + (2 * ramptime))))
       {        
          
    }
}
//*||||||||||||||||||||||||||||||||||||||||||||||||  T H E   E N D  ||||||||||||||||||||||||||||||||||||||||||*/




Last edited by muda; 10/15/2012 at 08:11 AM.
muda is offline   Reply With Quote
Unread 10/22/2012, 09:41 PM   #1727
MyBoxOfWater
Registered Member
 
MyBoxOfWater's Avatar
 
Join Date: Mar 2009
Posts: 114
Very New To DIY Controllers

Looking at what is available out there i came across this controller....
Seeeduino Mega
http://seeedstudio.com/wiki/Seeeduin...lication_Ideas

Has anyone used this unit?
Pros or Cons??

Thanks,
Steve


__________________
Knowledge - Enough to be Dangerous!

Current Tank Info: 46 Salt / 33 Frag Tank
MyBoxOfWater is offline   Reply With Quote
Unread 10/23/2012, 04:21 AM   #1728
muda
Registered Member
 
muda's Avatar
 
Join Date: Mar 2005
Location: Lithuania
Posts: 157
Seems like this thread is ready to die.


muda is offline   Reply With Quote
Unread 10/23/2012, 06:15 AM   #1729
mikez104
Premium Member
 
mikez104's Avatar
 
Join Date: Feb 2003
Location: Pittsburgh
Posts: 212
Quote:
Originally Posted by muda View Post
Seems like this thread is ready to die.
Yup.


mikez104 is offline   Reply With Quote
Unread 10/23/2012, 07:41 PM   #1730
MyBoxOfWater
Registered Member
 
MyBoxOfWater's Avatar
 
Join Date: Mar 2009
Posts: 114
Quote:
Originally Posted by muda View Post
Seems like this thread is ready to die.
Why do you think that?

Is there something better out there?

Would love to know


__________________
Knowledge - Enough to be Dangerous!

Current Tank Info: 46 Salt / 33 Frag Tank
MyBoxOfWater is offline   Reply With Quote
Unread 10/25/2012, 07:14 AM   #1731
Reefmee
Registered Member
 
Join Date: Dec 2011
Posts: 1
Would like to try this, but no libraries. Do you mind to upload the files?

Thanks,
Kev.


Quote:
Originally Posted by matiLanza View Post
This is better


Code:
#include 

#include 

#include 

#include 

#include 

#include 

 

/* A-normal mode

B-set time

C-feed mode

D-water change mode

 

Analog Pin 0 =

Analog Pin 1 = PH Probe

Analog Pin 2 = ATO Safety

Analog Pin 3 = ATO Input

Analog Pin 4 = SDA for I2C

Analog Pin 5 = SCL for I2C

 

Digital Pin 0 = RX

Digital Pin 1 = TX

Digital Pin 2 = Temp Sensor

Digital Pin 3 = Heater

Digital Pin 4 = Fan

Digital Pin 5 = Sump

Digital Pin 6 = Power Head 1

Digital Pin 7 = Power Head 2

Digital Pin 8 = ATO Pump Output

Digital Pin 9 = 

Digital Pin 10 = White LED

Digital Pin 11 = Blue LED

Digital Pin 12 = 

Digital Pin 13 =  

*/

 

LCDI2C lcd = LCDI2C(4,20,0x4C,1); // [# of lines on LCD],[address of serial LCD controller on I2C]

 

#define ONE_WIRE_BUS 2 //Define the pin of the DS18B20

 

 

 

int heater = 3;

int LED_blue = 10;       // Analog pwm for blue LEDs

int LED_white = 11;     // Analog pwm for white LEDs

int fan = 4;

int sump = 5;

int ph_1 = 6;

int ph_2 = 7;

int ato = 8;

int safety_input = A2;

int ato_input = A3;

 

int ato_time_day = 10; // Number of seconds the ATO runs each time during day time.

int ato_time_night = 10; // Number of seconds the ATO runs each time during night time.

    // Useful for running kalkwasser and account for pH drop during night time.

int ato_count = 0; // Counts how many time ATO is active (ato_count X 50 ml = ml/day)

 

 

int heater_on_temp = 78.00; // Turn on the heater at this temp ex 78 degrees = 7800, 78.5 degrees = 7850

int heater_off_temp = 80.00; // Turn off heater at this temp

 

int fan_on_temp = 100.0; // Turn on fan at this temp

int fan_off_temp = 94.00; // Turn fan off once below this temp

 

int lights_off_temp = 115.00; // Turn off the lights if the temp rises above this temp

 

int LED_sunrise_on = 700;      // Star of sunrise; White 0 % going 100 %,     Blue 15 % going 100 %. Military time.

int LED_sunrise_off = 800;    // End of sunrise.. Military time.

int LED_sunset_on = 1800;     // Start of sunset; White 100 % going 0 %, Blue 100 % going 2 %.. Military time.

int LED_sunset_off = 1900;     // End of sunset.. Military time.

 

int dimControl = 255;             // Variable used to control max. LEDs intensity

int dimWhiteMoonLight = 0;     // White LED dim value for MoonLight

int dimBlueMoonLight = 26;       // Blue LED dim value for MoonLight (5 out of 255) 26 for 10%

 

int white_fade = 0;

int blue_fade = 0;

 

int feed_time = 5; // Turn off power heads for this amount of time when feed mode button is pressed.

int water_change = 20; // Turn off power heads for this amount of time when water change mode is present.

int pumps_off = -10; // Placeholder --don't change

 

int keypad_delay = 15; // Necessary delay to keep from having scrambled characters on the display

    // global variables

int minute, hour, second, date, month, year, now, mil_time;

 

int ato_hour = 0;

// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)

OneWire oneWire(ONE_WIRE_BUS);

 

// Pass our oneWire reference to Dallas Temperature. 

DallasTemperature sensors(&oneWire);

 

//------------------------------------------------pH------------------------------

// change this to whatever pin you've moved the jumper to

int ph_pin = 5;

//int for the averaged readin

int reading;

//int for conversion to millivolts

int millivolts;

//float for the ph value

float ph_value;

int i;

 

// highly recommended that you hook everything up and check the arduino's voltage with a multimeter. It doesn't make that much of a difference, but

// if you want it to be highly accurate than do this step

 

#define ARDUINO_VOLTAGE 4.96

// PH_GAIN is (4000mv / (59.2 * 7))

// 4000mv is max output and 59.2 * 7 is the maximum range (in millivolts) for the ph probe.

#define PH_GAIN 9.6525 

 

 

void setup(void) {

Wire.begin(); // Initialize the I2C bus

lcd.init(); // Initialize LCD

sensors.begin();             // Start up the DS18B20 Temp library

Serial.begin(9600);

  

//****** initialize inputs/outputs ************************************/

pinMode(heater, OUTPUT); 

pinMode(fan, OUTPUT);  

pinMode(LED_white, OUTPUT);       

pinMode(LED_blue, OUTPUT);          

pinMode(ph_1, OUTPUT); 

pinMode(ph_2, OUTPUT); 

pinMode(sump, OUTPUT);

pinMode(ato, OUTPUT); // digital pin for auto top off as output

pinMode(safety_input, INPUT); // digital pin for water level in the sump

pinMode(ato_input, INPUT); // digital pin for ATO float switch as input 

 

 

digitalWrite(ph_1, HIGH);

digitalWrite(ph_2, LOW);

 

  lcd.setCursor(0, 5);// set the cursor to column 4, line 0

  lcd.print("Mati's Reef");

  lcd.setCursor(1, 3);

  lcd.print("");

  lcd.setCursor(2, 3);

  lcd.print("ReefController");

  lcd.setCursor(3, 4);

  lcd.print("Version 1.07");

  delay(2000);

  lcd.clear(); 

 

}

 

int High = 0;

int Low = 10000;

int on_minute = 1; // indicates that this is the first time through the program.

int counter_delay =0; // used for countdown during water change and feed mods

 

void loop(void){

int mode = 100;

if(lcd.keypad() != -1){

mode = lcd.keypad();

}

 

switch (mode) {

//*********** Mode B Set Time***************************************************************

case 101:{

int minute, hour, second, date, month, year, tens, ones, key;

int set_time = 0;

while(set_time == 0){

lcd.clear();

hour = RTC.get(DS1307_HR,true); // This is in military time [0,23]

minute = RTC.get(DS1307_MIN,false);

second = RTC.get(DS1307_SEC,false);

date = RTC.get(DS1307_DATE,false);

month = RTC.get(DS1307_MTH,false);

year = RTC.get(DS1307_YR,false);

 

lcd.setCursor(0,0);

lcd.print("Set time:");

lcd.setCursor(1,10);

if(hour < 10){

lcd.print(" ");

delay(keypad_delay);

}

lcd.print(hour);

delay(keypad_delay);

lcd.print(":");

delay(keypad_delay);

if(minute < 10){

lcd.print("0");

delay(keypad_delay);

}

lcd.print(minute);

delay(keypad_delay);

 

lcd.setCursor(2,0);

lcd.print("Set date:");

lcd.setCursor(3,10);

if(month < 10){

lcd.print(" ");

delay(keypad_delay);

}

lcd.print(month);

delay(keypad_delay);

lcd.print("/");

delay(keypad_delay);

if(date < 10){

lcd.print(" ");

delay(keypad_delay);

}

lcd.print(date);

delay(keypad_delay);

lcd.print("/");

delay(keypad_delay);

if(year < 10){

lcd.print("0");

delay(keypad_delay);

}

lcd.print(year);

delay(keypad_delay);

lcd.setCursor(1,10);

lcd.cursor_on();

//**************Set Hour*********************************************************************************************

for (;;){

key = lcd.keypad();

if(key >= 0 && key <= 2){tens = key; break;}

}

for (;;){

key = lcd.keypad();

if(key == -1){break;}

}

lcd.print(tens);

delay(keypad_delay);

for (;;){

key = lcd.keypad();

if(key >= 0 && key <= 9){ones = key; break;}

}

for (;;){

key = lcd.keypad();

if(key == -1){break;}

}

lcd.right();

RTC.stop();

RTC.set(DS1307_HR,tens * 10 + ones);

RTC.start();

lcd.setCursor(1,10);

hour = RTC.get(DS1307_HR,true);

if(hour < 10){

lcd.print(" ");

delay(keypad_delay);

}

lcd.print(hour);

delay(keypad_delay);

lcd.right();

//**************Set Minute*********************************************************************************************

for (;;){

key = lcd.keypad();

if(key >= 0 && key <= 6){tens = key; break;}

}

for (;;){

key = lcd.keypad();

if(key == -1){break;}

}

lcd.print(tens);

delay(keypad_delay);

for (;;){

key = lcd.keypad();

if(key >= 0 && key <= 9){ones = key; break;}

}

for (;;){

key = lcd.keypad();

if(key == -1){break;}

}

lcd.right();

RTC.stop();

RTC.set(DS1307_MIN,tens * 10 + ones);

RTC.start();

lcd.setCursor(1,13);

minute = RTC.get(DS1307_MIN,true);

if(minute < 10){

lcd.print("0");

delay(keypad_delay);

}

lcd.print(minute);

delay(keypad_delay);

 

//**************Set Month*********************************************************************************************

lcd.setCursor(3,10);

for (;;){

key = lcd.keypad();

if(key == 0 || key == 1){tens = key; break;}

}

for (;;){

key = lcd.keypad();

if(key == -1){break;}

}

lcd.print(tens);

delay(keypad_delay);

for (;;){

key = lcd.keypad();

if(key >= 0 && key <= 9){ones = key; break;}

}

for (;;){

key = lcd.keypad();

if(key == -1){break;}

}

lcd.right();

RTC.stop();

RTC.set(DS1307_MTH,tens * 10 + ones);

RTC.start();

lcd.setCursor(3,10);

month = RTC.get(DS1307_MTH,true);

if(month < 10){

lcd.print(" ");

delay(keypad_delay);

}

lcd.print(month);

delay(keypad_delay);

 

//**************Set Date*********************************************************************************************

lcd.setCursor(3,13);

for (;;){

key = lcd.keypad();

if(key >= 0 && key <= 3){tens = key; break;}

}

for (;;){

key = lcd.keypad();

if(key == -1){break;}

}

lcd.print(tens);

delay(keypad_delay);

for (;;){

key = lcd.keypad();

if(key >= 0 && key <= 9){ones = key; break;}

}

for (;;){

key = lcd.keypad();

if(key == -1){break;}

}

lcd.right();

RTC.stop();

RTC.set(DS1307_DATE,tens * 10 + ones);

RTC.start();

lcd.setCursor(3,13);

date = RTC.get(DS1307_DATE,true);

if(date < 10){

lcd.print(" ");

delay(keypad_delay);

}

lcd.print(date);

delay(keypad_delay);

 

//**************Set Year*********************************************************************************************

lcd.setCursor(3,18);

for (;;){

key = lcd.keypad();

if(key >= 0 && key <= 9){tens = key; break;}

}

for (;;){

key = lcd.keypad();

if(key == -1){break;}

}

lcd.print(tens);

delay(keypad_delay);

for (;;){

key = lcd.keypad();

if(key >= 0 && key <= 9){ones = key; break;}

}

for (;;){

key = lcd.keypad();

if(key == -1){break;}

}

lcd.right();

RTC.stop();

RTC.set(DS1307_YR,tens * 10 + ones);

RTC.start();

lcd.setCursor(3,16);

year = RTC.get(DS1307_YR,true);

if(year < 10){

lcd.print(" ");

delay(keypad_delay);

}

lcd.print(year);

delay(5000);

lcd.clear();

//**************Finish Up*********************************************************************************************

for (;;){

lcd.cursor_off();

lcd.setCursor(0,0);

lcd.print("Time & Date Set");

delay(keypad_delay);

lcd.setCursor(2,0);

lcd.print("Select mode A B C D");

delay(keypad_delay);

if(lcd.keypad() == 100){set_time = 1; break;}

if(lcd.keypad() == 101){break;}

if(lcd.keypad() == 102){set_time = 1; break;}

if(lcd.keypad() == 103){set_time = 1; break;}

}

lcd.clear();

} // finishes set_time == 0

break;

} // end case 101

 

case 102: { // case for key C = feed mode

int minute, second;

lcd.clear();

lcd.setCursor(0,1);

lcd.print("Feed mode active !");

// Power down whatever has to

digitalWrite(ph_1, LOW);

digitalWrite(ph_2, LOW);

digitalWrite(sump, LOW); // add any other device that you want to power down as digitalWrite(device, LOW);

 

lcd.setCursor(2,0);

lcd.print("Time left: ");

counter_delay = feed_time * 60; // Number of seconds for feed mode

while(counter_delay >= 0)

{

lcd.setCursor(2,12);

minute = counter_delay / 60;

second = counter_delay % 60;

lcd.print(minute,DEC);

delay(keypad_delay);

lcd.print(":");

if(second < 10) {

lcd.print("0");

delay(keypad_delay);

}

lcd.print(second,DEC);

delay(1000); // one second delay used also for countdown

counter_delay = counter_delay -1;

if(lcd.keypad() == 100) { // forced resume of normal mode by "A" key

break;

}

}

counter_delay = 0;

lcd.clear();

break;

}

 

case 103: { // case for key D = water change mode

int minute, second;

lcd.clear();

lcd.setCursor(0,0);

lcd.print("Water change mode !");

// Power down whatever has to

digitalWrite(ph_1, LOW);

digitalWrite(ph_2, LOW);

digitalWrite(sump, LOW); // add any other device that you want to power down as digitalWrite(device, LOW);

 

lcd.setCursor(2,0);

lcd.print("Time left: ");

counter_delay = water_change * 60; // Number of seconds for water change mode

while(counter_delay >= 0)

{

lcd.setCursor(2,12);

minute = counter_delay / 60;

second = counter_delay % 60;

lcd.print(minute,DEC);

delay(keypad_delay);

lcd.print(":");

if(second < 10) {

lcd.print("0");

delay(keypad_delay);

}

lcd.print(second,DEC);

delay(1000); // one second delay used also for countdown

counter_delay = counter_delay -1;

if(lcd.keypad() == 100) { // forced resume of normal mode by "A" key

break;

}

}

counter_delay = 0;

lcd.clear();

break;

}

 

case 100: { // Normal operating mode the "A" key

 

int  minute, hour, second, date, month, year, mil_time, minuteCounter;

char buf[12]; // Used to convert int to string for displaying on LCD

 

// Get time from DS1307**********************************************************************************************

hour = RTC.get(DS1307_HR,true); // This is in military time [0,23]

minute = RTC.get(DS1307_MIN,false);

second = RTC.get(DS1307_SEC,false);

date = RTC.get(DS1307_DATE,false);

month = RTC.get(DS1307_MTH,false);

year = RTC.get(DS1307_YR,false);

 

mil_time = (hour * 100) + minute; // Create military time output [0000,2400)

minuteCounter = hour * 60 + minute;         // Daily minutes counter

 

// Get temp data from DS18B20 ***************************************************************************************

// DS18B20 display

sensors.requestTemperatures(); // Send the command to get temperatures

delay(250);

 

  

float temp1=0, temp2=0;

 

  lcd.setCursor(1, 10);

  lcd.print("L:");

  delay(keypad_delay);

  temp1= sensors.getTempFByIndex(1);

  delay(keypad_delay);

  lcd.print(sensors.getTempFByIndex(1)); 

  delay(keypad_delay);

  lcd.write(0xDF);

  delay(keypad_delay);

  lcd.print("F");

  delay(keypad_delay);

    if((temp1) < 100){

      lcd.print(" ");}

      delay(keypad_delay);

  lcd.setCursor(1, 0);

  lcd.print("T:");

  delay(keypad_delay);

  temp2= sensors.getTempFByIndex(0);

  delay(keypad_delay);

  lcd.print(sensors.getTempFByIndex(0)); 

  delay(keypad_delay);

  lcd.write(0xDF);

  delay(keypad_delay);

  lcd.print("F");

  delay(keypad_delay);

    if((temp2) < 100){

      lcd.print(" ");}

      delay(keypad_delay);

  

//  lcd.print(sensors.getTempCByIndex(0));

//  lcd.print((char)223); 

//  lcd.print("C");

 

//Display Time line 0 second half ******************************************************************************************

lcd.setCursor(0,0);

if(hour > 12){

lcd.print(hour - 12, DEC);

delay(keypad_delay);

}

if(hour == 0){

lcd.print(12, DEC);

delay(keypad_delay);

}

if(hour > 0 && hour < 13){

lcd.print(hour, DEC);

delay(keypad_delay);

}

lcd.print(":");

delay(keypad_delay);

if(minute < 10){

lcd.print("0");

delay(keypad_delay);

}

lcd.print(minute, DEC);

delay(keypad_delay);

/* lcd.print(":"); // uncomment for seconds display

delay(keypad_delay);

if(second < 10){

lcd.print("0");

delay(keypad_delay);

}

lcd.print(second, DEC);

delay(keypad_delay); */

if(hour < 12 || hour == 0){

lcd.print("AM");

delay(keypad_delay);

}

else{

lcd.print("PM");

delay(keypad_delay);

}

if(hour < 10 || (hour > 12 && hour - 12 < 10)){

lcd.print(" ");

delay(keypad_delay);

} 

// Calculate total number of minutes from military time 

  

  int Sunrise_on_minuteCounter = (LED_sunrise_on / 100)*60 + LED_sunrise_on % 100;

  int Sunrise_off_minuteCounter = (LED_sunrise_off / 100)*60 + LED_sunrise_off % 100;

  int Sunset_on_minuteCounter = (LED_sunset_on / 100)*60 + LED_sunset_on % 100;

  int Sunset_off_minuteCounter = (LED_sunset_off / 100)*60 + LED_sunset_off % 100;

 

// LEDs light ************************************************************     

      if(minuteCounter >= Sunrise_on_minuteCounter && minuteCounter <= Sunrise_off_minuteCounter) {

        white_fade = map(minuteCounter, Sunrise_on_minuteCounter, Sunrise_off_minuteCounter, dimWhiteMoonLight, dimControl);

        blue_fade = map(minuteCounter, Sunrise_on_minuteCounter, Sunrise_off_minuteCounter, dimBlueMoonLight, dimControl);

        analogWrite(LED_white, white_fade);

        analogWrite(LED_blue, blue_fade);

        lcd.setCursor(0,13); lcd.print("Dawn"); delay(keypad_delay);

      }

      else if(minuteCounter > Sunrise_off_minuteCounter && minuteCounter < Sunset_on_minuteCounter) {

        white_fade = dimControl;

        blue_fade = dimControl;

        analogWrite(LED_white, white_fade);

        analogWrite(LED_blue, blue_fade);

        lcd.setCursor(0,13); lcd.print("Day "); delay(keypad_delay);

      }

      else if(minuteCounter >= Sunset_on_minuteCounter && minuteCounter <= Sunset_off_minuteCounter) {

        white_fade = map(minuteCounter, Sunset_on_minuteCounter, Sunset_off_minuteCounter, dimControl, dimWhiteMoonLight);

        blue_fade = map(minuteCounter, Sunset_on_minuteCounter, Sunset_off_minuteCounter, dimControl, dimBlueMoonLight);

        analogWrite(LED_white, white_fade);

        analogWrite(LED_blue, blue_fade);

        lcd.setCursor(0,13); lcd.print("Dusk"); delay(keypad_delay);

      }

      else {

        white_fade = dimWhiteMoonLight;

        blue_fade = dimBlueMoonLight;

        analogWrite(LED_white, white_fade);

        analogWrite(LED_blue, blue_fade);

        lcd.setCursor(0,13); lcd.print("Moon"); delay(keypad_delay);

    }

 

       Serial.print("Time - ");   

       Serial.print(hour, DEC);

       Serial.print(":");

       if (minute < 10) 

       {

       Serial.print("0");

       }

       Serial.print(minute, DEC);

       Serial.println();

      Serial.print("White LEDs:");

      Serial.print(map(white_fade, 0, 255, 0, 100));

      Serial.print("% ");

      Serial.print("Blue LEDs:");

      Serial.print(map(blue_fade, 0, 255, 0, 100));

      Serial.println("%");

      lcd.setCursor(2,8);

      lcd.print("W:");

      delay(keypad_delay);

      lcd.print(map(white_fade, 0, 255, 0, 100));

      delay(keypad_delay);

      lcd.print("%");

      delay(keypad_delay);

      if((map(white_fade, 0, 255, 0, 100)) < 100){

      lcd.print(" ");

      delay(keypad_delay);

      }

      lcd.setCursor(2,14);

      lcd.print("B:");

      delay(keypad_delay);

      lcd.print(map(blue_fade, 0, 255, 0, 100));

      delay(keypad_delay);

      lcd.print("%");

      if((map(blue_fade, 0, 255,0, 100)) < 100){

      lcd.print(" ");

      delay(keypad_delay);

      }

      

  //***********PH Probe**********************************************************************************************

  //take a sample of 50 readings

  reading = 0;

  for(i = 1; i < 50; i++){

    reading += analogRead(ph_pin);

    delay(10);

  }

  //average it out

  reading /= i;

 

  //convert to millivolts. remember for higher accuracy measure your arduino's voltage with a multimeter and change ARDUINO_VOLTAGE

  millivolts = ((reading * ARDUINO_VOLTAGE) / 1024) * 1000;

 

  ph_value = ((millivolts / PH_GAIN) / 59.2) + 7;

  

 lcd.setCursor(2,0);

 lcd.print("pH:");

 delay(keypad_delay);

 lcd.print(ph_value);

 delay(keypad_delay);

 

// ******* Relay Controls ******************************************************************************

/* ************************************************************************************************** */

 

// Heater

if((temp2) < heater_on_temp){ // turn heater on if temp is below heater_on_temp

digitalWrite(heater, LOW);

lcd.setCursor(3,0);

lcd.print("Heat");

delay(keypad_delay);

}

if((temp2) > heater_off_temp){ //turn heater off if temp is above heater_off_temp

digitalWrite(heater, HIGH);

lcd.setCursor(3,0);

lcd.print("    ");

}

 

// Fan

if((temp1) > fan_on_temp){ // turn fan on if temp is above fan_on_temp

digitalWrite(fan, LOW);

lcd.setCursor(3,5);

lcd.print("Fan");

delay(keypad_delay);

}

if((temp1) < fan_off_temp){ //turn fan off if temp is below fan_off_temp

digitalWrite(fan, HIGH);

lcd.setCursor(3,5);

lcd.print("   ");

}

// Wavemaker

 {

if(second <= 30) { // alternate the two heads every 30 seconds

digitalWrite(ph_1, LOW);

digitalWrite(ph_2, HIGH);

delay(keypad_delay);}

else {

digitalWrite(ph_1, HIGH);

digitalWrite(ph_2, LOW);

delay(keypad_delay);}

}

// Sump *************************************************************

    digitalWrite(sump, HIGH);

 

// ATO count *************************************************************

    lcd.setCursor(3,14);

    if(ato_count < 10) {

    lcd.print("ATO:");

    lcd.print(ato_count, DEC);

    delay(keypad_delay);

    if(digitalRead(ato_input) == LOW && ato_hour != hour){

    delay(500);

    digitalWrite(ato, HIGH);

    if(hour > 7 && hour < 22){

    delay(ato_time_day * 1000); // Day time dosing with kalkwasser

    }

    else {

    delay(ato_time_night * 1000); // Night time dosing with kalkwasser

    }

    digitalWrite(ato, LOW); // Turn off ATO Pump

    ato_hour = hour; // Only allow the ATO to run once per hour / Overflow protection good for dosin kalkwasser

    ato_count = ato_count + 1;

    }

    }

    // System protection *****************************************************

    //No Need to change any settings here other than if you wanna write the powerheads

    //to off (LOW) but wouldn’t recomend 

    if(digitalRead(safety_input) == LOW && digitalRead(ato_input) == LOW) {

    // Main menu

    lcd.clear();

    lcd.setCursor(0,1);

    lcd.print("Water level low !!");

    delay(keypad_delay);

    lcd.setCursor(2,1);

    lcd.print("..Select mode A!..");

    delay(keypad_delay);

    digitalWrite(sump, LOW);

    //digitalWrite(ph_1, LOW);

    //digitalWrite(ph_2, LOW);

 

    for(;;) {

    if(lcd.keypad() == 100){

    lcd.clear();

    break;

    }

    }

    }

 

on_minute = 0; //signals that the program has been run once

} // closes case 100

} // closes mode switch

} // closes loop function



Reefmee is offline   Reply With Quote
Unread 10/26/2012, 09:06 AM   #1732
muda
Registered Member
 
muda's Avatar
 
Join Date: Mar 2005
Location: Lithuania
Posts: 157
Quote:
Originally Posted by MyBoxOfWater View Post
Why do you think that?

Is there something better out there?

Would love to know

I dont know reason , just say what I see.


muda is offline   Reply With Quote
Unread 02/15/2013, 10:16 AM   #1733
Raymond_q
Registered Member
 
Join Date: Jan 2013
Posts: 3
Is there a site where I can download all the libraries needed for the arduino? Ledreefcontroller.com site no longer has it.


Raymond_q is offline   Reply With Quote
Unread 02/15/2013, 10:38 AM   #1734
celamb89
Registered Member
 
celamb89's Avatar
 
Join Date: Jan 2010
Location: Live in Mexico, from AustinTX
Posts: 869
Moonlight function

Here is my arduino based moonlight fuction that calculates the current moonphase based on the date, so it will display the current moonphase of your location!

Code:
void moonPhase(int year, int month, int day)
{
  int ml[29] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,13,12,11,10,9,8,7,6,5,3,2,0}; //PWM values for moonlight channel, where 15 is FULL MOON, you should set your MAX value of the pwm for the moonlights in the positoin number 15 of the string. It starts at 0(MIN) - MAX(15) - 29(MIN)

  int Y = (year-2000);
  int R = Y%19;
  int N = R-19;
  int n = N*11;

  while (n > 29 || n < -29){
    
    if (n > 29 && n > 0){
      n = n-30;
    }
    if (n < -29 && n < 0){
      n = n + 30;
    }
  }
  
  int t = n + day + month;
  int P = abs(t - 8); // current MoonPhase from 0-29, where 15 is full moon
  
  if ( ((P >= 0) && (P <= 3)) || ((P >= 26) && (P <= 29))){		//new moon 
       analogWrite(var, ml[P]);
       lcd.setCursor(11,0);
       lcd.print("NM:");
       lcd.print(P);
  }
  else if ( ((P >= 4) && (P <= 7)) || ((P >= 23) && (P <= 25)) ){	//cresent
       analogWrite(var, ml[P]);
       lcd.setCursor(11,0);
       lcd.print("CM:");
       lcd.print(P);
  }
  else if ( ((P >= 8) && (P <= 11)) || ((P >= 19) && (P <= 22)) ){	//half moon
       analogWrite(var, ml[P]);
       lcd.setCursor(11,0);
       lcd.print("HM:");
       lcd.print(P);
   }
   else if ( ((P >= 12) && (P <= 15)) || ((P >= 16) && (P <= 19)) ){	//gibbous //full moon is full intensity 
       analogWrite(var, ml[P]);
       lcd.setCursor(11,0);
       lcd.print("FM:");
       lcd.print(P);
   }
    else  {                                                            //in case it doesnt find a case, show on LCD to correct code
       analogWrite(var, 0);
       lcd.setCursor(11,0);
       lcd.print("NIGHT");
   }
   
}

And here is how I call the function...

Code:
   if((daybyminute >= ((night * 60) + 15)) || (((ontime*60) - 2) >= daybyminute)) {          
 
          digitalWrite(fans, HIGH);
          digitalWrite(driver1, HIGH);
          digitalWrite(driver2, HIGH);
          analogWrite(blue, 255);
          analogWrite(white, 255);

          lcd.setCursor(2, 1);
          lcd.print("N");
          lcd.print(" ");
          lcd.setCursor(7, 1);
          lcd.print("N");
          lcd.print(" "); 
          onesecond(); // updates clock once per second
          relay1(); 
          temperature(); 
          moonPhase(year, month, dayOfMonth);

  
    }



__________________
CEL
celamb89 is offline   Reply With Quote
Unread 02/16/2013, 12:11 AM   #1735
mikez104
Premium Member
 
mikez104's Avatar
 
Join Date: Feb 2003
Location: Pittsburgh
Posts: 212
Quote:
Originally Posted by Raymond_q View Post
Is there a site where I can download all the libraries needed for the arduino? Ledreefcontroller.com site no longer has it.
The main libraries are included with the Arduino IDE. Other hardware specific libraries are usually posted in the manufacturers web site.

One of the main issues I had with my sketch is that some of the libraries were pre v1.00 and some were post v1.00. I took some time and updated to the latest code.


mikez104 is offline   Reply With Quote
Unread 03/14/2013, 02:32 PM   #1736
reefwalt
Registered Member
 
Join Date: Mar 2013
Posts: 2
http://www.ebay.com/itm/SainSmart-Me...item41718fdd32

Could that kit be used for this application?


reefwalt is offline   Reply With Quote
Unread 03/14/2013, 06:02 PM   #1737
mikez104
Premium Member
 
mikez104's Avatar
 
Join Date: Feb 2003
Location: Pittsburgh
Posts: 212
Quote:
Originally Posted by reefwalt View Post
http://www.ebay.com/itm/SainSmart-Me...item41718fdd32

Could that kit be used for this application?
Looks like you would have a hard time hooking any sensors or anything up to that because the LCD shield looks like it blocks all the connections.


mikez104 is offline   Reply With Quote
Unread 03/20/2013, 11:01 AM   #1738
speedpacer
Registered Member
 
speedpacer's Avatar
 
Join Date: Oct 2011
Location: Huntsville, AL
Posts: 8
Blog Entries: 1
Has anyone tried to put together an Arduino based controller with both LEDs and the American DJ PC-100 hack?

I'm using an UNO/Ethernet shield as a Master and a Mega 2560 as a Slave and getting some unexpected results. The LED side appears to work fine and my analog inputs are working okay, but when I plug a lamp into the PC-100 as a test, there appears to be some stray voltage coming from somewhere and it just maintains a low flicker, regardless of the output PIN being high or low, although it was working fine when I had it hooked up directly from the UNO to the PC-100.

I'm sure I have it wired incorrectly but I haven't found a similar set-up on the information superhighway here to compare it with.


speedpacer is offline   Reply With Quote
Unread 03/20/2013, 09:01 PM   #1739
mikez104
Premium Member
 
mikez104's Avatar
 
Join Date: Feb 2003
Location: Pittsburgh
Posts: 212
Quote:
Originally Posted by speedpacer View Post
Has anyone tried to put together an Arduino based controller with both LEDs and the American DJ PC-100 hack?

I'm using an UNO/Ethernet shield as a Master and a Mega 2560 as a Slave and getting some unexpected results. The LED side appears to work fine and my analog inputs are working okay, but when I plug a lamp into the PC-100 as a test, there appears to be some stray voltage coming from somewhere and it just maintains a low flicker, regardless of the output PIN being high or low, although it was working fine when I had it hooked up directly from the UNO to the PC-100.

I'm sure I have it wired incorrectly but I haven't found a similar set-up on the information superhighway here to compare it with.
I have no clue what the 'American DJ PC-100 hack' is but if it has relays, you would probably want an opto-isolater type of deal. If not, make sure you tie all your grounds together.

I had a Raspberry PI connected to my Arduino Uno via the usb port so I can jus VNC into the PI to update my code but I was having weirdness until I tied the grounds together. I had an issue where the code went wonkey and the LEDs stayed on at 100% and it did not kick the fans on. Luckily I caught it after not too long. The heat sink got up to 150 degrees and just hung at the level. No damage done.

After that mess, I have since rolled back to my code I was using before I added the ethernet shield. I revised the code and have been testing it for way too long on another uno and a test setup and it is functioning flawlessly. I just have to roll the code to the production unit but have been too busy and lazy.

In the new code, I run the Ethernet shield and have it serving a crude web site so I can check the status wherever I am. It just gives me the basics but is functional. I'm looking to have the Uno post the data to a MySql db that sits on the Rasp pi in the future.

I think I have more fun with this stuff rather that the actual tank anymore... I just have some Zoos, mushrooms and 2 fish.

Check them grounds!


mikez104 is offline   Reply With Quote
Unread 03/20/2013, 09:25 PM   #1740
ChrisL1976
Registered Member
 
Join Date: Feb 2012
Location: Kankakee, Illinois
Posts: 272
Quote:
Originally Posted by speedpacer View Post
Has anyone tried to put together an Arduino based controller with both LEDs and the American DJ PC-100 hack?

I'm using an UNO/Ethernet shield as a Master and a Mega 2560 as a Slave and getting some unexpected results. The LED side appears to work fine and my analog inputs are working okay, but when I plug a lamp into the PC-100 as a test, there appears to be some stray voltage coming from somewhere and it just maintains a low flicker, regardless of the output PIN being high or low, although it was working fine when I had it hooked up directly from the UNO to the PC-100.

I'm sure I have it wired incorrectly but I haven't found a similar set-up on the information superhighway here to compare it with.
Running DMX protocol? If so, did you update the Dmx file to include the mega?


ChrisL1976 is offline   Reply With Quote
Unread 03/22/2013, 08:03 AM   #1741
speedpacer
Registered Member
 
speedpacer's Avatar
 
Join Date: Oct 2011
Location: Huntsville, AL
Posts: 8
Blog Entries: 1
Thanks for the feedback.

Here's the "American DJ hack" to which I was referring:
http://www.reefprojects.com/wiki/Build-phases

My understanding is that the opto-isolators are built into the SSRs, and everything was working until I tried to hook it all up together (master/slave). I need to try taking it back apart and making sure it works with the UNO by itself again.

I've checked the grounds pretty thoroughly, but there's always a chance I could've missed something. I'll check them again.

I'm using this for my web server:
http://www.webweavertech.com/ovidiu/...es/000476.html

I've connected both the ethernet shield and the mega to an ubuntu box via usb so I can ssh to it from anywhere and update my sketches with vi and upload them to the boards, which is convenient, but has likely overcomplicated things. It took me a while to get this all pieced together and working-ish though, so hopefully it's something simple.

Chris, I'm not sure about the DMX protocol. I'll have to look into that.

Honestly, it's been about 4 months since I've even looked at this. Most of my set-up is in my basement and it's been a little chilly to work down there lately. I too have been too busy and lazy lately but it's been itching me and I need to scratch it. I still have a small compact t-5 lighting one side of my 100gal and a standard 10gal bulb lighting the other, held up by some leftover 2x4 pieces I had in my garage. But my small colony of zoo's, one mushroom and 5 fish don't seem to mind.




speedpacer is offline   Reply With Quote
Unread 08/19/2015, 03:40 AM   #1742
rapidjohn
Registered Member
 
Join Date: May 2015
Posts: 1
is there a for dummies guide for this thread

Hi All
is there a for dummies guide for this thread it looks well interesting but i am finding it hard trolling through 70 pages
Regards John


rapidjohn is offline   Reply With Quote
Unread 08/20/2015, 08:52 AM   #1743
sgwithee
Registered Member
 
Join Date: Oct 2010
Posts: 5
Yep

Quote:
Originally Posted by rapidjohn View Post
Hi All
is there a for dummies guide for this thread it looks well interesting but i am finding it hard trolling through 70 pages
Regards John
If you go to Page 1 of the post and click on katchupoy's name, you will find a link to his homepage. First, take a look at the tank shots on his home page. Gorgeous! I'm envious!

Put your mouse on "My Reef Tank" and you will see he has a page for his Arudino Controller. Also, take a look at his Linear LED design. For people moving from fluorescents to LED's, it's a great concept.


sgwithee is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On


Similar Threads
Thread Thread Starter Forum Replies Last Post
DIY Led Build of the Month plankton99 Do It Yourself 11 11/20/2011 08:21 AM
DIY leds...now with arduino Controlled lights... António Vitor Do It Yourself 4 05/18/2011 02:13 AM
Yet Another DIY LED Build Thread csarkar001 Do It Yourself 54 05/11/2011 05:55 PM
One quick DIY LED question Impossible Do It Yourself 4 10/27/2010 09:50 AM
Anyone DIY LEDs in their Biocube? bassplaya12 Do It Yourself 13 08/15/2010 01:03 PM


All times are GMT -6. The time now is 04:20 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Powered by Searchlight © 2024 Axivo Inc.
Use of this web site is subject to the terms and conditions described in the user agreement.
Reef CentralTM Reef Central, LLC. Copyright ©1999-2022
User Alert System provided by Advanced User Tagging v3.3.0 (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.