Promjena stanja ledice
Diff: On_Off.cpp
- Revision:
- 0:5cd439f68160
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/On_Off.cpp Sat Feb 20 16:19:16 2021 +0000 @@ -0,0 +1,19 @@ +#include "On_Off.h" +#include "mbed.h" +LED::LED(PinName pin) : _pin(pin) +{ + _pin = 0; +} + +//Metoda određuje stanje LED +void LED::status(int status) +{ + _pin = status; +} + + +//Metoda mijenja stanje na LED +void LED::flip() +{ + _pin = !_pin; +} \ No newline at end of file