NewPing Library: HC-SR04, SRF05, SRF06, DYP-ME007, Parallax PING))) - v1.7

crispy:
Tim,

Thanks for your very thorough response. The sketch I'm developing does use the interrupt_ping_timer() method, since the sketch needs to "multitask". It sounds like changing the timer that NewPing uses is a non-starter, since I will also need to drive a servo (in addition to 2 motors).

It sounds like the best option for me is to unstack the shield and change which pins are used for PWM.

The ATmega328 has limited timers (3, but Timer0 is used for millis and delay so you really only have 2 available). When doing a project where motors and servos are involved, you're really cutting it close when using an ATmega328. You can still do it, using a serial motor controller or I2C motor controller (which are cheap, small, use fewer pins and allow for control of many motors using multiple controllers). Or, you can use a Teensy/Leonardo (ATmega32u4) or ATmega2560 based microcontroller systems that have additional timers/PWM pins.

Tim