Just a suggestion but if you ever make these boards again, you should put the resistors in parallel instead of series. That way, you can detect if one OR MORE buttons are pushed. For example, put a 5K resistor above and below your sample point. A simple voltage divider and the sample voltage is half the applied voltage. Now, add another 5K downstream resistor in series with a push button. When the push button is pressed, the downstream resistance is 2.5K so the sample point is now 1/3 the input voltage. When not pressed, it stays at half. Now add a 10K resistor. When it is pushed by itself, you get 3.3K downstream. When the first is pushed by itself, it's still 2.5K. When all three are pushed, you get 2K. By picking the right values, you can have up to about 10 push buttons and have a unique value for any combination of them being pressed. A discussion of how to pick the "right" values is on sparkfun.com in their forums. The cost for doing this is one more resistor, which isn't much.
LCD Shield Suggestions
1 reply to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users