Details
What's inside?
Discussion
Details
Overview
This breadboard compatible toggle switch 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
- Genesis Matrix Compatible
Documentation
This part is fully open sourced with schematics and 3D files available bellow
AXM0022
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; // Button connected to digital pin 2
void setup() {
pinMode(buttonPin, INPUT_PULLUP); // Set button pin as input with internal pull-up resistor
Serial.begin(9600); // Initialize Serial Monitor at 9600 baud
}
void loop() {
int buttonState = digitalRead(buttonPin); // Read the button state
if (buttonState == LOW) { // Button pressed (LOW because of pull-up)
Serial.println("High");
} else { // Button released
Serial.println("Low");
}
delay(80); // Small delay to avoid flooding the Serial Monitor
}
To see it working open serial monitor
MAC: CMD+Shift+M
Windows: CTRL+Shift+M
Related products
What's inside?
1x Toggle Switch (AXM0022)
Discussion
Add a review
Toggle Switch
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