Arduino Forum

Using Arduino => Programming Questions => Topic started by: heaintdead on Feb 13, 2013, 03:38 am

Title: Latching memory ??
Post by: heaintdead on Feb 13, 2013, 03:38 am
I need an output to turn and stay high after the start button has gone back to false.
A latch from a momentary start
So input button goes high output goes high when input button goes back to false output remains high
Title: Re: Latching memory ??
Post by: liuzengqiang on Feb 13, 2013, 04:19 am
You are supposed to detect transition on the button, say from low to high, and set output to high when you see this transition. To do this, store the button state and compair with new button state.
Title: Re: Latching memory ??
Post by: CheapB on Feb 13, 2013, 05:33 am


So input button goes high output goes high when input button goes back to false output remains high



so when the input goes high you put the output in high and not touch it again. the output would only go low if you set it low, so unless there is more to the story, this seems pretty straight forward.
Title: Re: Latching memory ??
Post by: liuzengqiang on Feb 13, 2013, 05:58 am

so unless there is more to the story,


That's what I suspect. Let's wait and see what the OP will respond.