Sale!

Green Normally Open Flat Button – XB2 – BA31C / ZB2 – BE101C

Original price was: 5,01 €.Current price is: 2,55 €. Excluding VAT

The Green XB2 – BA31C is a flat button compatible with Arduino. Use it to control your electronic projects and improve the user interface.

19 in stock (can be backordered)

Domande su questo prodotto? Scrivi a Lana su WhatsApp

Description

What it is

The Green XB2 – BA31C is a flat button compatible with Arduino. This green electronic component allows you to activate specific functions in your electronic projects.

Features

  • Flat Button XB2 – BA31C
  • Button compatible with Arduino
  • Cat. Power Supply, Buttons / Switches
  • Sku: ARD001610

What it is for

This button is ideal for creating simple and intuitive user interfaces in your projects. You can use it to activate alarms, send messages, or manage other specific functions.

Tutorial: How to use Normally Open Green XB2 – BA31C

The green button XB2 – BA31C is a simple but essential component for electronic projects. With a flat surface, this button is ideal for activating specific functions in your devices.

What you need

  • Arduino Projects
  • User Interface
  • Manual Controls

Steps

  1. Check the power supply voltage of the XB2 – BA31C button by consulting the datasheet.
  2. Connect a ground (GND) cable to the longest pin of the button.
  3. Connect a resistor between the power supply and the Arduino’s digital input.
  4. Connect the other end of the resistor to the top of the button XB2 – BA31C.
  5. Use an Arduino script to read the state of the button.
  6. Check that the button changes state when pressed.
  7. Modify the sketch to activate a specific function when the button is pressed.
  8. Test the project by completing a simple circuit.

Example code

const int bottone = 2; // collegato a pin digitale 2
int statoBottone;
void setup() {
pinMode(bottone, INPUT);
}
void loop() {
statoBottone = digitalRead(bottone);
if (statoBottone == HIGH) {
Serial.println("Pulsante premuto!");
} else {
Serial.println("Pulsante non premuto.");
}
}

Mini project

Create a home alarm system that activates a siren or sends a message when the button XB2 – BA31C is pressed.

Common mistakes

  • Connect the resistor directly to the digital pin without protection.
  • Do not check the state of the button before writing the Arduino sketch.
  • Use a power supply voltage different from that specified in the datasheet.
  • Ignore the longer leg which serves as ground (GND).

Recommended accessories

  • Variable resistors
  • Arduino Uno R3
  • RGB LED
  • 5V Buzzer

Frequently asked questions

How can I connect multiple buttons?
Use a multiplexer circuit or connect the buttons to different digital pins.

What is the lifespan of the XB2 – BA31C button?
Check the datasheet for the precise information.

Reviews

There are no reviews yet.

Be the first to review “Green Normally Open Flat Button – XB2 – BA31C / ZB2 – BE101C”

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