plugin23

5

Feb 10th, 2016
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.40 KB | None | 0 0
  1. /* wtf
  2.  *
  3.  * Created: 12.11.2015 12:04:39
  4.  *  Author: d14poruban
  5.  */
  6.  
  7. #include <avr/io.h>
  8. #define F_CPU 10000000UL
  9. #include <util/delay.h>
  10. int main(void)
  11. {DDRC=0x00;
  12. DDRB=0xFF;
  13. while (1)
  14. {int teplota=PINC;
  15. if (teplota<=7)
  16. {PORTB=0b00000010;
  17. _delay_ms(3);
  18. PORTB=0b00000000;
  19. _delay_ms(4);}
  20. else if (teplota>=31)
  21. {PORTB=0b00000100;
  22. _delay_ms(5);
  23. PORTB=0b00000000;
  24. _delay_ms(10);}}
  25. return 0;}
Add Comment
Please, Sign In to add comment