AED 2.00
1
Description
- The Push Button Module Module is a small electronic component measuring 20 x 13mm, with a red button on top that can be pressed to activate a micro switch inside the module. The module is commonly used in electronic products and offers reliable operation and a long service life.
- The module is designed to be compact and lightweight, making it easy to incorporate into electronic projects. It can be easily dismantled for repair or maintenance.
- The Push Button Module Module has good electrical conductivity, allowing it to work seamlessly with microcontrollers (MCU), ARM, Raspberry Pi (PI), and Arduino-compatible devices.
- When the button is pressed, the "OUT" pin of the module becomes high, indicating that the button has been activated. The module also features a pull-down resistor, which can be connected directly to the device without the need for additional components.
- Overall, the Push Button Module Module is a versatile and reliable component that can be used in a variety of electronic projects.
Features:
- Red button for easy identification and activation
- Micro switch module for reliable operation
- Compact size (20x13mm) for easy integration into electronic projects
- Lightweight design for portability and convenience
- Good electrical conductivity for seamless connection with microcontrollers (MCU), ARM, Raspberry Pi (PI), and Arduino-compatible devices
- "OUT" pin becomes high when the button is pressed, indicating activation
- Pull-down resistor is present and can be connected directly to a device without additional components
- Long service life for extended use and durability
- Easy to dismantle for repair or maintenance
Specification:
- Voltage: 3.5 - 5V
- Output: Digital (Press: HIGH, Release: LOW)
- Color: Red Cap
- Dimension: 13 x 20 x 14mm
- Weight: 3g
Pin Connections:
Pin | Description | Connection |
---|---|---|
VCC | Power Supply for Adaptor | Connect to 5V Power Supply |
OUT | Analog Output for Keypad Button Presses | Connect to Analog Input Pin on Microcontroller |
GND | Ground Connection | Connect to Ground Pin on Microcontroller |
Package Includes:
- 1 x Push Button Module Module 20x13mm Red
Sample Project:
Circuit:
Library:
- No external library is required for this module to work.
Code:
const int digitalPin = 2; // Digital input pin for the keypad
void setup() {
Serial.begin(9600); // Initialize serial communication
pinMode(digitalPin, INPUT); // Set the digital pin as input
}
void loop() {
int buttonState = digitalRead(digitalPin); // Read the digital value from the keypad
// Check if a key is pressed
if (buttonState == HIGH) {
// Print the key pressed
Serial.println("Key pressed");
delay(500); // Add a delay to avoid rapid multiple readings for the same key
}
}