

The BUTTONPAD-2X2 (Manufacturer Part ID: COM-07835) is a compact 2x2 matrix button pad manufactured by SparkFun Electronics. It features four tactile buttons arranged in a 2x2 grid, making it ideal for applications requiring simple and intuitive user input. The button pad is designed for easy integration into projects, offering a straightforward interface for controlling devices or triggering actions.








The BUTTONPAD-2X2 is designed for ease of use and compatibility with a wide range of microcontrollers and systems. Below are its key technical details:
| Parameter | Value |
|---|---|
| Manufacturer | SparkFun Electronics |
| Part Number | COM-07835 |
| Button Configuration | 2x2 matrix (4 buttons total) |
| Operating Voltage | 3.3V to 5V |
| Button Type | Tactile momentary switches |
| Dimensions | 1.7" x 1.7" (43mm x 43mm) |
| Mounting Style | PCB mount |
| Connector Type | Solder pads or pin headers |
The BUTTONPAD-2X2 uses a 2x2 matrix configuration, requiring four connections to interface with the buttons. The pins are typically labeled as follows:
| Pin Name | Description |
|---|---|
| ROW1 | Row 1 of the button matrix |
| ROW2 | Row 2 of the button matrix |
| COL1 | Column 1 of the button matrix |
| COL2 | Column 2 of the button matrix |
Each button in the matrix is connected to a unique combination of one row and one column. For example:
Below is an example of how to connect the BUTTONPAD-2X2 to an Arduino UNO:
The following Arduino sketch demonstrates how to read button presses from the BUTTONPAD-2X2:
// Define pin connections for the button pad
const int rowPins[2] = {2, 3}; // ROW1 and ROW2
const int colPins[2] = {4, 5}; // COL1 and COL2
void setup() {
// Initialize row pins as outputs
for (int i = 0; i < 2; i++) {
pinMode(rowPins[i], OUTPUT);
digitalWrite(rowPins[i], HIGH); // Set rows HIGH by default
}
// Initialize column pins as inputs with pull-up resistors
for (int i = 0; i < 2; i++) {
pinMode(colPins[i], INPUT_PULLUP);
}
Serial.begin(9600); // Start serial communication
}
void loop() {
// Scan each row
for (int row = 0; row < 2; row++) {
digitalWrite(rowPins[row], LOW); // Activate the current row
// Check each column for a button press
for (int col = 0; col < 2; col++) {
if (digitalRead(colPins[col]) == LOW) {
// Button press detected
Serial.print("Button Pressed: Row ");
Serial.print(row + 1);
Serial.print(", Column ");
Serial.println(col + 1);
}
}
digitalWrite(rowPins[row], HIGH); // Deactivate the current row
}
delay(100); // Small delay to debounce buttons
}
Buttons Not Responding
Multiple Buttons Detected at Once
Unstable Readings
Q: Can I use the BUTTONPAD-2X2 with a Raspberry Pi?
A: Yes, the BUTTONPAD-2X2 can be used with a Raspberry Pi. Connect the ROW and COL pins to GPIO pins on the Raspberry Pi and use a Python library like RPi.GPIO to scan the matrix.
Q: How many BUTTONPAD-2X2 modules can I use in a single project?
A: The number of modules depends on the available GPIO pins on your microcontroller. Each module requires four GPIO pins.
Q: Is the BUTTONPAD-2X2 waterproof?
A: No, the BUTTONPAD-2X2 is not waterproof. Avoid exposing it to moisture or liquids.
This concludes the documentation for the BUTTONPAD-2X2. For further assistance, refer to SparkFun's official resources or community forums.