0
Dependents: Micro_music_box_2 Mic_music_box
led.h@0:6e09a4c848c9, 2022-02-24 (annotated)
- Committer:
- valentino14
- Date:
- Thu Feb 24 14:49:53 2022 +0000
- Revision:
- 0:6e09a4c848c9
- Child:
- 1:4cd2e5fc0295
01;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
valentino14 | 0:6e09a4c848c9 | 1 | #ifndef LED_H |
valentino14 | 0:6e09a4c848c9 | 2 | #define LED_H |
valentino14 | 0:6e09a4c848c9 | 3 | #include "mbed.h" |
valentino14 | 0:6e09a4c848c9 | 4 | |
valentino14 | 0:6e09a4c848c9 | 5 | //Klasa koja daje funkcije za mjenjanje stanja |
valentino14 | 0:6e09a4c848c9 | 6 | |
valentino14 | 0:6e09a4c848c9 | 7 | class LED |
valentino14 | 0:6e09a4c848c9 | 8 | { |
valentino14 | 0:6e09a4c848c9 | 9 | public: |
valentino14 | 0:6e09a4c848c9 | 10 | LED(PinName pin); |
valentino14 | 0:6e09a4c848c9 | 11 | void state(int state); |
valentino14 | 0:6e09a4c848c9 | 12 | void change(); |
valentino14 | 0:6e09a4c848c9 | 13 | |
valentino14 | 0:6e09a4c848c9 | 14 | private: |
valentino14 | 0:6e09a4c848c9 | 15 | DigitalOut _pin; //tako da može trepati na bilo kojem pinu |
valentino14 | 0:6e09a4c848c9 | 16 | }; |
valentino14 | 0:6e09a4c848c9 | 17 | |
valentino14 | 0:6e09a4c848c9 | 18 | |
valentino14 | 0:6e09a4c848c9 | 19 | #endif |