Biblioteka za ledice

Revision:
0:723bf76017a4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/led.cpp	Wed Dec 01 07:20:49 2021 +0000
@@ -0,0 +1,19 @@
+#include "led.h"
+#include "mbed.h"
+LED::LED(PinName pin) : _pin(pin)
+{
+    _pin = 0;
+}
+
+//Određivanje stanja
+void LED::stanje(int stanje)
+{
+    _pin = stanje;
+}
+
+//Mjenjanje stanja
+void LED::promijeni()
+{
+    _pin = !_pin;
+}
+   
\ No newline at end of file