Loading...
Pages: 1 2 3 [4]   Go Down
Author Topic: Project Timer with DS1307 - Array of TimeElements; - Is Possible ?  (Read 1240 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Sr. Member
****
Karma: 2
Posts: 354
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

East Anglia (UK)
Offline Offline
Edison Member
*
Karma: 47
Posts: 1383
May all of your blinks be without delay
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 ?
Logged

Offline Offline
Sr. Member
****
Karma: 2
Posts: 354
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
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,

regards,
gnux
Logged

East Anglia (UK)
Offline Offline
Edison Member
*
Karma: 47
Posts: 1383
May all of your blinks be without delay
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That's good news.

Good luck with tidying it up - don't break it !
Logged

Anaheim CA.
Offline Offline
Edison Member
*
Karma: 31
Posts: 2304
Experienced old Whitebeard with a Full head of Hair...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Bob
Logged

“The solution of every problem is another problem.” -Johann Wolfgang von Goethe

Offline Offline
Sr. Member
****
Karma: 2
Posts: 354
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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,
gnux
Logged

Temple, Texas
Offline Offline
Sr. Member
****
Karma: 14
Posts: 354
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey gnusso, that's terrific!  Congratulations!

John
Logged

Offline Offline
Sr. Member
****
Karma: 2
Posts: 354
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 ...:-)
Logged

Offline Offline
Sr. Member
****
Karma: 2
Posts: 354
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
#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,
gnux
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 311
Posts: 35470
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

An array of TimeElements that is local to setup() doesn't seem too useful. Other than that, the code looks fine. Does it compile?
Logged

Offline Offline
Sr. Member
****
Karma: 2
Posts: 354
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 ...
« Last Edit: February 05, 2013, 11:20:32 am by gnusso » Logged

Pages: 1 2 3 [4]   Go Up
Print
 
Jump to: