Wall Follower Robot using ATMega8

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 SensorRobot Motion
ONTurn Right
OFFTurn 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
}

}

Leave a Reply

Your email address will not be published. Required fields are marked *