Im working on this project, its a model boat, im using the servo library to control the direction the propeller and also the NewPing library for a depth finder. I also have a horn installed, something with the NewPing library and the tone command arn't working together, it says it will not work with multiple definitions. Ive tried using different digital pins, but still the same thing, any suggestions?
Which Arduino board do you use ?
The NewPing uses timer 2 (for an Arduino Uno). I think the Servo library uses timer 1 (for an Arduino Uno). I think the Tone library uses timer 2 (for an Arduino Uno).
The toneAC uses timer 1 https://code.google.com/p/arduino-tone-ac/ Which is in use by the Servo library.
There is a tone function without use of a timer. https://code.google.com/p/arduino-timer-free-tone/ But that stops the code while it is busy.
Suggestions: 1 ) You could use more Arduino boards. For example a dedicated board for the NewPing. Or a dedicated board that runs the Mozzi library for sounds : http://sensorium.github.io/Mozzi/ 2 ) Use a sound/wave/mp3 shield for sounds.