![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Exo
main.cpp@0:11d58ceaff35, 2018-05-29 (annotated)
- Committer:
- Quent1nl
- Date:
- Tue May 29 14:13:06 2018 +0000
- Revision:
- 0:11d58ceaff35
EX14
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Quent1nl | 0:11d58ceaff35 | 1 | #include "Nboard.h" |
Quent1nl | 0:11d58ceaff35 | 2 | #include "IHM.h" |
Quent1nl | 0:11d58ceaff35 | 3 | IHM ihm; |
Quent1nl | 0:11d58ceaff35 | 4 | |
Quent1nl | 0:11d58ceaff35 | 5 | int main() |
Quent1nl | 0:11d58ceaff35 | 6 | { |
Quent1nl | 0:11d58ceaff35 | 7 | short n=1, b=1; |
Quent1nl | 0:11d58ceaff35 | 8 | while(1) { |
Quent1nl | 0:11d58ceaff35 | 9 | ihm.BAR_set(n); |
Quent1nl | 0:11d58ceaff35 | 10 | wait(0.1); |
Quent1nl | 0:11d58ceaff35 | 11 | n=n<<1; |
Quent1nl | 0:11d58ceaff35 | 12 | b++; |
Quent1nl | 0:11d58ceaff35 | 13 | if(b>10) { |
Quent1nl | 0:11d58ceaff35 | 14 | wait(0.1); |
Quent1nl | 0:11d58ceaff35 | 15 | n=n>>10; |
Quent1nl | 0:11d58ceaff35 | 16 | b=1; |
Quent1nl | 0:11d58ceaff35 | 17 | } |
Quent1nl | 0:11d58ceaff35 | 18 | } |
Quent1nl | 0:11d58ceaff35 | 19 | |
Quent1nl | 0:11d58ceaff35 | 20 | } |