I'd like to run a 38kHz tone on an output pin.
I know I can do it this way, but it isn't optimal:
tone(1, 38000); // Begin the tone
delayMicroseconds(300);
noTone(1); // manually stop it
How can I use microseconds using the tone function?
tone(1, 38000, ???); // Begin a tone which automatically stops after 300us
I know I can do it this way, but it isn't optimal:
tone(1, 38000); // Begin the tone
delayMicroseconds(300);
noTone(1); // manually stop it
How can I use microseconds using the tone function?
tone(1, 38000, ???); // Begin a tone which automatically stops after 300us