Add initial project setup with VSCode configurations and main functionality for serial communication
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
void setup()
|
||||
{
|
||||
pinMode(16, INPUT_PULLUP); // D16 for "mute" button
|
||||
pinMode(17, INPUT_PULLUP); // D17 for "deafen" button
|
||||
Serial.begin(115200);
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
// ...existing code...
|
||||
if (digitalRead(16) == LOW)
|
||||
{ // Button on D16 pressed
|
||||
Serial.println("mute");
|
||||
delay(200); // Debounce delay
|
||||
}
|
||||
if (digitalRead(17) == LOW)
|
||||
{ // Button on D17 pressed
|
||||
Serial.println("deafen");
|
||||
delay(200); // Debounce delay
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user