You are on page 1of 1

#include<avr/io.

h>
#include<util/delay.h>
void main()
{
int s=1,x,y=0,p,q,r,a,b,c,l,m,n;

//

DDRC=0b0001110;//IR sensor input


DDRB=0b00000000;// input from ADC
DDRD=0b11111111;// output to motors
while(1)
{
p=0;q=0;r=0;
a=0;b=0;c=0;
x=PINC&0b0000001;//IR sensor reads input
while(s==1)
{ x=PINC&0b0000001;
if(x==0b0000001)
{
if(y==0)
{

You might also like