Description
What it is
The 1208YD waterproof latching switch is an electronic component that offers a robust and effective control solution for water-resistant projects. This set includes five pieces of switches, ideal for both beginners and experts.
Features
- Set of 5 pieces
- Type: Waterproof Latching Switch
- Product Code: 1208YD
- More than two pins (specify exactly the number)
What it is for
This switch can be used to create home alarm systems or any other project that requires a safe and water-resistant control. It is compatible with Arduino, ESP, and other microcontrollers.
Tutorial: How to use 1208YD Switch
The 1208YD waterproof latching switch is ideal for projects requiring robust and water-resistant control. It’s perfect for beginner and intermediate makers who want to safely integrate input functionalities into their devices.
What you need
- Arduino Uno
- Jumper wire
- Prototype board
Steps
- Connect the switch to the prototype board using jumper wires.
- Connect the switch connector pins to ground and a digital signal pin on the Arduino.
- Write the Arduino sketch to read the value of the switch.
- Upload the sketch to your Arduino.
- Test the switch by pressing it and observe the response on the LED or serial monitor screen.
Example code
const int interruptPin = 2; // Verifica sul datasheet
void setup() {
pinMode(interruptPin, INPUT_PULLUP);
Serial.begin(9600);
}
void loop() {
if (digitalRead(interruptPin) == LOW) {
Serial.println("Interruttore premuto");
}
}
Mini project
Create a home security system in 30 minutes with this switch. Connect it to a door or window and notify your smartphone when it is opened.
Common mistakes
- Do not connect the switch correctly to the Arduino pins.
- Forget to configure the pin in INPUT_PULLUP mode.
- Press too hard on the switch, damaging it.
- Use it without protection in wet or outdoor environments that are not adequately waterproof.
Recommended accessories
- Arduino Uno
- Micro B USB Cable for Arduino
- LED and resistor
Frequently asked questions
How can I connect the switch to an LED?
Connect the switch signal pin to a transistor or MOSFET that controls the LED.
Can it be used externally?
Yes, it is waterproof but make sure the environment is not too wet without additional protection.







Reviews
There are no reviews yet.