Skip to product information
1 of 4

Axiometa

Button D-Pad

Button D-Pad

SKU:AX22-0016

Low stock: 5 left

Bring classic game-console navigation to any project with this AX22-sized board. Five low-profile ALPS Alpine SKRPADE010 tactile switches are arranged in a “plus” pattern Up, Down, Left, Right, and Center, and tied to a  resistor ladder so all five directions share a single ADC pin. Pressing a direction pulls the ladder to a unique voltage, letting your code identify which button is down with one quick analog read. Snap it into any AX22 backplane to add intuitive D-Pad control to menus, games, robots, or data-entry gizmos without burning five GPIOs.
Regular price $3.49
Regular price Sale price $3.49
Sale Sold out
Taxes included. Shipping calculated at checkout.
View full details
  • - 22 mm × 22 mm square
    - 4× ⌀2.7 mm Mounting Holes
    - Distinct voltage for each direction & center press
    - 1.8 V, 3.3 V, 5.0 V
    - Arduino IDE Compatible
    - MicroPython Compatible
    - MicroBlocks Compatible

    Material Datasheet 

Technical Resources

Button D-Pad - (AX22-0016)

PCB FRONT

PCB BACK

🟢 Live 3D Model

🖱️ Click & drag to rotate
#define DPAD_PIN 1
int debounce = 150;

void setup() {
  Serial.begin(9600);
}

void loop() {
  int button = readAnalogButton();

  if (button == 0) {
    // No button pressed
  } else if (button == 1) {
    Serial.println("CENTRE");
    delay(debounce);
  } else if (button == 2) {
    Serial.println("RIGHT");
    delay(debounce);
  } else if (button == 3) {
    Serial.println("UP");
    delay(debounce);
  } else if (button == 4) {
    Serial.println("DOWN");
    delay(debounce);
  } else if (button == 5) {
    Serial.println("LEFT");
    delay(debounce);
  }
}

int readAnalogButton() {
  int val = analogRead(DPAD_PIN);

  if (val > 3600) return 0;       // NOTHING (4095)
  else if (val > 2750) return 5;  // LEFT (3170)
  else if (val > 2000) return 1;  // CENTRE (2333)
  else if (val > 1150) return 3;  // UP (1555)
  else if (val > 350) return 4;   // DOWN (760)
  else return 2;                  // RIGHT (0)
}