Mr_Stian

Hello everyone. I am working on my own LED light for nye aquarium, and are now finished with the hardware and are working on the code. I have a arduino Leonardo controlling 6 LED channels with PMW signal via 6 LED LDD drivers from Meanwell.

I have checked that all the channels work using analogWrite commands so they all work.

I found a sketch somwhere online (can not find were at the moment) and adapted this to have 6 channels. The original one only had 2. That is the only modifications i have done. I have the DS1307 RTC and a I2C controlled LCD panel (connected, but not in use yet)

The problems i am having is that it always seems to be night mode. That there are some problems with getting the time from the RTC. I used this code to set the time on the RTC:

// paramterized LED lighting control for reef aquariums// use a DS1307 RTC to kick off lighting schedules// fade up on a given slope// delay a set amount// fade back down// such that the photoperiod lasts the correct amount of time

// Circuit// // PWM pins described below connected to dimming circuits on drivers// ledMaster pin below connected to a 120V AC relay to turn the LED drivers on and off (optional)// grounds from drivers connected to arduino ground// DS1307 RTC connected via I2C//////

I don't know that library and I don't here you get it. My advice is, try to download this other library:https://github.com/adafruit/RTClibI use it and I like it. Install it and try to use the examples, and to adapt it for what you are trying to do.