Abgabe PE
Dependents: TINF_mbedSimulator_2Leds
Diff: 2Leds.h
- Revision:
- 0:a68f8dc747e7
- Child:
- 1:980633ae6573
diff -r 000000000000 -r a68f8dc747e7 2Leds.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/2Leds.h Mon Jun 18 17:44:55 2018 +0000 @@ -0,0 +1,33 @@ +#include "mbed.h" + #ifndef TWOLEDS_H + #define TWOLEDS_H + +class TwoLeds +{ +public: + TwoLeds(PinName pin1, PinName pin2) : _pin1(pin1), _pin2(pin2) // Initialisierungsliste +{ + _pin1 = 0; + _pin2 = 0; +} +void ledOn(void) { +} + +void ledOff(void) { +} + +void ledX(){ //LEDs blinken alternierend +} + +void printStatus(void) +{ + printf("LED1 ist jetzt: %d\n", _pin1.read()); + printf("LED2 ist jetzt: %d\n", _pin2.read()); +} + +private: + DigitalOut _pin1; + DigitalOut _pin2; + +}; +#endif \ No newline at end of file