Pages: [1]   Go Down
Author Topic: Using a 'button/switch' to switch an alarm off..HELP PLEASE!!  (Read 215 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Elo, Elo, Elo!

Background...I'm new to the world of Arduino, working on my first project, and typically I've thrown myself in the deep end! Bare with me as coding and terminology is still 'under construction' with me!

Currently I'm getting a simple version of my project up and running as it's desperately needed. At the moment it consists of using the 'Time' and 'TimeAlarm' libraries, with the intention of upgrading to a RTC once I decided on the right model (**suggestions of models and decent libraries would be greatfully accepted!!!**).

So...to the reason of this correspondence!!

I have my alarm up and running (no visual clock involved), its triggering the sequence I wan't...but to end it at the moment I only have a 'delay' that allows it to time out. What I want it to do is have the code hold the final setting until I use a nice simple button to switch it all off! Simple yeah?! I've searched and searched, rattled my brain, and attempted to modify example sketches to fit into my sketch to get it do what I want, to no avail!

I've looked into attachInteruppts() and if() statements, but as of yet, I cant get them to work! Grr!! As I said, coding ain't my thing!

Any suggestions would be greatly received, I know it's going to be a rather 'simple' answer, but as I don't know the terminology as of yet, I don't really know what to search for!

Thanks in advance..
Peace out

BB
Logged

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

Quote
Bare with me as coding and terminology is still 'under construction' with me!
I think I'll keep my clothes on, but go ahead, if you want.

Quote
Currently I'm getting a simple version of my project up and running as it's desperately needed. At the moment it consists of using the 'Time' and 'TimeAlarm' libraries, with the intention of upgrading to a RTC once I decided on the right model (**suggestions of models and decent libraries would be greatfully accepted!!!**).
You really can't go wrong with any of them. The DS1307 is well supported, and there is even code in the Time library to interface with it.

Quote
I have my alarm up and running (no visual clock involved), its triggering the sequence I wan't...but to end it at the moment I only have a 'delay' that allows it to time out. What I want it to do is have the code hold the final setting until I use a nice simple button to switch it all off! Simple yeah?
Yes, but not in conjunction with delay().

Quote
I've searched and searched, rattled my brain, and attempted to modify example sketches to fit into my sketch to get it do what I want, to no avail!
An example of what didn't work, and how it didn't work would be useful.

Quote
I've looked into attachInteruppts()
Overkill.

Quote
and if() statements, but as of yet, I cant get them to work! Grr!! As I said, coding ain't my thing!
Nor is posting code, apparently.

Quote
Any suggestions would be greatly received
Well, then, I suggest that you post some code.

Quote
I don't really know what to search for!
I'm thinking that reviewing the blink without delay example is in your not-to-distant future.
Logged

Pages: [1]   Go Up
Jump to: