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.
Blink_Out.cpp@0:e88292a7e64c, 2015-11-25 (annotated)
- Committer:
- adityap
- Date:
- Wed Nov 25 09:47:25 2015 +0000
- Revision:
- 0:e88292a7e64c
Serial LED Blinking.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
adityap | 0:e88292a7e64c | 1 | #include "Blink_Out.h" |
adityap | 0:e88292a7e64c | 2 | #include "mbed.h" |
adityap | 0:e88292a7e64c | 3 | |
adityap | 0:e88292a7e64c | 4 | Blink_Out::Blink_Out(PinName pin) : number(pin) { |
adityap | 0:e88292a7e64c | 5 | number = 0; |
adityap | 0:e88292a7e64c | 6 | } |
adityap | 0:e88292a7e64c | 7 | |
adityap | 0:e88292a7e64c | 8 | void Blink_Out::out(int n) { |
adityap | 0:e88292a7e64c | 9 | for(int i=0; i<n*2; i++) { |
adityap | 0:e88292a7e64c | 10 | number = !number; |
adityap | 0:e88292a7e64c | 11 | wait(0.2); |
adityap | 0:e88292a7e64c | 12 | } |
adityap | 0:e88292a7e64c | 13 | } |