adrobo
/
adrobo_template
This is a template project.
Fork of adrobo_template by
main.cpp@0:00cd5d387b74, 2020-04-20 (annotated)
- Committer:
- yasuohayashibara
- Date:
- Mon Apr 20 04:37:35 2020 +0000
- Revision:
- 0:00cd5d387b74
This is a template project.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
yasuohayashibara | 0:00cd5d387b74 | 1 | #include "mbed.h" |
yasuohayashibara | 0:00cd5d387b74 | 2 | #include "adrobo.h" |
yasuohayashibara | 0:00cd5d387b74 | 3 | |
yasuohayashibara | 0:00cd5d387b74 | 4 | BusOut led(LED1,LED2,LED3,LED4,LED5,LED); |
yasuohayashibara | 0:00cd5d387b74 | 5 | |
yasuohayashibara | 0:00cd5d387b74 | 6 | int main() { |
yasuohayashibara | 0:00cd5d387b74 | 7 | int no = 0; |
yasuohayashibara | 0:00cd5d387b74 | 8 | while(1) { |
yasuohayashibara | 0:00cd5d387b74 | 9 | led = 1 << no; |
yasuohayashibara | 0:00cd5d387b74 | 10 | no = (no >= 5) ? 0 : (no + 1); |
yasuohayashibara | 0:00cd5d387b74 | 11 | wait(0.5); |
yasuohayashibara | 0:00cd5d387b74 | 12 | } |
yasuohayashibara | 0:00cd5d387b74 | 13 | } |