The Qwiic D-Pad Button Breakout (Manufacturer Part ID: IFB-40003) by Playing With Fusion is a compact and versatile breakout board designed for directional input. It features a D-Pad button interface that communicates via the I2C protocol, making it easy to integrate into microcontroller-based projects. This component is ideal for applications requiring simple directional control, such as menu navigation, gaming interfaces, or robotic control systems.
The Qwiic D-Pad Button Breakout is designed for simplicity and ease of use. Below are its key technical details:
Parameter | Value |
---|---|
Operating Voltage | 3.3V |
Communication Protocol | I2C |
Default I2C Address | 0x20 |
Button Configuration | 5 buttons (Up, Down, Left, |
Right, Center) | |
Dimensions | 1.0" x 1.0" (25.4mm x 25.4mm) |
Connector Type | Qwiic (4-pin JST) |
The Qwiic D-Pad Button Breakout uses a 4-pin Qwiic connector for I2C communication. Below is the pinout:
Pin Name | Description |
---|---|
GND | Ground |
3.3V | Power supply (3.3V) |
SDA | I2C data line |
SCL | I2C clock line |
0x20
. If multiple devices are used, ensure there are no address conflicts.To connect the Qwiic D-Pad Button Breakout to an Arduino UNO:
Below is an example Arduino sketch to read button presses from the Qwiic D-Pad Button Breakout:
#include <Wire.h>
// Define the I2C address of the Qwiic D-Pad Button Breakout
#define DPAD_I2C_ADDRESS 0x20
void setup() {
Wire.begin(); // Initialize I2C communication
Serial.begin(9600); // Start serial communication for debugging
Serial.println("Qwiic D-Pad Button Breakout Test");
}
void loop() {
Wire.requestFrom(DPAD_I2C_ADDRESS, 1); // Request 1 byte from the D-Pad
if (Wire.available()) {
uint8_t buttonState = Wire.read(); // Read the button state
// Decode the button state
if (buttonState & 0x01) Serial.println("Up button pressed");
if (buttonState & 0x02) Serial.println("Down button pressed");
if (buttonState & 0x04) Serial.println("Left button pressed");
if (buttonState & 0x08) Serial.println("Right button pressed");
if (buttonState & 0x10) Serial.println("Center button pressed");
}
delay(100); // Small delay to avoid spamming the serial monitor
}
No Response from the Breakout Board
Incorrect Button Readings
I2C Communication Errors
Q: Can I change the I2C address of the breakout board?
A: No, the Qwiic D-Pad Button Breakout has a fixed I2C address of 0x20
.
Q: Does the breakout board support 5V operation?
A: No, the board is designed for 3.3V operation. Use a level shifter if connecting to a 5V microcontroller.
Q: How do I detect multiple button presses?
A: The button state byte returned via I2C is a bitmask. Multiple bits can be set simultaneously to indicate multiple button presses.
Q: Can I use this breakout board with Raspberry Pi?
A: Yes, the Qwiic D-Pad Button Breakout is compatible with any device that supports I2C communication, including Raspberry Pi.
By following this documentation, you can easily integrate the Qwiic D-Pad Button Breakout into your projects for reliable and intuitive directional input.