PURS_ZI_010
Temperatura.h@0:c1c396a29e74, 2017-02-02 (annotated)
- Committer:
- tbjazic
- Date:
- Thu Feb 02 14:11:44 2017 +0000
- Revision:
- 0:c1c396a29e74
Initial.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
tbjazic | 0:c1c396a29e74 | 1 | #ifndef TEMPERATURA_H |
tbjazic | 0:c1c396a29e74 | 2 | #define TEMPERATURA_H |
tbjazic | 0:c1c396a29e74 | 3 | |
tbjazic | 0:c1c396a29e74 | 4 | #include "mbed.h" |
tbjazic | 0:c1c396a29e74 | 5 | #include "C12832.h" |
tbjazic | 0:c1c396a29e74 | 6 | |
tbjazic | 0:c1c396a29e74 | 7 | /** Rješenje ispita PURS_ZI_010 */ |
tbjazic | 0:c1c396a29e74 | 8 | class Temperatura { |
tbjazic | 0:c1c396a29e74 | 9 | public: |
tbjazic | 0:c1c396a29e74 | 10 | /** Konstruktor prima pinove tipkala, senzora i zvučnika. |
tbjazic | 0:c1c396a29e74 | 11 | * @param tipkaloPin Pin tipkala. |
tbjazic | 0:c1c396a29e74 | 12 | * @param senzorPin Pin analognog temperaturnog senzora. |
tbjazic | 0:c1c396a29e74 | 13 | * @param zvucnikPin Pin na koji je spojen zvučnik. |
tbjazic | 0:c1c396a29e74 | 14 | */ |
tbjazic | 0:c1c396a29e74 | 15 | Temperatura(PinName tipkaloPin, PinName senzorPin, PinName zvucnikPin); |
tbjazic | 0:c1c396a29e74 | 16 | private: |
tbjazic | 0:c1c396a29e74 | 17 | C12832 lcd; |
tbjazic | 0:c1c396a29e74 | 18 | InterruptIn tipkalo; |
tbjazic | 0:c1c396a29e74 | 19 | AnalogIn senzor; |
tbjazic | 0:c1c396a29e74 | 20 | PwmOut zvucnik; |
tbjazic | 0:c1c396a29e74 | 21 | Timer debounce; |
tbjazic | 0:c1c396a29e74 | 22 | bool mjerenjePokrenuto, ukljucenZvucnik; |
tbjazic | 0:c1c396a29e74 | 23 | Ticker ticker; |
tbjazic | 0:c1c396a29e74 | 24 | Timeout timeout; |
tbjazic | 0:c1c396a29e74 | 25 | void startStopMjerenja(); |
tbjazic | 0:c1c396a29e74 | 26 | void mjeriIPrikazi(); |
tbjazic | 0:c1c396a29e74 | 27 | void iskljuciZvucnik(); |
tbjazic | 0:c1c396a29e74 | 28 | }; |
tbjazic | 0:c1c396a29e74 | 29 | |
tbjazic | 0:c1c396a29e74 | 30 | #endif |