Simple Lego Mindstorms Autonomous Drone
by my wookie in Living > LEGO & K'NEX
8391 Views, 11 Favorites, 0 Comments
Simple Lego Mindstorms Autonomous Drone
a simple guide to obstacle avoidance for your NXT
Base Specifications
any base will work as long as it has a left-right motor configuration and can accept at least the ultrasonic sensor, so feel free to play around with that. this one uses parts from 2 expensive Lego sets so i wouldn't try too hard to replicate it.
Programing
its actually very simple but here's how it works in simplified form:
() = loop, [] = condition
(
move forward
wait [ultrasonic, closer than 20 in]
stop left
move back right
wait [ultrasonic, farther than 30 in]
)
you might have to play around with the distances there depending on available space and your robots size but other than that your good.
if you want a bit of a challenge, (its not that hard but its still kinda tricky if your a beginner) you may have noticed the touch sensors on my robot, that way if i run into a wall instead of moving the right motor back it moves the left one, if both sensors are touched it moves forward a few inches and turns back right again. good luck!
() = loop, [] = condition
(
move forward
wait [ultrasonic, closer than 20 in]
stop left
move back right
wait [ultrasonic, farther than 30 in]
)
you might have to play around with the distances there depending on available space and your robots size but other than that your good.
if you want a bit of a challenge, (its not that hard but its still kinda tricky if your a beginner) you may have noticed the touch sensors on my robot, that way if i run into a wall instead of moving the right motor back it moves the left one, if both sensors are touched it moves forward a few inches and turns back right again. good luck!
R/C!
if you have Bluetooth and 2.0 software you have probably used the RC tool, but it has its limits i suggest the use of this one:
http://www.monobrick.dk/software/remote/
its free and works great
http://www.monobrick.dk/software/remote/
its free and works great