2 Switches to Confirm Action

Hi everybody,

I am trying to get to grips with coding my MKR1000 and my first task is to design some sort of electronic interlock.
I want to use 2 switches to operate a LED.
The first switch needs to be depressed to 'unlock' the second switch, when the second switch is then depressed (whilst the first switch is still depressed) the LED will illuminate.
When the first switched is then 'let go', the LED remains illuminated until switch 2 is 'let go'.

Is this possible.

Thanks

Yep, possible. And sounds like a pretty good starter project :slight_smile: Sounds like a task for a state machine (and state change detection for the buttons).

PS We can SEE from you post count you're new. No need to tell us in the title. We would have liked a clue about the question ::slight_smile:

masonian62:
Is this possible.

Of course it is possible. Dead easy in fact.

Please go back and modify your original post (only the first post) - using the "More -> Modify" option below the right hand corner of your post - to change the Subject line to something that summarises your problem.

Such as "Two switches to confirm action". :grinning:


Thank you for doing that.

Sorry that I do not have too much time just now, but have you tried any coding and have you got it set up ready to go?

Welcome to the group.

There is a ‘sticky’ post at the top of the forums which explains how to post your questions.