Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

is there a way to time a combo of buttons?

Status
Not open for further replies.

strokedmaro

New Member
Was wondering how you I would go about timing a combination of buttons to trigger an interupt. 3 buttons in a combination like (1,2,1,2,3) in less than 2 seconds would interupt for example. THANKS!
 
Not interrupt as such. Poll them during a timed interrupt and keep track of the buttons pressed and the time between, then go to the routine you want.
 
What i would do is put the sequence you are looking for in an array. Start at the first entry. On the next input, if correct, advance to the next entry and if it is wrong, got back to the first entry. When you reach the last entry, call the routine that does what you want.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top