Pages: [1]   Go Down
Author Topic: TimeLord Library  (Read 843 times)
0 Members and 1 Guest are viewing this topic.
Vancouver BC
Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm trying to make a lighting controller that will fade lights in and out to simulate daytime.
I googled and came up with the TimeLord library, which seems popular for people doing this task.

Problem is, I can not figure out how to get the library to work in my program. 
I have tried using the <include> statement, as well as copy & paste the code from the .cpp file into my sketch.

I don't get any warnings when i try to compile, but the compiler spits back errors saying there is multiple declarations of various things from the library's code.

I'm pretty new to all this and tried googling to get answers, but I can't figure it out. 
Can someone tell me what i'm doing wrong? or maybe give me a snippet of code to pull something like a sunrise time?

Thanks in advance for the help.

If it matters, I'm using an ArduinoMega2650 and the 1.0.1 IDE
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have tried using the <include> statement, as well as copy & paste the code from the .cpp file into my sketch.

Read this before posting a programming question

Show what you tried, don't just describe it.

Did you restarted the IDE after installing the library?
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't get any warnings when i try to compile, but the compiler spits back errors saying there is multiple declarations of various things from the library's code.

And copy and paste your error messages.
Logged

Vancouver BC
Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Apologies - I did read the first half of that post and thought the rest was getting too far down the process to apply to me.

Bad newb.   smiley-red

the error I don't think I can copy & paste - its friggin huge.
But as always, as soon as I posted a question I think I figured part of it out.  I was just frustrated after 30 minutes of messing about that I hadn't gotten anywhere.  I moved where i was putting the code outside of the setup/loop functions and it started working better for me.

I did restart the IDE after installing the library.
I'm not 100% sure what the errors where, I started a fresh sketch to attempt to understand how to use the library and now I'm making a bit of progress.

I'll be happy to plug away at it a bit more now and I'll post back when I hit the next wall.  Thanks for the super fast reply!
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I was having a similar problem.  I had to go into the TimeLord.h file and the TimeLord.cpp file and change the #include <Math.h> line at the top to have a lower case "M".  The new line is #include <math.h>.  This fixed my problem with using the library.
Logged

Pages: [1]   Go Up
Jump to: