Markus Reiner
Diff: TwoLeds.cpp
- Revision:
- 0:47c97818eef0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TwoLeds.cpp Wed Jun 20 17:15:15 2018 +0000 @@ -0,0 +1,27 @@ +#include "mbed.h" +#include "TwoLeds.h" + + void TwoLeds:: ledOn(void) + { + _pin=1; + _pin2=1; + } + + void TwoLeds:: ledOff(void) + { + _pin=0; + _pin2=0; + } + void TwoLeds:: ledX(void) + { + _pin = _pin2; + _pin2 = !_pin2; + + } + + + void TwoLeds:: printStatus(void) + { + printf("Read LED1 is now %d\n LED2 is now %d\n", _pin.read(), _pin2.read()); + //printf("Read LED is now %d\n", _pin2.read()); + } \ No newline at end of file