(SOLVED) how to turn an output on, and keep on till other event (time related)

Hello All,,

Can anyone help ?

I have an alarm clock , that when the alarm time is same as clock time will hold an output high only as long as the time and alarm time match (one minute).then returns to off / low.

Can any one explain the best way to keep the output pin high (latch it on)keep it on(after tripped on by alarm 1 ), till another event ( alarm 2 ) will turn it off and keep it off till the first alarm will turn it back on again..

in a nut shell... alarm 1 will turn lights on and alarm 2 will turn them off..

PS..have tried main time >=alarm time , main time ==alarm time (still only hold for one minute)

Help appreciated.. this is my hobby..not much experience..

Here is the code by Eric Ayars

File attached..

I want to use it to turn pet Snake lights on / off , and i/R light on/off

sketch_apr03a.ino (2 Bytes)

Your best bet is to post your present code for us to review, this is a simple task. If you haven't started coding yet get started and then share what you come up with.

sw is attached

Attach code using code tags please.

peter1929:
sw is attached

Did you purposely upload an empty file?

WORK_CLOCK__MOD_REVISED_JAN_V2_ino.ino (0 KB - downloaded 3 times.)

peter1929:
Hello All,,

Can anyone help ?

I have an alarm clock , that when the alarm time is same as clock time will hold an output high only as long as the time and alarm time match (one minute).then returns to off / low.

Can any one explain the best way to keep the output pin high (latch it on)keep it on(after tripped on by alarm 1 ), till another event ( alarm 2 ) will turn it off and keep it off till the first alarm will turn it back on again..

in a nut shell... alarm 1 will turn lights on and alarm 2 will turn them off..

PS..have tried main time >=alarm time , main time ==alarm time (still only hold for one minute)

Help appreciated.. this is my hobby..not much experience..

Here is the code by Eric Ayars

File attached..

I want to use it to turn pet Snake lights on / off , and i/R light on/off

The code you attached here not opening. SO use # symbol/ code tag to paste your code

Look at Blink Without Delay, in the Examples directory of the IDE. Load it, compile it, upload it, run it. Play with it until you understand the concepts. Write your code.

Piece o' cake.

hope code is attached now

CLOCK__MOD_2_revised_.ino (23.4 KB)

If you can figure out when to set the pin HIGH (when two minute values are equal and the hours match), it seems likely that you should be able to figure out when to set the pin LOW (the hours do not match or the minutes do not match). It isn't rocket surgery.

Hi PaulS

Like

look at my Alarm 0 time , then if not match time turn on light

then look at Alarm 1 time , then if not match time turn off light.

Like

look at my Alarm 0 time , then if not match time turn on light

then look at Alarm 1 time , then if not match time turn off light.

Something like that. I suspect you mean to look at alarm 0 time in both cases. In the first, you probably mean to turn the pin on if there IS a match.

Hi PaulS

Thanks for the help,, always forget to look at the reverse way,,