Sale!

8 Pieces 3 * 6 * 5 Switch, on, off touch Button, vertical Button, two foot Button

Original price was: 4,58 €.Current price is: 2,12 €. Excluding VAT

8 Pieces 3 * 6 * 5 Switch, on, off touch Button, vertical Button, two foot Button

127 in stock (can be backordered)

Domande su questo prodotto? Scrivi a Lana su WhatsApp

Categories: ,

🎬 The product on video

Description

Micro switch 8 * 3 * 6 * 5, on/off touch switch, vertical switch, two pedal switches

Tutorial: How to Use Vertical ON/OFF Touch Switch

This vertical ON/OFF touch switch is ideal for controlling the flow of electricity in electronic projects such as turning lights, motors, or any other device that requires a simple on/off command. It is suitable for both beginners and more experienced makers.

What you need

  • Arduino Uno
  • Prototype board
  • Jumper wires

Steps

  1. Install the switch on the prototype board using the jumper wires.
  2. Connect the first leg of the switch to pin 2 of Arduino (check the datasheet for precise specifications).
  3. Connect the second leg of the switch to the ground (GND) of Arduino.
  4. Write and upload the Arduino sketch to the Arduino Uno.
  5. Check that the switch functions correctly by pressing the touch to turn on or off an LED connected to another pin of the Arduino.

Example code

const int ledPin = 13;
const int switchPin = 2;

void setup() {
pinMode(ledPin, OUTPUT);
pinMode(switchPin, INPUT_PULLUP);}

void loop() {
if (digitalRead(switchPin) == LOW)
{
digitalWrite(ledPin, HIGH);} 
else
{digitalWrite(ledPin, LOW);}}

Mini project

Create a touch-controlled lighting system. Connect the switch to an LED and use Arduino to turn the LED on or off.

Common mistakes

  • Incorrect connection between the switch legs and ground.
  • Incorrect pinMode settings on Arduino.
  • The touch of the switch is too sensitive or not reactive enough.
  • Insufficient power supply for the Arduino.

Recommended accessories

  • LED
  • 220Ω resistor
  • Prototype board
  • Jumper wires

Frequently asked questions

How can I adjust the sensitivity of the touch?
Check the switch datasheet for any configuration options.

Can it be used with Raspberry Pi?
Yes, but make sure to adapt the sketch in Python or C++ to the Raspberry Pi GPIO protocol.

Reviews

There are no reviews yet.

Be the first to review “8 Pieces 3 * 6 * 5 Switch, on, off touch Button, vertical Button, two foot Button”

Your email address will not be published. Required fields are marked *