Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp@0:c57745f04ba3, 2016-09-30 (annotated)
- Committer:
- nakano_han
- Date:
- Fri Sep 30 02:28:58 2016 +0000
- Revision:
- 0:c57745f04ba3
- Child:
- 1:ca350ec7e01c
LED??2
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| nakano_han | 0:c57745f04ba3 | 1 | #include "mbed.h" |
| nakano_han | 0:c57745f04ba3 | 2 | |
| nakano_han | 0:c57745f04ba3 | 3 | AnalogIn sw1(A5); |
| nakano_han | 0:c57745f04ba3 | 4 | AnalogIn sw2(A4); |
| nakano_han | 0:c57745f04ba3 | 5 | BusOut leds(D7,D6,D5,D4); |
| nakano_han | 0:c57745f04ba3 | 6 | |
| nakano_han | 0:c57745f04ba3 | 7 | int main() |
| nakano_han | 0:c57745f04ba3 | 8 | { |
| nakano_han | 0:c57745f04ba3 | 9 | char x=0; |
| nakano_han | 0:c57745f04ba3 | 10 | while(1){ |
| nakano_han | 0:c57745f04ba3 | 11 | for(x=0;x<=15;x++) |
| nakano_han | 0:c57745f04ba3 | 12 | { |
| nakano_han | 0:c57745f04ba3 | 13 | leds = x; |
| nakano_han | 0:c57745f04ba3 | 14 | wait(0.25); |
| nakano_han | 0:c57745f04ba3 | 15 | } |
| nakano_han | 0:c57745f04ba3 | 16 | } |
| nakano_han | 0:c57745f04ba3 | 17 | } |