Advertisement
Guest User

Untitled

a guest
Jan 14th, 2014
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.26 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. #define WDT 8
  4. #define LED_BAR 12
  5. #define DELAY 2100
  6.  
  7. void main(void) {
  8.  
  9. int i, leds;
  10.  
  11. leds = 0;
  12. i = DELAY;
  13.  
  14.  
  15.     while (i > 0)
  16.     {
  17.  
  18.     leds = i / (DELAY / LED_BAR);
  19.  
  20.     printf("%d\t%d\n", i, leds);
  21.     i = i - WDT;
  22.     }
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement