71Views5Replies

Author Options:

Can anyone help me in programming in arduino to make my robot autonomous. Answered

My robot uses Arduino, Motor Shield, 2 DC-Motors & 3 Ultrasonic sensors. I just want my robot to sense the object infront of it (about 30cm ahead) and make the logic itself whether to go left or right (if any obstacle is present in the left side then my robot should go in the right side & vice-versa or if the obstacles are present on both sides, then it should move back).

Thanks in advance!

Tags:Robot

Comments

The forums are retiring in 2021 and are now closed for new topics and comments.
0
robobot3112
robobot3112

5 years ago

You must use a normal robots code. Just make a few adjustments.

If the object is 30cm away. Stop 1000 microsecond.

Read left sensor.

Read right sensor.

If value of left sensor is greater than right

motor1 forward motor2 back(subject to change.)

else motor1 backward motor2 forward.

Else keep going forward

Thats the kind of functioning you need it to do.

0
milcarlsandoval
milcarlsandoval

5 years ago

Search "obstacle Avoiding robots" in the instructable search bar..

0
rickharris
rickharris

5 years ago

Start with small projects to build your skill and knowledge then as you learn move onto bigger things.

0
iceng
iceng

5 years ago

If you know the battery size (power) about how far will your motors travel ?

Answer this and you will get some additional help.

This should be easy for you as your page says you are a robot :-)

0
Downunder35m
Downunder35m

5 years ago

Why not start with a project that reflects you skill level?