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:

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.

Additional Options

Miscellaneous Options

Automatically parse links in text

Topic Review (Newest First)

02-18-2015 07:09 PM

paronaram

It's 12min forward.
I change it to 720, same result...

Thanks

02-18-2015 05:21 AM

O2surplus

Quote:

Originally Posted by paronaram

Hi, thanks for reply.
Yes, I did.
It was not working at all, and I found that library was old, updated library and it works now.
but I get 12min off

Thanks

Aram-

Check line #57 your copy of the TimeSet code. This is what it looks like-
const int kAdjustment = 25;
The 25 stands for the number of seconds needed to compile & upload the code to your arduino (on average). You can change the 25 to any number you wish to skew the time forward or back. Since your clock is 12 minutes off (forward or back?) try changing the 25 to 720 or -720 to see if that corrects the time.

02-18-2015 03:10 AM

paronaram

Hi, thanks for reply.
Yes, I did.
It was not working at all, and I found that library was old, updated library and it works now.
but I get 12min off

Thanks

02-18-2015 02:55 AM

kman

Quote:

Originally Posted by paronaram

Hello ALL,

I'm new in all this Arduino controlling devices, so please pardon all incorrect lingo and terminology.
I have a quick question: Does anybody know why when I run timeupdate code, it synchronizes time correctly, I get 12 min off?
Device came from O2 and it was PST time, and I'm in EST. So I decided to change the time...
Time on the PC is set correct.

Thanks.

Did you compile it first, and then immediately upload?

02-18-2015 12:34 AM

paronaram

Hello ALL,

I'm new in all this Arduino controlling devices, so please pardon all incorrect lingo and terminology.
I have a quick question: Does anybody know why when I run timeupdate code, it synchronizes time correctly, I get 12 min off?
Device came from O2 and it was PST time, and I'm in EST. So I decided to change the time...
Time on the PC is set correct.

Thanks.

02-17-2015 07:49 PM

O2surplus

Quote:

Originally Posted by MrSpiffy

Looks like I made a rookie mistake. Apparently, using pins 0 and 1 is a bit of a no-no during programming. I could disconnect the Arduino from the LCD, and then it might program and run. But I ended up moving those wires to other pins and now it appears to upload and run just fine!

Now, just need to wait for the temperature probe, get some fans, and test final wiring to the LEDs...

Looks like I made a rookie mistake. Apparently, using pins 0 and 1 is a bit of a no-no during programming. I could disconnect the Arduino from the LCD, and then it might program and run. But I ended up moving those wires to other pins and now it appears to upload and run just fine!

Now, just need to wait for the temperature probe, get some fans, and test final wiring to the LEDs...

02-15-2015 12:43 AM

MrSpiffy

Hate to resurrect an old thread, but I'm working on implementing this same idea and running into a problem.

Admittedly, I haven't received my temperature probe in the mail, and I don't have any fans or LEDs hooked up, yet. However, I'm not getting any output on my LCD. It does light up, and I'm able to perform a simple "hello world", as well as print text on each line of the screen. But the code the O2Surplus posted isn't working for me.

Any ideas? Does it matter if it's not wired up to the LEDs/fans/probe, yet?

Things I've changed in the code are:

LiquidCrystal instead of the LiquidCrystal_I2C library

Updated versions of OneWire, TimerOne, and Time.

Swapped out the DS1307 library for the DS3231 library.

Adafruit Trinket Pro 5V board (can't use pins 2 or 7, for USB only)

I've even tried commenting out anything to do with the temperature probe and fan controls, but that didn't help, either. The code compiles fine in Arduino IDE 1.0.5, so I'm not sure what the problem is. (I can attach libraries, if anyone needs them to compile the code.)

I also noticed some lcd.print and lcd.setCursor lines here and there that are commented out where the timing logic begins. Is there a reason for that? Or should I un-comment those lines?

EDIT: I'm wondering if it might have to do with this being a USB unit..? Perhaps serial commands won't work properly?

Discovered this threat and upload Sink program into the Arduino with a simple CAT4101's boar that I made. I set the NightState period to (5,5) in order to get the MoonLight efect, however I notice that this state did not change during the morning. I set the DayState to the maximum value.

I am using a DS1307, and notice that the sketch is using the DS3231RTC library

Do you guys think this can be the reason of the problem? I will change that today at night but only tomorrow i will have sure.

Thanks a lot!

01-26-2015 01:58 AM

VitoA

Arduino 1.0.6 support

Hi, the original code for this led lighting was really usefull for me.
I've done some changes to be compactible with new arduino ide 1.0.6 instead of v0023/22
Dont know if anyone has done this but in anex are libraries .
Please check and confirm if it works
Only tested with DS3231RTC

Hi all
Have been playing around with the timer 3 library on a mega but need 3 more channels to do the fading
soooo.... I adapted the timer3 library to make timer 4. Its on pins no 6,7 and 8 on the Mega2560
So would love if someone can test it and give feedback?
Works EXACTLY as timer3... only as timer 4!

Gives three more channels that can fade led's!!

01-09-2015 05:04 PM

karmacop

Hey guys. I've just discovered this thread and am going to try this out in one of my Snake vivariums. Im wondering if any of you have considered using the Timelord/AVR-Libc library which automatically determines the sunrise/sunset time based on your lat/long?
I'm going to have a crack at integrating it myself but my coding skills are limited to say the least...

08-03-2014 08:41 AM

cvasantrao

OK. Will Try it out
Thanks

08-02-2014 06:57 PM

farrenator

Why can't you use the digital outputs on your existing arduino board?

Quote:

Originally Posted by cvasantrao

Just joined. I already have a arduino controller for my aquarium with light switching on at sunrise and switching off at sunset and moonlight coming on at sunset and switching off at 11 in the night.Found this interesting and planning to add dimming. Can the board design be shared. I am willing to share my code.

08-02-2014 06:14 PM

cvasantrao

Just joined. I already have a arduino controller for my aquarium with light switching on at sunrise and switching off at sunset and moonlight coming on at sunset and switching off at 11 in the night.Found this interesting and planning to add dimming. Can the board design be shared. I am willing to share my code.

This thread has more than 15 replies.
Click here to review the whole thread.