Description
This switch is a micro Single Pole Double Throw (SPDT) mechanical end stops. They are commonly used to help a robot sense the world around it. For example, in a CNC machine, the moving parts will back up until they contact the switch and then stop. This is called their “home” position.
Tutorial
- Connect one pole to ground (black), one to 5v (red), and one to signal (blue).
- Connect the signal line to an Arduino digital pin.
- Run this Arduino code:
void setup() { Serial.begin(9600); pinMode(YOURPIN,INPUT); } void loop() { Serial.println(digitalRead(YOURPIN)); delay(100); }
- Now open the serial window and watch the number change as you click the switch.
Reviews
There are no reviews yet.