Alx09

Nanu 2

Feb 22nd, 2021
470
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void setup()
  2. {
  3.   DDRB|=0x01;
  4.   DDRD|=0X80;
  5.   DDRD&=~0X08;
  6. }
  7.  
  8. void loop()
  9. {
  10.   if(PIND&0x08)
  11.   {
  12.   PORTB|=0X01;
  13.   PORTD&=~0X80;
  14.   }
  15.   else
  16.   {PORTB&=~0X01;
  17.   PORTD|=0X80;
  18.   }
  19. }
  20.  
RAW Paste Data