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:3ba635798440, 2015-03-13 (annotated)
- Committer:
- tjsken
- Date:
- Fri Mar 13 06:08:26 2015 +0000
- Revision:
- 0:3ba635798440
7segment LED class
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| tjsken | 0:3ba635798440 | 1 | #include "mbed.h" |
| tjsken | 0:3ba635798440 | 2 | #include "seg7_LED.h" |
| tjsken | 0:3ba635798440 | 3 | |
| tjsken | 0:3ba635798440 | 4 | seg7_LED seg7led(p24, p23, p18, p19, p20, p22, p21); |
| tjsken | 0:3ba635798440 | 5 | |
| tjsken | 0:3ba635798440 | 6 | |
| tjsken | 0:3ba635798440 | 7 | int main(){ |
| tjsken | 0:3ba635798440 | 8 | while(1){ |
| tjsken | 0:3ba635798440 | 9 | for(int i = 0; i < 10; i++){ |
| tjsken | 0:3ba635798440 | 10 | seg7led.disp_num(i); |
| tjsken | 0:3ba635798440 | 11 | wait(0.5); |
| tjsken | 0:3ba635798440 | 12 | seg7led.disp_num(i); |
| tjsken | 0:3ba635798440 | 13 | wait(0.5); |
| tjsken | 0:3ba635798440 | 14 | } |
| tjsken | 0:3ba635798440 | 15 | } |
| tjsken | 0:3ba635798440 | 16 | |
| tjsken | 0:3ba635798440 | 17 | return 0; |
| tjsken | 0:3ba635798440 | 18 | } |