Avoiding obstacle

Post Reply
pmw188
Posts: 1
Joined: Thu Dec 03, 2015 3:57 am

Avoiding obstacle

Post by pmw188 »

Hello, I thought about Avoiding obastacle with sonar sensor.
I will use arduino nano v3 and four ultrasonic sensors ( hc-sr 04 etc). / front, back , left , right
I also have multiwii2.2 on my arduino drone.(arduino micro pro)

I made a code like this

if ( front obstacle exists)
digitalwrite(pin 0)
if ( left obstacle exists)
digitalwrite(pin 1)
if ( right obstacle exists)
digitalwrite(pin2)
if ( back obstacle exists)
digitalwrite(pin3)

Do you understand?
Direction of obstacle will be send to drone.
When drone's arduino receive these kind of signals , i want to make drone roll or pitch.
Im really newbie.. How can i do that??
Welcome any suggestion.,. :D

Post Reply