Markus Reiner
Revision 0:b0b154bd08c7, committed 2018-06-21
- Comitter:
- mexx
- Date:
- Thu Jun 21 06:11:29 2018 +0000
- Commit message:
- Lauflicht Reiner
Changed in this revision
lauflicht.cpp | Show annotated file Show diff for this revision Revisions of this file |
lauflicht.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r b0b154bd08c7 lauflicht.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lauflicht.cpp Thu Jun 21 06:11:29 2018 +0000 @@ -0,0 +1,39 @@ +#include "mbed.h" +#include "lauflicht.h" + + void FourLeds:: lauflicht(void) + { + _ledbus = 0; + wait(0.2); + _ledbus = 1; + wait(0.2); + _ledbus = 2; + wait(0.2); + _ledbus = 4; + wait(0.2); + _ledbus = 8; + wait(0.2); + _ledbus = 0; + wait(0.2); + + } + void FourLeds:: lauflichtbalken(void) + { + _ledbus = 0; + wait(0.2); + _ledbus = 1; + wait(0.2); + _ledbus = 3; + wait(0.2); + _ledbus = 7; + wait(0.2); + _ledbus = 15; + wait(0.2); + _ledbus = 0; + wait(0.2); + _ledbus = 15; + wait(0.2); + _ledbus = 0; + wait(0.2); + } +
diff -r 000000000000 -r b0b154bd08c7 lauflicht.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lauflicht.h Thu Jun 21 06:11:29 2018 +0000 @@ -0,0 +1,24 @@ +#include "mbed.h" +#ifndef lauflicht_H +#define lauflicht_H + +class FourLeds +{ + private: + BusOut _ledbus; + + public: + FourLeds(PinName pin, PinName pin1, PinName pin2, PinName pin3): + _ledbus(pin,pin1,pin2,pin3) + { + _ledbus = 0; + } + + void lauflicht(void); + + void lauflichtbalken(void); + +}; + + +#endif