Sale!

DS-318 / 12mm Button / Green Non-Latching Switch

Original price was: 2,56 €.Current price is: 1,97 €. Excluding VAT

DS-318 / 12mm Button / Green No Self-Locking Switch

Available on back-order

Domande su questo prodotto? Scrivi a Lana su WhatsApp

Category:

🎬 The product on video

Description

What it is

The DS-318 / 12mm Green button is a simple non-locking push button switch in green color.

Features

  • Dimensions: 12mm
  • Color: Green
  • Type: Push Button Switch
  • Function: Non-Locking

What it is for

The DS-318 / 12mm Green button is ideal for creating simple user interfaces on Arduino or other microcontroller projects. It can be used to activate functions, send signals, or record user inputs. Example use: a simple home alarm project that sends a message via serial monitor each time the button is pressed.

Tutorial: How to use Botton DS-318 / 12mm Green

The Botton DS-318 / 12mm Green is a simple green push button switch without locking function. Ideal for beginners and small projects.

What you need

  • Arduino Uno or compatible
  • Jumper Wire
  • Breadboard

Steps

  1. Connect the button to the breadboard
  2. Connect the positive terminal of the button to a 5V power pin on the Arduino
  3. Connect the negative terminal of the button to a digital pin on the Arduino
  4. Connect a resistor pull-down between the digital pin on the Arduino and the negative terminal of the button
  5. Write and upload the Arduino sketch to read the state of the button
  6. Monitor the serial communication to see when the button is pressed

Example code

void setup() {
  pinMode(2, INPUT_PULLUP);
  Serial.begin(9600);
}

void loop() {
  int buttonState = digitalRead(2);
  Serial.println(buttonState);
}

Mini project

Create a simple home security project that sends a message via the serial monitor every time the button is pressed.

Common mistakes

  • Do not connect the pull-down resistor
  • Press the button without connecting it properly
  • Do not check the serial communication

Recommended accessories

  • 10kΩ pull-down resistor
  • Arduino Uno
  • Breadboard
  • Jumper wires

Frequently asked questions

How do you connect the button?
Connect the button terminals to the breadboard and then to the pin on the Arduino as described in the steps.

What is the function of a pull-down resistor?
The pull-down resistor keeps the pin in a stable state when the button is not pressed.

Reviews

There are no reviews yet.

Be the first to review “DS-318 / 12mm Button / Green Non-Latching Switch”

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