Table of Contents

ADC Switchs

There are times when you need several switches, all pressed at different times, and you dont want to use several inputs to achieve this. I have made 2 varients, a switch panel (with eight switches) and a 2 way switch (joystick axis for example).

Using the following diagram, each of the buttons will set the adc pin to a voltage via the resistor divider. It will also allow for an error, if the pin goes to 5v or 0v that is a fault condition.

The lower the button number, or lower ADC value will take priority over the higher number switches.

8 buttons

The ADC Values are as follows

of course it is best to measure with debug when playing with the buttons.

2 buttons

The ADC values are as follows

Again measure with debug to ensure accuracy