YATC - Yet Another Terrarium Controller

robtillaart:

I have two Terrariums so i need a Modular Controller to inependently Controll both.

Why not two UNO's in stead of one MEGA? Modular is modular :wink:

and simulate Sun Rising/ Falling

I discussed an algorithm here - http://arduino.cc/forum/index.php/topic,66426.0.html - might be useful

(you can also connect an LDR to the window and "read the local sunset/rise" :slight_smile:

Hi,
i have read the Post and created a function according to this Post. the Location is Sydney (Because of UpsideDown i switched December with June to match the local Time.
Lat:
-33,52,0
Long:
-151,13,0

Sunries @23 June = 7:00 = 60 * 7 + 0 =420
Sunrise @23 dec = 4:42 = 60*4 + 42 = = 282
average = (=420+282)/2 = 351
delta = =420- 282= 138 => divide by 2 makes 69

Sunset @23 Dec 7:06PM = 60 * 19 + 6 = 1146
Sunset @23 June 4:54PM = 60*16 + 54 = 1014
average = (1146+1014)/2 = 1080
delta = 1146 - 1014= 132 => divide by 2 makes 66

void getRiseSet()
{
  float common = 69 * cos( ((month-1)*30.5+dayOfMonth + 8 ) * 0.017214206) ;  // replace division with faster multiplication
  sunrise = 351 + common;
  sunset = 1080 - common;    
}