This speaker will only output one tone, 3300Hz, see data sheet, and will produce this whenever it sees DC.
int thisPitch = map(distance, 0, 200, 2093, 22);
will not change the frequency.
This speaker will only output one tone, 3300Hz, see data sheet, and will produce this whenever it sees DC.
int thisPitch = map(distance, 0, 200, 2093, 22);
will not change the frequency.