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

I want to make Start and Stop 3 DC motors which is run only forward direction. The DC motors are start & stop by use of ultrasonic sensor. The motors driver is Adafruit Motor Shield.

My connections are:

USSensor.Trigger – AFShield.A4
USSensor.Echo – AFShield.A5
USSensor.Vcc – AFShield.5v
USSensor.Ground – AFShield.Ground

Pl. Give me the programme for my project.

Pl. Give me the programme for my project.

What have you tried so far ?

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

We are not here to write code for you, you must show some attempt at writing the code you require.

First write code to read and operate your ultra-sonic sensor, then your motor driver then put them together.

I recommend you do not try and write ALL the code at once.

Can you please tell us your electronics, programming, Arduino, hardware experience?

Thanks.. Tom.. :slight_smile:

Dhruv22:
I want to make Start and Stop 3 DC motors which is run only forward direction. The DC motors are start & stop by use of ultrasonic sensor. The motors driver is Adafruit Motor Shield.

Probably need to explain what you mean by start and stop with ultrasonic sensor.