Using C++ class in Library as a test for my program
Dependents: 999_konstrukcijski_Nkovacic
Library uz konstrukcijski rad. Služi ome da prebacuje stanje pina u suproton sa NE operatorom (!) Broj pina nakoji je spojena LEDica zadaje se u glavnom (main) programu.
Diff: led_Za_KRAJ.cpp
- Revision:
- 0:7db1dc5a875c
- Child:
- 1:9e57ec7ab39e
diff -r 000000000000 -r 7db1dc5a875c led_Za_KRAJ.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/led_Za_KRAJ.cpp Tue Nov 10 12:24:22 2020 +0000 @@ -0,0 +1,13 @@ +#include "led_Za_KRAJ.h" +#include "mbed.h" + + +led_Za_KRAJ::led_Za_KRAJ(PinName pin):ledKraj(pin) +{ + ledKraj=pin; +} +void led_Za_KRAJ::ledblink(int n) +{ + ledKraj = !ledKraj; + wait(0.05); +} \ No newline at end of file