Slide Switch

There are two inbuilt 3-way slide switches in evive.

Slide switch 1 is connected to Arduino pins 40 and 41, both active high. This means that when the switch is slid up, pin 40 is high. When it slides down, pin 41 is high while both are low when the switch is in the middle.

evive Slide Switch

Slide switch 2 is connected to pins 42 and 43, and behave similarly as above.

Note that pins 40-43 are all pulled low, i.e. they will be at 0V (and not floating) when the switch is not engaged.

Slide switches are used in motor control to control the direction of the motor.

The test code for the slide switch is: