One button, one pin—that is the way things are usually done on Arduino boards. But it is so limiting. There are some tricks that let you connect more than one button to a pin. Actually, it is even possible to connect 1,000 buttons to just 1 pin. We will explore this possibility in this recipe.
The following are the ingredients required for this recipe:
We implement a simple configuration using only three buttons on the same pin. Here are the steps: