Skip to main content
Arduino

Return to Answer

replaced http://arduino.stackexchange.com/ with https://arduino.stackexchange.com/
Source Link

There are many issue when interfacing a processor to a physical switch. So many that this one question can and has been broken down into several separate questions here on this web site:

  1. How to de-bounce a switch has been asked many times including here here.

  2. How to use pull up resistors with a switch has been asked many times including here here.

  3. How to scan a switch matrix has been asked many times including here here.

Add to that, you need to decide how to parse your data.

  • Will you always expect 2 digits?
  • If so, What will you do if the user enters 3 digits?
  • Will you support a back-space feature?
  • Hows about a clear-entry feature?
  • What about a enter-key feature?

Fortunately many of these questions are addressed in this tutorial.

There are many issue when interfacing a processor to a physical switch. So many that this one question can and has been broken down into several separate questions here on this web site:

  1. How to de-bounce a switch has been asked many times including here.

  2. How to use pull up resistors with a switch has been asked many times including here.

  3. How to scan a switch matrix has been asked many times including here.

Add to that, you need to decide how to parse your data.

  • Will you always expect 2 digits?
  • If so, What will you do if the user enters 3 digits?
  • Will you support a back-space feature?
  • Hows about a clear-entry feature?
  • What about a enter-key feature?

Fortunately many of these questions are addressed in this tutorial.

There are many issue when interfacing a processor to a physical switch. So many that this one question can and has been broken down into several separate questions here on this web site:

  1. How to de-bounce a switch has been asked many times including here.

  2. How to use pull up resistors with a switch has been asked many times including here.

  3. How to scan a switch matrix has been asked many times including here.

Add to that, you need to decide how to parse your data.

  • Will you always expect 2 digits?
  • If so, What will you do if the user enters 3 digits?
  • Will you support a back-space feature?
  • Hows about a clear-entry feature?
  • What about a enter-key feature?

Fortunately many of these questions are addressed in this tutorial.

Source Link
st2000
  • 7.5k
  • 2
  • 13
  • 19

There are many issue when interfacing a processor to a physical switch. So many that this one question can and has been broken down into several separate questions here on this web site:

  1. How to de-bounce a switch has been asked many times including here.

  2. How to use pull up resistors with a switch has been asked many times including here.

  3. How to scan a switch matrix has been asked many times including here.

Add to that, you need to decide how to parse your data.

  • Will you always expect 2 digits?
  • If so, What will you do if the user enters 3 digits?
  • Will you support a back-space feature?
  • Hows about a clear-entry feature?
  • What about a enter-key feature?

Fortunately many of these questions are addressed in this tutorial.

lang-cpp

AltStyle によって変換されたページ (->オリジナル) /