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:a7b9fb1f9bc0, 2013-12-10 (annotated)
- Committer:
- gerardoeh
- Date:
- Tue Dec 10 19:33:17 2013 +0000
- Revision:
- 0:a7b9fb1f9bc0
Basic Library to flash LEDs.; Enjoy and have fun
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| gerardoeh | 0:a7b9fb1f9bc0 | 1 | #include "mbed.h" |
| gerardoeh | 0:a7b9fb1f9bc0 | 2 | #include "Flasher.h" |
| gerardoeh | 0:a7b9fb1f9bc0 | 3 | |
| gerardoeh | 0:a7b9fb1f9bc0 | 4 | Flasher::Flasher(PinName pin): _pin(pin){ |
| gerardoeh | 0:a7b9fb1f9bc0 | 5 | _pin=1; |
| gerardoeh | 0:a7b9fb1f9bc0 | 6 | } |
| gerardoeh | 0:a7b9fb1f9bc0 | 7 | void Flasher::flash(int n){ |
| gerardoeh | 0:a7b9fb1f9bc0 | 8 | for (int i=0; i<n*2; i++){ |
| gerardoeh | 0:a7b9fb1f9bc0 | 9 | _pin=!_pin; |
| gerardoeh | 0:a7b9fb1f9bc0 | 10 | wait(0.2); |
| gerardoeh | 0:a7b9fb1f9bc0 | 11 | } |
| gerardoeh | 0:a7b9fb1f9bc0 | 12 | } |
| gerardoeh | 0:a7b9fb1f9bc0 | 13 | |
| gerardoeh | 0:a7b9fb1f9bc0 | 14 |