Massatron
a.cpp@0:a09345e3207e, 2017-10-22 (annotated)
- Committer:
- massatron
- Date:
- Sun Oct 22 08:06:36 2017 +0000
- Revision:
- 0:a09345e3207e
Test Massatron
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
massatron | 0:a09345e3207e | 1 | #include "a.h" |
massatron | 0:a09345e3207e | 2 | #include "mbed.h" |
massatron | 0:a09345e3207e | 3 | |
massatron | 0:a09345e3207e | 4 | Flasher::Flasher(PinName pin) : _pin(pin) { |
massatron | 0:a09345e3207e | 5 | _pin = 0; |
massatron | 0:a09345e3207e | 6 | } |
massatron | 0:a09345e3207e | 7 | |
massatron | 0:a09345e3207e | 8 | void Flasher::flash(int n) { |
massatron | 0:a09345e3207e | 9 | for(int i=0; i<n*2; i++) { |
massatron | 0:a09345e3207e | 10 | _pin = !_pin; |
massatron | 0:a09345e3207e | 11 | wait(0.2); |
massatron | 0:a09345e3207e | 12 | } |
massatron | 0:a09345e3207e | 13 | } |