Sale!

2 Pieces SPST BLACK ON/OFF Toggle Switch Round 3A 250V 20mm

Original price was: 2,24 €.Current price is: 1,72 €. Excluding VAT

Our black SPST push button is perfect for your Arduino projects. Used to control the flow of current in electronic circuits.

Available on back-order

Domande su questo prodotto? Scrivi a Lana su WhatsApp

🎬 The product on video

Description

Tutorial: How to Use ON/OFF Button

This ON/OFF button is ideal for controlling the power of electronic devices. Useful for beginners and intermediates.

What you need

  • 2 pieces SPST ON/OFF Button
  • Power Cable
  • Arduino or electronic device
  • Multimeter (optional)

Steps

  1. 1. Check that the button has 2 pins.
  2. 2. Connect one pin of the button to GND.
  3. 3. Connect the second pin of the button to a digital pin of your Arduino.
  4. 4. Configure the button pin as input in Sketch.
  5. 5. Add code to control the state of the button.
  6. 6. Test the button with an LED to verify functionality.
  7. 7. Add code to control the state of the LED based on the button.
  8. 8. Check the datasheet for maximum current and voltage values.

Example code

```void setup() {  pinMode(2, INPUT);}void loop() {  if (digitalRead(2) == HIGH) {    digitalWrite(13, HIGH);  } else {    digitalWrite(13, LOW);  }}```

Mini project

Create a simple startup and shutdown screen for an LED using a button.

Common mistakes

  • Connect the button to VCC instead of GND.
  • Forget to configure the button pin as input.
  • Use an analog pin instead of a digital pin.
  • Don’t test the button before connecting it to the LED.

Recommended accessories

  • LED
  • Resistor
  • Multimeter

Frequently asked questions

Can I use this button with a drone?
Yes, but make sure the maximum current is sufficient for your device.

How long can the button last?
Check the datasheet for specific values.

Can I use this button with a Raspberry Pi?
Yes, but make sure the current and voltage are compatible.

What to do if the button doesn’t work?
Check the connections and the code. If the problem persists, check the datasheet.

Reviews

There are no reviews yet.

Be the first to review “2 Pieces SPST BLACK ON/OFF Toggle Switch Round 3A 250V 20mm”

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