FAWWAZ.ALASMARI RI FAWWAZALASMARI Example 7-25 A door sensor is connected to the port B pin 1, and an LED is connected to port C pin 7. Write an AVR C program to monitor the door sensor and, when it opens, turn on the LED Solution: 욜include <avr/io.h> idefine LED 7 tdefine SENSOR 1 //standard AVR header int main (void) DDRB- DDRB & ~ (1くくSENSOR); DDRC DDRC (1<< LED) while (1) //SENSOR pin is input //LED
PayPal Gateway not configured
PayPal Gateway not configured