![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
carte esclave pompe 2020 V1
Dependencies: mbed ident_crac
class_ventouse.h
- Committer:
- marwanesaich
- Date:
- 2019-05-07
- Revision:
- 3:cf33f9d4d6ff
- Parent:
- 2:4cc8fa2f64be
File content as of revision 3:cf33f9d4d6ff:
#ifndef CLASS_VENTOUSE_H #define CLASS_VENTOUSE_H #include "mbed.h" class Ventouse { public: Ventouse(PinName pinPompe, PinName pinElectrovanne, PinName pinCapteurPression, char index); Ventouse(PinName pinPompe, PinName pinCapteurPression, char index); void automate(); void action(bool action); void attraper(); void relacher(); bool getPression(); bool getPompe(); void setPompe(float val); void setElectrovanne(float val); private: typedef enum {Attente, Attraper, Attraper_ok, Relacher} type_etat ; PwmOut* m_pompe; PwmOut* m_electrovanne; AnalogIn* m_pression; bool flag_attraper; bool flag_relacher; type_etat etat; char m_ack; PinName m_pinPompe, m_pinElectrovanne, m_pinCapteurPression; char m_index; bool flag_electrovanne; // 1->presence EV, 0->absence EV }; #endif //CLASS_VENTOUSE_H