0% found this document useful (0 votes)
50 views5 pages

Model-Shuttle Car Braking Using Infrared Sensor: Submitted By: Sumit Basantray 110MN0387

This document describes a program burned onto a development board to control a model car using infrared sensors. The program uses infrared sensors to detect hand gestures representing forward, left, and right motions. It sets the corresponding pins on port B to control the motor and move the car in the detected direction. The total cost of components for the project including the development board, microcontroller, sensors, motor, programmer, wires and chassis is estimated to be Rs 3530.

Uploaded by

Tommyc1024
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views5 pages

Model-Shuttle Car Braking Using Infrared Sensor: Submitted By: Sumit Basantray 110MN0387

This document describes a program burned onto a development board to control a model car using infrared sensors. The program uses infrared sensors to detect hand gestures representing forward, left, and right motions. It sets the corresponding pins on port B to control the motor and move the car in the detected direction. The total cost of components for the project including the development board, microcontroller, sensors, motor, programmer, wires and chassis is estimated to be Rs 3530.

Uploaded by

Tommyc1024
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

MODEL-SHUTTLE

CAR BRAKING USING


INFRARED SENSOR
SUBMITTED BY:
SUMIT BASANTRAY
110MN0387

PROGRAM BURNT ON THE DEVELOPMENT BOARD:


#include <avr/io.h>
#include <util/delay.h>
//#include "irc_lcd.h"

int main(void)
{
//InitLCD(1); //initialize the LCD in BLINKING CURSOR mode
//LCDClear(); //clear any previous LCD contentsuint8_t x,y;
int a,b;
DDRA=0b00000000;
DDRB=0b11111111;
PORTA=0b11111111;
PORTB=0b11111111;

while(1)
{

a=PINA & 0b01111111;


if(a==0b0011100 || a==0b0010100 || a==0b0001100 ||
a==0b0011000 || a==0b0010000 || a==0b0000100 || a==0b001000 )
{
b=0b00001010;//fwd
// LCDWriteStringXY(0,0,"fwd");
}
else if(a==0b0011111 || a==0b00000001 || a==0b0000111 ||
a==0001111 || a==000101)
{
b=0b00001000;//lft
//LCDWriteStringXY(0,0,"left");
}
else if(a==0b1111100 || a==0b1010000 || a==0b1000000 ||
a==0b1110000 || a==0b1100000)
{
b=0b00000010;//rt
//LCDWriteStringXY(0,0,"right");
}
else
{

b=0b00000000;
//LCDWriteStringXY(0,0,"fwd");
}

PORTB=b;

FABRICATION COST:
DEVELOPMENT BOARD-Rs 1700
ATMEGA 16-Rs 600
INFRARED SENSORS- Rs 200
MOTOR-Rs 350
PROGRAMMER-Rs 600
WIRE-Rs 50
CHASSIS-Rs 30
Total-Rs 3530

You might also like