|
10/15/2012, 07:54 AM | #1726 |
Registered Member
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 Last edited by muda; 10/15/2012 at 08:11 AM. |
10/22/2012, 09:41 PM | #1727 |
Registered Member
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 |
10/23/2012, 04:21 AM | #1728 |
Registered Member
Join Date: Mar 2005
Location: Lithuania
Posts: 157
|
Seems like this thread is ready to die.
|
10/23/2012, 06:15 AM | #1729 |
Premium Member
Join Date: Feb 2003
Location: Pittsburgh
Posts: 212
|
|
10/23/2012, 07:41 PM | #1730 |
Registered Member
Join Date: Mar 2009
Posts: 114
|
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 |
10/25/2012, 07:14 AM | #1731 | |
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:
|
|
10/26/2012, 09:06 AM | #1732 |
Registered Member
Join Date: Mar 2005
Location: Lithuania
Posts: 157
|
|
02/15/2013, 10:16 AM | #1733 |
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.
|
02/15/2013, 10:38 AM | #1734 |
Registered Member
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 |
02/16/2013, 12:11 AM | #1735 | |
Premium Member
Join Date: Feb 2003
Location: Pittsburgh
Posts: 212
|
Quote:
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. |
|
03/14/2013, 02:32 PM | #1736 |
Registered Member
Join Date: Mar 2013
Posts: 2
|
|
03/14/2013, 06:02 PM | #1737 | |
Premium Member
Join Date: Feb 2003
Location: Pittsburgh
Posts: 212
|
Quote:
|
|
03/20/2013, 11:01 AM | #1738 |
Registered Member
|
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. |
03/20/2013, 09:01 PM | #1739 | |
Premium Member
Join Date: Feb 2003
Location: Pittsburgh
Posts: 212
|
Quote:
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! |
|
03/20/2013, 09:25 PM | #1740 | |
Registered Member
Join Date: Feb 2012
Location: Kankakee, Illinois
Posts: 272
|
Quote:
|
|
03/22/2013, 08:03 AM | #1741 |
Registered Member
|
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. |
08/19/2015, 03:40 AM | #1742 |
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 |
08/20/2015, 08:52 AM | #1743 | |
Registered Member
Join Date: Oct 2010
Posts: 5
|
Yep
Quote:
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. |
|
Thread Tools | |
|
|
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 |