Advertisement
Guest User

Untitled

a guest
Dec 8th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.14 KB | None | 0 0
  1. void setup() {
  2. DDRD |= (1<<DDD2);
  3. }
  4.  
  5. void loop() {
  6. if (PIND & (1<<PIND4))
  7. PORTD &= ~(1<<PD2);
  8. if (!(PIND & (1<<PIND4)))
  9. PORTD |= (1<<PD2);
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement