Hey, I'm new here
I have an Arduino nano and I want to use 4 step slider switch (like this one: https://m.media-amazon.com/images/I/61u-SMRTwFL.AC_UF894,1000_QL80.jpg) to control 4 modes of my project, I would have used digital inputs but I run out
The problem is that I am an amateur and don't even know what to google for
Is this a good way to do the thing I need? https://www.ignorantofthings.com/2018/07/the-perfect-multi-button-input-resistor.html
Hello
Welcome to the worldbest Arduino forum ever.
You might connect the buttons to the Arduino via digital port pins.
Take a view here to gain the knowledge:
Have a nice day and enjoy coding in C++.
Welcome. Your resistor ladder will work with one analog input. You can also use the analog inputs as digital inputs. This link will help explain how to do it. https://www.youtube.com/watch?v=_AAbGLBWk5s
To give more detailed advice we would need to know the configuration of the switch.
In my experience slide switches are unreliable so I'd prefer to choose a rotary switch;
however an even simpler alternative would be to use a potentiometer (even a slide pot) connected to an analog input.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.