Wall Follower Robot using ATMega8
Wall Following Robot using single IR Transmitter and photodiode Receiver module of proximity sensor or obstacle sensor.
Use left sensor to detect the wall on the left side of the robot.
Wall Follower Robot

OPERATION OF THE ROBOT.
Step-1.
Switch on the programmed Robot. Initially robot right motor runs that time Robot Turns left side.
Step-2.
When Turning left side wall reaches, sensor detects wall and gives to logic High level. Now robot left motor ON and moves Right.
WALL FOLLOWER ROBOT OPERATION LOGIC LEVEL.

Left Sensor Robot Motion
ON Turn Right
OFF Turn Left

PROGRAM FOR WALL FOLLOWER.
#include<avr/io.h> // For ATMega8
int main(void)
{

DDRC=0x00; // set PORTC as input port
DDRB=0x0F; // PB0, PB1, PB2, PB3 as output port for motor
int Right_sensor=0;

while(1)          // infinite loop
{
Right_sensor=(PINC&0x01); //sensor status connected at PC0
if(Right_sensor==0x00)         //right sensor OFF

{
PORTB=0x08; //right turn
}

else
PORTB=0x01; //left turn
}

}

About the Author

Subramanian

Hello! My Dear Friends. I am Subramanian. I am writing posts on androiderode about Electronics testing and equipments.

View All Articles