PINOUT à jour, trame CAN OK

Dependencies:   mbed ident_crac

Code carte pompe

Committer:
marwanesaich
Date:
Tue May 07 18:53:22 2019 +0000
Revision:
3:cf33f9d4d6ff
Parent:
2:4cc8fa2f64be
surcharge constructeur pour declaration sans EV car soucis pwm ;

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 0:84a8c24e29ae 6
marwanesaich 0:84a8c24e29ae 7 class Ventouse
marwanesaich 0:84a8c24e29ae 8 {
marwanesaich 0:84a8c24e29ae 9 public:
marwanesaich 2:4cc8fa2f64be 10 Ventouse(PinName pinPompe, PinName pinElectrovanne, PinName pinCapteurPression, char index);
marwanesaich 3:cf33f9d4d6ff 11 Ventouse(PinName pinPompe, 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 3:cf33f9d4d6ff 29
marwanesaich 3:cf33f9d4d6ff 30
marwanesaich 3:cf33f9d4d6ff 31 typedef enum {Attente, Attraper, Attraper_ok, Relacher} type_etat ;
marwanesaich 3:cf33f9d4d6ff 32
marwanesaich 0:84a8c24e29ae 33 PwmOut* m_pompe;
marwanesaich 0:84a8c24e29ae 34 PwmOut* m_electrovanne;
marwanesaich 0:84a8c24e29ae 35 AnalogIn* m_pression;
marwanesaich 0:84a8c24e29ae 36
marwanesaich 2:4cc8fa2f64be 37 bool flag_attraper;
marwanesaich 2:4cc8fa2f64be 38 bool flag_relacher;
marwanesaich 2:4cc8fa2f64be 39 type_etat etat;
marwanesaich 2:4cc8fa2f64be 40 char m_ack;
marwanesaich 0:84a8c24e29ae 41 PinName m_pinPompe, m_pinElectrovanne, m_pinCapteurPression;
marwanesaich 3:cf33f9d4d6ff 42 char m_index;
marwanesaich 3:cf33f9d4d6ff 43
marwanesaich 3:cf33f9d4d6ff 44 bool flag_electrovanne; // 1->presence EV, 0->absence EV
marwanesaich 0:84a8c24e29ae 45
marwanesaich 0:84a8c24e29ae 46
marwanesaich 0:84a8c24e29ae 47 };
marwanesaich 0:84a8c24e29ae 48
marwanesaich 0:84a8c24e29ae 49 #endif //CLASS_VENTOUSE_H
marwanesaich 0:84a8c24e29ae 50