Arduino with Ultrasonic sensor integrated but vibration motor not working according to the code
I think you have to uncomment the line that defines the motor as an output device.

//pinMode(motorPin1, OUTPUT);