Guide: Arduino based LED controller for Current Satellite LED+

I'm working from the start of the thread to build this controller and am running into an error with "millis" not being declared in the scope in the Time library when I attempt to verify the code in 1.0.5. Arduino-related forums say to make sure I'm running the latest version of that library, which I am, or that I can replace Wprogram.h with Arduino.h in the TimeAlarms.cpp file. Neither of these suggestions solved the problem like it did for the forum posters so I suspect I'm doing something wrong, procedurally.

However, my question is this: if I'm going to use an RTC instead of the software clock, do I need to worry about this error?

Try changing the order of the #include commands at the beginning of the sketch. Sometimes that can fix issues with the "not declared" error. You shouldn't have to include Arduino.h since its always included, but it doesn't hurt.

Also, make sure that you've placed the libraries into the user library directory and not into the built-in library directory.

Upon further review, I'm certain there must be a dumb little detail that is incorrect based on how I'm managing the software, libraries, etc. I switched the order of the libraries being used under Setup in the code several times. Same errors.

I did not realize that the libraries should be placed in the My Documents folder instead of the Libraries folder inside C:/Program Files(x86)/Arduino/Libraries - one of those small details that is good for me to learn. I moved (cut/paste) these 4 libraries (Time, DateTime, TimeAlarm, DateTimeSettings), along with the DS1307RTC library, into the My Documents folder. I ran the sketch, which is saved in the Arduino folder within My Documents, and observed the same resulting errors, attached.

I am using Arduino v1.0.5. The libraries are the newest versions available (to my knowledge) which I got here: http://playground.arduino.cc//Code/Time
The code I'm using is copied from Indychus' post #25 of this thread.
I changed the int IRLedPin from 13 to 3.
I changed the time/date values.
I changed #define dtNBR_ALARMS from 6 to 24.
I have NOT explored the Device ID's in the code yet to see how they compare to my values. I know they are different, but I was going to take that step after clearing up this verification error prior to uploading.

This is what I thought too, but "Wprogram.h" was not found in any library, except "Time.cpp", in the Time library, in which I replaced it with "Arduino.h". It did not clear the error. As I originally mentioned, most of the forums I read pointed to that issue and replacing that in the header file seemed to solve the problem, which is why I can't figure out what I'm doing differently.

I started over and manually installed the libraries listed here: http://playground.arduino.cc/Code/Time
I noticed that there is no library listed for DateTime or DateTimeString in the .zip file. However, I was able to compile the code w/o problems. I opened the Serial Monitor and watched it keep track of the time.

When I closed out of the IDE, added the DateTime and DateTimeString libraries in, opened the IDE and compiled the code, I got the errors again.

I started over and manually installed the libraries listed here: http://playground.arduino.cc/Code/Time
I noticed that there is no library listed for DateTime or DateTimeString in the .zip file. However, I was able to compile the code w/o problems. I opened the Serial Monitor and watched it keep track of the time.

When I closed out of the IDE, added the DateTime and DateTimeString libraries in, opened the IDE and compiled the code, I got the errors again.

DateTime & DateTimeString are not used in the code. So just omit them. Best I recall, they were just remnants of some other code.

At any rate the version you have chosen does not support an RTC. That came along later in the development. You'll probably want to switch to one of the later versions to get support for the RTC. Also, at some point (post #148) we switched to using the IRremote library to send the commands and that drastically increased the IR range. There were lots of bugs along the way as well, so I'd probably either use the last one Indy posted or the last one I posted.

Ok, Dahammer, Indy, et. al, thanks for the help so far. Progress is noted. I've been able to trigger the alarms from (7,00,0, Dawn/Dusk) to Full Spec (13,0,0) but I cannot get the lights to step back down at 15,00,0, 19,00,0, or 21,00,0. Any thoughts why that might be?

Dahammer, would you suggest just wiring the controller w/ the RTC (Chronodot 2.1) and LCD (16x2 Blue from Adafruit) and get all the hardware in place in the enclosure straightaway? And then use one of the final pieces of code (v4.X.X) you and Indy posted and troubleshoot from there, instead of adding a piece of hardware along with the corresponding code/libraries for each stop along the way?

Ok, Dahammer, Indy, et. al, thanks for the help so far. Progress is noted. I've been able to trigger the alarms from (7,00,0, Dawn/Dusk) to Full Spec (13,0,0) but I cannot get the lights to step back down at 15,00,0, 19,00,0, or 21,00,0. Any thoughts why that might be?

Dahammer, would you suggest just wiring the controller w/ the RTC (Chronodot 2.1) and LCD (16x2 Blue from Adafruit) and get all the hardware in place in the enclosure straightaway? And then use one of the final pieces of code (v4.X.X) you and Indy posted and troubleshoot from there, instead of adding a piece of hardware along with the corresponding code/libraries for each stop along the way?

I'd add the RTC at least. It doesn't matter about LCD. The later versions of code that support the LCD will work whether or not an LCD is present. Then I'd test each command to make certain that they all work. You can send in commands via the serial terminal with the later versions of the code.

Here is the code I'm currently using. It has been running flawlessly for the last couple of months. It adds support for 2 thermometers, per code developed in this thread. But I do not have any thermometers on mine, therefore I have not tested that portion of this code and they are disabled by default in the code. It is also set up for a 16x2 LCD, since that's what I have on mine. Also notice that I have some of the alarms disabled, so enable them as you see fit.

Good call, Indy. 13,00,1 would be the 6th alarm, I believe. I had changed it to 24 yesterday, but I'm now wondering if I forgot to go back to that file since I wiped the libraries out and started over tonight. I'll check that tomorrow.

Just saw this thread, cool work! I just set up my own Arduino controller for Current Satellite LED+ last week. I'm a software engineer by trade, so it's been pretty quick & easy.

For a long time I noticed how much fish jump when lights kick on/off if they're just on a timer. I was mostly interested in natural, slow transitions from lights off to full on and back over the course of the day, and in controlling photoperiod for plants. The LED+ has been great for that on my moderately planted, no CO2 40g breeder, but I hate having to manually mess with it via the remote control. I'm also a little leery of the fact that that wispy little remote is the only way to control it.

My program uses a couple of sine functions to control the light levels, one for RGB, and one for the white lights. They're fed time from a DS1307 RTC. The user provides lights-on time, lights-off time, and amplitude, which controls both how quickly it ramps, and the percentage of the photoperiod spent at full on. It's also tunable to provide multiple photoperiods in a day, though I don't see much reason to do more than two per day.

Register Now

In order to be able to post messages on the The Planted Tank Forum forums, you must first register.
Please enter your desired user name, your email address and other required details in the form below.

User Name:

Password

Please enter a password for your user account. Note that passwords are case-sensitive.

Password:

Confirm Password:

Email Address

Please enter a valid email address for yourself.

Email Address:

Location

Your Location. As precise as you feel comfortable with.

Security Question

While balancing on a piece of wood, two inches by four inches known as a 2x4, John and his friend Sally both spotted a dalmatian inside of a truck with sirens. The animal with John and Sally is a _ _ _?

Insurance

Please select your insurance company (Optional)

Log-in

User Name

Remember Me?

Password

Human Verification

In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.