Hello! It`s my robot with ir detector. I printed a simple platform and made little robot for testig different algorithms.
Today I created a program for detecting and going around the barrier.
Step 1: Structure
I used sensor shield for simple connecting sensors, in this case I connected IR-detector sensor and Bluetooth HC-05. The l298p chip is used for motor control.
Step 2: Algorithm
Programm for control is very simple!
The robot goes forward until the sensor does not see any obstacles.
When the robot arrives, such as a wall, he starts spinning in random direction, until he sees a clear path. And he starts to move forward.