I want to make start & stop DC motor by use of ultrasonic sensor

Pl. Give me the programme for my project.

What have you tried so far ?