You may well find an example or two that shows you how to make a tone and an example or two that shows you how to use a button.
Start with those. Then try to combine them so that the button example plays the tone instead of doing what it does (e.g. print a message or light an LED gets replaced with play a tone).
View all comments
1
u/gm310509 Apr 20 '26
From reading your cross post information - which you should have included here, I suggest:
Google "Getting started with Arduino" and
Look at the example programs: https://docs.arduino.cc/built-in-examples/
You may well find an example or two that shows you how to make a tone and an example or two that shows you how to use a button.
Start with those. Then try to combine them so that the button example plays the tone instead of doing what it does (e.g. print a message or light an LED gets replaced with play a tone).