Connect with me on Linkedin

Showing posts with label Iron Man Infra Red palm Cannon. Show all posts
Showing posts with label Iron Man Infra Red palm Cannon. Show all posts

Friday, 13 May 2016

Iron Man Infra Red palm Cannon


simple Atmega8 kit a buzzer and an infra red sensor and blue LED



C Program

#include<avr/io.h>         //This is the header for AVR Microcontroller.
#include <util/delay.h> //header file to generate time delay.

int main(void)
{
DDRB=0x0F;
 
DDRC=0X00;             //sensor initilization
    
    
while(1)
{
if((PINC&0x01)==0x00)        //checking sensor getting obstacle or not
{
  
     PORTB=0x00;
            //Switch on all 4 LEDs
 
                             //Delay of 1sec=1000msec
}
    else
    {
PORTB=0xFF;
 
     }
}

Featured post

Iron Man Infra Red palm Cannon

simple Atmega8 kit a buzzer and an infra red sensor and blue LED C Program #include<avr/io.h>         //This is...