Two-Pad Module
€4.29 ex. VAT
This breadboard-compatible 2-button analog module offers simple input functionality with a single analog output pin. Each button generates a distinct resistance value, minimizing wiring complexity and saving GPIO pins. Fully compatible with Arduino and Axiometa platforms, it’s perfect for streamlined projects needing basic button inputs.
SKU: AXM0017
Out of stock
Details
What's inside?
Discussion
Details
Overview
With all pads connected to a single analog output, it detects individual pad presses or combinations via unique resistance values. The mirrored pin design ensures easy connections, making it fully compatible with Arduino and Axiometa platforms for versatile prototyping.
- 2 Total Buttons
- Single Analog Output
- Arduino Compatible
- Genesis Matrix Compatible
Documentation
This part is fully open sourced with schematics and 3D files available bellow
AXM0017
Step by step user guide
All Axiometa products come with user guides and setting up instructions
Connection Guide
Here you’ll find connection guide images to help you integrate the sensor with various development platforms.
×
Arduino Example Code
If you haven’t already, check out this tutorial to guide you through setting up the Arduino IDE for uploading and debugging your sketches, as well as installing libraries.
For this part, you won’t need to use a library.
Code copied!
#define PORT A0
int debounce = 150;
void setup() {
Serial.begin(9600);
}
void loop() {
if (analogRead(PORT) > 1000) {
} else if (readAnalogButton() == 1) {
Serial.println("S1");
delay(debounce);
} else if (readAnalogButton() == 2) {
Serial.println("S2");
delay(debounce);
}
}
int readAnalogButton() {
int buttons = 2;
int resolution = 1023;
float avg = resolution / float(buttons);
int val = analogRead(PORT);
if (val > (buttons – 0.5) * avg) {
return 0;
}
for (int i = 0; i < buttons; i++) {
if (val < round((i + 0.5) * avg)) {
return i + 1;
}
}
return 0;
}
To see it working open serial monitor
MAC: CMD+Shift+M
Windows: CTRL+Shift+M
Related products
What's inside?
1x Two-Pad (AXM0017)
Discussion
Add a review
Two-Pad Module
Rating*
0/5
* Rating is required
Your review
* Review is required
Name
* Name is required
Email
* Email is required
0.0
Based on 0 reviews
5 star | 0% | |
4 star | 0% | |
3 star | 0% | |
2 star | 0% | |
1 star | 0% |
0 of 0 reviews
Sorry, no reviews match your current selections