Curkovic projekt TVZ2021

Dependencies:   mbed SeeedShieldBot BluetoothSerial

Committer:
chule
Date:
Thu May 05 19:10:43 2022 +0000
Revision:
0:2e91a001ef93
.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
chule 0:2e91a001ef93 1 #include "Blink.h"
chule 0:2e91a001ef93 2 #include "mbed.h"
chule 0:2e91a001ef93 3
chule 0:2e91a001ef93 4 LED::LED(PinName pin) : _pin(pin)
chule 0:2e91a001ef93 5 {
chule 0:2e91a001ef93 6 _pin = 0;
chule 0:2e91a001ef93 7 }
chule 0:2e91a001ef93 8
chule 0:2e91a001ef93 9 //Metoda kako se određuje stanje LED
chule 0:2e91a001ef93 10 void LED::status(int status)
chule 0:2e91a001ef93 11 {
chule 0:2e91a001ef93 12 _pin = status;
chule 0:2e91a001ef93 13 }
chule 0:2e91a001ef93 14
chule 0:2e91a001ef93 15 //Metoda koja mijenja stanje na LED
chule 0:2e91a001ef93 16 void LED::flip()
chule 0:2e91a001ef93 17 {
chule 0:2e91a001ef93 18 _pin = !_pin;
chule 0:2e91a001ef93 19 }
chule 0:2e91a001ef93 20