Advertisement
Guest User

Untitled

a guest
Jan 21st, 2019
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. #include <avr/io.h>
  2. #include <util/delay.h>
  3. #include <stdbool.h>
  4.  
  5. #include "pin_control.h"
  6.  
  7. void sleep(int ms);
  8.  
  9. int main (void) {
  10. PIN11_OUT;
  11.  
  12. PIN11_ON;
  13.  
  14. sleep(500);
  15. PIN11_OFF;
  16.  
  17. while (true) {
  18. PIN11_ON;
  19. sleep(200);
  20. // PIN11_OFF;
  21. }
  22.  
  23. }
  24.  
  25. void sleep(int ms) {
  26. for (int i=0; i<ms; i++) {
  27. _delay_ms(1);
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement