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.
Signal.cpp
- Committer:
- tinek
- Date:
- 2022-11-27
- Revision:
- 0:79b634f90b8c
File content as of revision 0:79b634f90b8c:
#include "Signal.h" #include "mbed.h" Signal::Signal(PinName pin) : _pin(pin) { _pin = 0; } void Signal::light(int n) { if (n == 0) { _pin = n; } else if (n == 1) { _pin = n; } else if (n == 2) { _pin = (n - 1); wait(0.5); _pin = (n - 2); } }