Details
What's inside?
Discussion
Details
Overview
This breadboard compatible LED Push Button is perfect for simple digital inputs in your projects. All pins are mirrored on each side for easier access connect as you wish
- On-Board Debouncing
- Arduino Compatible
- Digital Output
- Integrated LED
- Genesis Matrix Compatible
Documentation
This part is fully open sourced with schematics and 3D files available bellow
AXM0021
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!
const int buttonPin = A0; // Pin connected to the button
const int ledPin = 9; // Pin connected to the LED
void setup() {
pinMode(buttonPin, INPUT_PULLUP); // Set button pin as input with internal pull-up resistor
pinMode(ledPin, OUTPUT); // Set LED pin as output
}
void loop() {
int buttonState = digitalRead(buttonPin); // Read the state of the button
if (buttonState == LOW) { // Button is pressed (LOW because of pull-up resistor)
digitalWrite(ledPin, HIGH); // Turn on the LED
} else {
digitalWrite(ledPin, LOW); // Turn off the LED
}
}
To see it working open serial monitor
MAC: CMD+Shift+M
Windows: CTRL+Shift+M
Related products
What's inside?
Discussion
Add a review
LED Button
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