HUNDREDS OF PUSH BUTTONS WITH ONE PIN - Arduino

by Fer Cuesta in Circuits > Arduino

8533 Views, 100 Favorites, 0 Comments

HUNDREDS OF PUSH BUTTONS WITH ONE PIN - Arduino

Munkee_0303144038.jpg
Don't waste more pins in buttons!

INTRO

The idea is simple. Use the analog pin A0 for read different push buttons with different resistance values. Then is about setting an interval for each button to use each one.

I prefer to use pull down resistors which force LOW when the button is off, and prevent from strange analog reading values.

CIRCUIT

circuito instructable varios botones.PNG

You can put as many buttons as you need with different resistors.

Calibrate

programa instructable varios botones.PNG

For this step you have to associate each button for each analog read value of arduino. You could use a multimeter or the following sketch.

As the Arduino IDE doesn't allows you to create .txt files, just copy the interval (ctrl+C) from the serial monitor for then use them in your program.