PINOUT à jour, trame CAN OK

Dependencies:   mbed ident_crac

Code carte pompe

Committer:
marwanesaich
Date:
Tue May 07 13:14:29 2019 +0000
Revision:
2:4cc8fa2f64be
Parent:
0:84a8c24e29ae
Child:
3:cf33f9d4d6ff
Child:
5:176e7353ba1c
gestion pompes avec automates sans ACK

Who changed what in which revision?

UserRevisionLine numberNew contents of line
marwanesaich 0:84a8c24e29ae 1 #ifndef CLASS_VENTOUSE_H
marwanesaich 0:84a8c24e29ae 2 #define CLASS_VENTOUSE_H
marwanesaich 0:84a8c24e29ae 3
marwanesaich 0:84a8c24e29ae 4 #include "mbed.h"
marwanesaich 0:84a8c24e29ae 5
marwanesaich 2:4cc8fa2f64be 6 typedef enum {Attente, Attraper, Attraper_ok, Relacher, Relacher_ok} type_etat ;
marwanesaich 0:84a8c24e29ae 7
marwanesaich 0:84a8c24e29ae 8 class Ventouse
marwanesaich 0:84a8c24e29ae 9 {
marwanesaich 0:84a8c24e29ae 10 public:
marwanesaich 2:4cc8fa2f64be 11 Ventouse(PinName pinPompe, PinName pinElectrovanne, PinName pinCapteurPression, char index);
marwanesaich 0:84a8c24e29ae 12
marwanesaich 2:4cc8fa2f64be 13 void automate();
marwanesaich 2:4cc8fa2f64be 14 void action(bool action);
marwanesaich 0:84a8c24e29ae 15 void attraper();
marwanesaich 0:84a8c24e29ae 16 void relacher();
marwanesaich 0:84a8c24e29ae 17
marwanesaich 2:4cc8fa2f64be 18 bool getPression();
marwanesaich 2:4cc8fa2f64be 19 bool getPompe();
marwanesaich 0:84a8c24e29ae 20
marwanesaich 0:84a8c24e29ae 21
marwanesaich 0:84a8c24e29ae 22 void setPompe(float val);
marwanesaich 0:84a8c24e29ae 23 void setElectrovanne(float val);
marwanesaich 0:84a8c24e29ae 24
marwanesaich 0:84a8c24e29ae 25
marwanesaich 0:84a8c24e29ae 26
marwanesaich 0:84a8c24e29ae 27
marwanesaich 0:84a8c24e29ae 28 private:
marwanesaich 0:84a8c24e29ae 29 PwmOut* m_pompe;
marwanesaich 0:84a8c24e29ae 30 PwmOut* m_electrovanne;
marwanesaich 0:84a8c24e29ae 31 AnalogIn* m_pression;
marwanesaich 0:84a8c24e29ae 32
marwanesaich 2:4cc8fa2f64be 33 bool flag_attraper;
marwanesaich 2:4cc8fa2f64be 34 bool flag_relacher;
marwanesaich 2:4cc8fa2f64be 35 type_etat etat;
marwanesaich 2:4cc8fa2f64be 36 char m_index;
marwanesaich 2:4cc8fa2f64be 37 char m_ack;
marwanesaich 0:84a8c24e29ae 38 PinName m_pinPompe, m_pinElectrovanne, m_pinCapteurPression;
marwanesaich 0:84a8c24e29ae 39
marwanesaich 0:84a8c24e29ae 40
marwanesaich 0:84a8c24e29ae 41 };
marwanesaich 0:84a8c24e29ae 42
marwanesaich 0:84a8c24e29ae 43 #endif //CLASS_VENTOUSE_H
marwanesaich 0:84a8c24e29ae 44