Chirp

Chirp:

.

playChirp(); playChirp(frequency); //plays piezo chirp at given frequency in Hz playChirp(2000); //plays piezo chirp at 2000 Hz playChirp(0); //turns off piezo chirp This function tells the PIC processor to create a square wave to the piezo chirp at the given frequency in Hz. Calling this function in a fast loop, or calling it in a fast loop with different tone values may result in a clicking or pulsing sound from the piezo. This is normal and does not harm anything. This function may be improved in future versions of the PIC software to eliminate these clicks. (If anyone wants to volunteer to do this, please let us know - it will require some low level setting of the clock and multiplier for the PWM peripheral on the PIC processor). .

offChirp(); offChirp(); //turns off piezo chirp. Same as calling playChirp(0); Easy way to turn off the piezo chirp. .

Chirp Notes:

  • A tone may become "stuck" on during startup or shutdown of the rover. This is normal and does not cause problems. This happens because the PIC will continue playing a given tone until told to stop.

  • The chirp is automatically turned off during the initialization sequence when the Arduino code begins running.

Last updated