Motor Driver + Ping Sensor conflict?

Hello.

It looks like it is a timer conflict. The Arduino library for the VNH5019 shield was not designed for the Arduino Mega. As a result, the code uses Timer2 when setting the speed (which is the same timer NewPing uses). You might try switching to this modified version of the VNH5019 shield library that uses the Mega’s Timer1 to set the speed. Please note, you will need to make some hardware modifications to use Timer1 (more information can be found in the thread with the modified library).

- Jeremy