

A Red Pushbutton is a momentary switch that allows current to flow when pressed and stops the flow when released. It is commonly used for user input in electronic circuits. This simple yet versatile component is essential in various applications, including:








| Parameter | Value |
|---|---|
| Type | Momentary Switch |
| Color | Red |
| Contact Type | Normally Open (NO) |
| Voltage Rating | 12V DC |
| Current Rating | 50mA |
| Mounting Type | Through-Hole |
| Dimensions | 12mm x 12mm x 7.3mm |
| Pin Number | Description |
|---|---|
| 1 | Switch Terminal 1 (Normally Open) |
| 2 | Switch Terminal 2 (Common) |
Here is an example of how to connect a Red Pushbutton to an Arduino UNO:
[Arduino UNO] --- [10kΩ Resistor] --- [Pushbutton] --- [GND]
|
[Pin 2]
// Define the pin for the pushbutton
const int buttonPin = 2;
// Define the pin for the LED
const int ledPin = 13;
// Variable to store the button state
int buttonState = 0;
void setup() {
// Initialize the button pin as an input
pinMode(buttonPin, INPUT);
// Initialize the LED pin as an output
pinMode(ledPin, OUTPUT);
}
void loop() {
// Read the state of the pushbutton value
buttonState = digitalRead(buttonPin);
// Check if the pushbutton is pressed
if (buttonState == HIGH) {
// Turn LED on
digitalWrite(ledPin, HIGH);
} else {
// Turn LED off
digitalWrite(ledPin, LOW);
}
}
Button Not Responding:
Multiple Signals (Bouncing):
LED Not Lighting Up:
Q1: Can I use the Red Pushbutton with a higher voltage?
Q2: How do I implement software debouncing?
void loop() {
// Read the state of the pushbutton value
buttonState = digitalRead(buttonPin);
// Check if the pushbutton is pressed
if (buttonState == HIGH) {
// Wait for 50 milliseconds
delay(50);
// Check the button state again
if (digitalRead(buttonPin) == HIGH) {
// Turn LED on
digitalWrite(ledPin, HIGH);
}
} else {
// Turn LED off
digitalWrite(ledPin, LOW);
}
}
Q3: Can I use the pushbutton for AC applications?
This documentation provides a comprehensive guide to understanding, using, and troubleshooting the Red Pushbutton in your electronic projects. Whether you are a beginner or an experienced user, this guide aims to help you make the most of this versatile component.