Hey guys, I'm working on a project but I'm having difficulty with turning the sound off by using the slide switch. I'm a complete beginner.
I know I need to start it off as: pinMode(A0, INPUT_PULLUP);
And I need to use an if/else.
noTone(pin) will turn a tone off, so in your case.. noTone(A0);
Not sure what you mean with "slideswitch", and why you use pinMode(A0, INPUT_PULLUP); or the analogue input pins for tone()
Post your code if you want help with that.
Read the forum rules first.
Leo..