HexLeds
Diff: HexLeds.cpp
- Revision:
- 0:be215ed59257
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/HexLeds.cpp Fri Jun 22 08:53:25 2018 +0000 @@ -0,0 +1,28 @@ +#include "mbed.h" +#include "HexLeds.h" + +void HexLeds::input(void) +{ + int temp = 0; + scanf ("%d", &temp); + if(temp < 16) + _Hexwert = temp; + else + _Hexwert = 0; +} + +void HexLeds::output(void) +{ + printf("Wert = %d\n", _Hexwert); +} + +void HexLeds::hexOut(void) +{ + _Leds = _Hexwert; +} + +void HexLeds::printStatus(void) +{ + printf("LED Status:\n LED1: %d\n LED2: %d\n LED3: %d\n LED4: %d\n", + _pin1.read(), _pin2.read(), _pin3.read(), _pin4.read()); +} \ No newline at end of file