Рет қаралды 1,967
This was a fun project I did 6 years ago: An Arduino Controlled Pathfinder Robot.
It is made using an Arduino Uno as it’s controller unit. For propulsion it uses two servos with a couple of old cd’s attached as wheels. An ultrasonic sensor measures the distance ahead (and right and left). The chassis is made using my kids’ Lego.
This is the way it works:
The ultrasonic sensor measures the distance ahead. If the distance is more than a certain threshold, it will drive straight ahead, continually measuring the distance.
When the distance ahead drops below the threshold, i.e. it encounters an obstacle, the sensor will turn to the right and left, measuring both distances. The robot will then turn to the side where the distance is the largest, and then measure the distance ahead once again. If it is still below the threshold it will adjust again, and as many times as is required.
There is no mapping going on, it simply checks the distance, and using a very simple algorithm, it will try to find it’s way.
I guess this would not be ideal for more complex mazes, and the robot has no way of knowing if it has been a certain place before, or if it is heading back the way it came from.
But for simple situations like this, it works like a charm!
#Arduino #Robot #Pathfinder