Switch 3 positions


I need to use a 3 positions switch with lever (pos1, pos2, pos3). Do you know what is the hardware that i need and how to wire it to the arduino please ? Is it the same switch that the one we use for 2 positions ?

Thank you.


I presume that you want the Arduino to react to the switch being moved to each of its 3 positions

If so, then wire the switch common contact to GND and each of the position contacts to a separate Arduino pin. Use pinMode(pinNumber, INPUT_PULLUP); for each of the switch pins and detect when one of them is LOW to determine the switch position

1 Like

Ok thank you so much. So a basic switch with 3 pins should work perfectly. And i wire two of them to two different digital pins on the arduino.

I can't picture how a switch with 3 pins can have 3 positions or have you changed your requirements and are intending to use a two way switch now

To clarify things, please post a link to the type of switch that you intend to use

Hi, a 3 position selector-type switch is going to have more than 3 pins.
It depends on the switch, but read ukhelibob's response. If the switch has a common connection then wire that to GND and connect each of the 3 switched connections to the arduino pins.
So, a basic 3 position switch will have 3 arduino connections. And the switch will have at least 4 connections.

If you have a switch with 3 pins, then its likely a SPDT (single pole toggle switch). Not a 3 way switch.

Maybe post a link to the switch you have or are buying?

It could, of course, be a 3 position switch with a centre off position. I have been caught out like that before when someone said they had a SPDT switch

1 Like

This is the type of switch i would have used for 2 positions and 3 positions. Does it work ?

I tought that for 2 positions switch i had to use only 2 pins of the switch and for 3 positions i had to use all the 3 pins available. Isn't it ?

WEKON 10pcs Mini Rocker Switch, AC 125V 6A ON-ON Lever Switch with 3 Pins 2 Position, Toggle Switch SPDT Single Joint Switch for Car Dashboard Light, Blue

An SPDT switch with 2 positions

so i cannot use it for 3 positions... but i cannot find what i need to use for 3 positions. Can u help me please ?

and what does the wiring part look like

Aaaand that's how we end up with parts for our next project.
What do you think of a 3 pin 3 position switch, using 2 Arduino pins?

That is my question. Does a switch like this with 3 pins can have 3 differents positions ?

The one I just linked should do it, but I'm interested in @UKHeliBob opinion first.

Me too. @UKHeliBob what do you think ? What i understood is that for 2 positions we wire one pin to the GND and one pin to a digital pin. For a 3 positions switch, do we wire one pin to the GND and 2 on two differents digital pins ? Then this switch that @er_name_not_found showed should work ?

@bezelsanddisplays can u show me what a 3 positions switch look like please ?

And as you understood i do not want ON/OFF/ON because i need 3 differents positions. Maybe that i why we cannot use your switch @er_name_not_found

Well, I'd power the switch and run each on pin to an arduino pin
if 1 is on then it's position 1
if 2 is on then it's position 2
if neither are on then it's position 3, the one in the middle


Just wait. People are busy sometimes

1 Like