Can’t get the code to work for the play_frequency() command. Am working with a 3pi. Here’s the code:
#include <pololu/3pi.h>
int main()
{
clear();
play_frequency(1000,500,10);
}
The problem is that the 1000 Hz frequency won’t stop playing, even after 1000 ms duration has ended.
I checked the cautionary rule: freq x duration / 1000 must be less than 65535. In this case, the duration (in ms) is well below the max value.
Adding a short delay (500 ms) after the play_frequency() command has no effect; though a long delay (1000 ms) does make the command work.
I am not interested in playing a musical note, just want to play a short beep to notify me of an event.
Any thoughts?