Arduino click sound for my Adafruit ESP32 assistive touch switch

Subscribers:
113
Published on ● Video Link: https://www.youtube.com/watch?v=ziZcZUBMQC0



Duration: 0:21
131 views
2


I used an optocoupler instead of a relay but I still wanted a mechanical click sound for my assistive touch switch. It's based on an Adafruit Feather Esp32 Huzzah and i use a 8 ohm speaker with an 150 ohm resistor in between.

Thanking El_supremo in Arduino forum for coding inspiration
https://forum.arduino.cc/t/tick-tock-sound-from-a-piezoelectric-speaker/288494
----------------------------------
CODE SNIPPET:
// Play a sound if button is pressed (was previously NOT pressed)
if(pressed == false){
tone(buzzer, 5000, 5);
tone(buzzer, 500, 5);

}
digitalWrite(outputA,HIGH);
pressed = true;

}else{
// Play a sound when button was released
if(pressed == true){
tone(buzzer, 500, 5);
tone(buzzer, 5000, 5);
}
digitalWrite(outputA, LOW);
pressed = false;
delay(50)




Other Videos By Adaptive Hacker Khan


2022-01-28OptiKey is an awesome free eye tracking keyboard!
2022-01-22Installed a lift column on Shoprider Whisper Mobility scooter!
2022-01-01Shadow Tactics: Blades of the Shogun - Gameplay with Tobii
2021-12-13Book of Travels - Gameplay with Tobii Windows Control 2 (part 2)
2021-12-08Book of Travels - Gameplay with Tobii Windows Control 2
2021-12-07Book of Travels - Gameplay with Tobii Eye Tracking
2021-12-01Forza Horizon 5 driving Porsche GT2 with Eye tracking!
2021-11-27Who said Tobii wouldn't work well on a 7 inch gaming pc? #AyaNeo #Tobii
2021-11-20Forza Horizon 5 WINNING WITH MY EYES + 2 switches
2021-10-30playing Disco Elysium with Tobii Windows Control
2021-10-23Arduino click sound for my Adafruit ESP32 assistive touch switch
2021-10-16Look around with only your gaze In FH4 - HANDS FREE!!! (Tobii + Project Iris FPS view)
2021-10-13Gaming with PC Remote iOS app + Switch control + Recipes
2021-10-09Forza Horizon 4 DRIVING WITH MY EYES!! - Tobii Project Iris + only 2 switches!
2021-10-07Ni no kuni: Wrath of the white witch - gameplay with Tobii + Project Iris (part 2)
2021-10-05Wrath of the white witch - gameplay with Tobii + Project Iris
2021-09-08Access two keys simultaneously with Project Iris + On screen keyboard
2021-09-06Creating an Tobii gaming keyboard with Project Iris for playing Spiritfarer
2021-09-05Spiritfarer with on screen keyboard and Tobii eye tracker
2021-09-02Townscaper with Tobii Windows Control eye tracking
2021-08-30Using Dragger app to look around in Iron Danger



Tags:
Arduino
Arduino projects
Arduino IDE
piezo
speaker
8 ohm speaker
Adafruit
Adafruit Feather Esp32 Huzzah
Esp32
Espressif
touch pin
touch
touch module
capacitive
capacitive touch
screw terminal
screw terminal shield
custom switch
assistive switch
ability switch
switch
button
Permobil
assistive technology
adaptive
power wheelchair
custom controls
optocoupler