Go Down

Topic: Project Timer with DS1307 - Array of TimeElements; - Is Possible ? (Read 14969 times) previous topic - next topic


Yes could be used for example for turn on a "Coffe Machine" ... it a general purpose ...

for example :

- turn on at 9:45 of 30-01-2013
- turn on off at 10:10 of 30-01-2013

so, now it's working ... i'm testing in all position on the loop, out loop etc etc,

thanks for the support,
john very great!


Setting/changing/cancelling the alarm on/off times will need to be done inside loop() or a function called from it or you will need to reset the Arduino to enable setup() to run again.

What is it that you have got working ?
Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.


I've tried to setup a timer with Alarm.TriggerOnce(); from a menu and it's working ... also changing the timer with new value it's working again ... so now i need to adjust a little bit and clean a program ... then when i will finish the project i can did some Minutes with my experience ... maybe could be useful :-) for the moment I think could be solved :-)

thanks for the support,
very appreciate it,



That's good news.

Good luck with tidying it up - don't break it !
Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.


You Should deservedly be Very Proud of your self. You did a fine job all the way, A very fine Joj.

--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard


Thanks Bob,
I'm try to put "all of me" for "understand", "try", "know", and then at end give the answer because I thinks is a respect for the people that have helped you to fix a issues ... this is the "sense" of the forum I thinks ...

warm regards,



so, it's the true ... for example without you i was not able to understand how it's working what there into the background :-) and then this is important ...:-)


Hi, good morning again,

so now that i've take a little bit confidence with that, I would like to create an array of TimeElements in order to do some operations using the "Top Down Methodologies" ...

Is possible to do that ? if yes how ? So, i've did just for give you an idea this quickly steps could be fine ?
Code: [Select]

#include <Time.h>
#include <TimeAlarms.h>
#include <LiquidCrystal.h> // ensure that the include path is set
#include "M2tk.h"
#include <VirtualWire.h>
#include <Wire.h>
#include <DS1307.h>
#include <EEPROM.h>
#include "utility/m2ghlc.h"

void setup()
     TimeElements tm0start[10];
     tm0start[0].Day = 01;
     tm0start[0].Month = 12;
     tm0start[0].Year = 2013;
     tm0start[0].Hour = 01;
     tm0start[0].Minute = 25;
     tm0start[0].Second = 00;
     tm0start[1].Day = 03;
     tm0start[1].Month = 4;
     tm0start[1].Year = 2013;
     tm0start[1].Hour = 07;
     tm0start[1].Minute = 43;
     tm0start[1].Second = 23;   
void loop() {

so, I didn't have back issues than can i hope :-) or better i need to try but now i didn't have with me the stuff :-(

thanks for the support,


An array of TimeElements that is local to setup() doesn't seem too useful. Other than that, the code looks fine. Does it compile?
The art of getting good answers lies in asking good questions.


Feb 04, 2013, 02:15 pm Last Edit: Feb 05, 2013, 05:20 pm by gnusso Reason: 1
yes the compilation it's fine but you have reason it need to be declare into global scope ... the example was for see the array of time elements can works ...

Go Up