const int button1 = 2; // Pin for Button 1 (White Noise)
const int button2 = 3; // Pin for Button 2 (Pink Noise)
const int button3 = 4; // Pin for Button 3 (Brown Noise)
void setup() {
Serial.begin(9600); // Initialize serial communication
pinMode(button1, INPUT_PULLUP); // Setup button 1 with pull-up resistor
pinMode(button2, INPUT_PULLUP); // Setup button 2 with pull-up resistor
pinMode(button3, INPUT_PULLUP); // Setup button 3 with pull-up resistor
}
void loop() {
if (digitalRead(button1) == LOW) {
Serial.println("WHITE");
delay(300); // Debounce delay
}
if (digitalRead(button2) == LOW) {
Serial.println("PINK");
delay(300); // Debounce delay
}
if (digitalRead(button3) == LOW) {
Serial.println("BROWN");
delay(300); // Debounce delay
}
}