The Arcade Button (red) is a large, robust push button switch designed for heavy use in arcade game machines. Its durable design and responsive actuation make it ideal for interactive projects, including DIY arcade cabinets, game controllers, and educational platforms where a reliable and user-friendly interface is essential.
Pin Number | Description | Notes |
---|---|---|
1 | Common (COM) | Connect to ground (-) |
2 | Normally Open (NO) | Connect to signal input |
// Define the pin where the button is connected
const int buttonPin = 2;
// Variable to hold the button state
int buttonState = 0;
void setup() {
// Initialize the button pin as an input
pinMode(buttonPin, INPUT);
// Initialize serial communication at 9600 bits per second
Serial.begin(9600);
}
void loop() {
// Read the state of the button
buttonState = digitalRead(buttonPin);
// Check if the button is pressed
if (buttonState == HIGH) {
// If the button is pressed, print this message
Serial.println("Button Pressed");
// Delay a little bit to avoid bouncing
delay(50);
}
}
Q: Can I use the arcade button with a 12V system? A: Yes, but ensure that the current does not exceed the button's maximum rating.
Q: How do I know if my button is working? A: You can use a multimeter to test continuity between the COM and NO pins when the button is pressed.
Q: Can I use the arcade button with a Raspberry Pi? A: Yes, the arcade button can be used with a Raspberry Pi or any other microcontroller with appropriate input voltage levels and input pin configuration.