Classes et code de la partie pompe du Robot 2021

Dependencies:   mbed ident_crac

Committer:
goldmas
Date:
Fri Jan 15 07:36:28 2021 +0000
Revision:
0:253443d82cba
Child:
4:4bae30d48662
Code pour les pompes Coupe de France de robotique 2021

Who changed what in which revision?

UserRevisionLine numberNew contents of line
goldmas 0:253443d82cba 1 #ifndef _BLOC_8_POMPE_H
goldmas 0:253443d82cba 2 #define _BLOC_8_POMPE_H
goldmas 0:253443d82cba 3
goldmas 0:253443d82cba 4 #include "bloc_monopompe.h"
goldmas 0:253443d82cba 5
goldmas 0:253443d82cba 6 class bloc_8_pompe
goldmas 0:253443d82cba 7 {
goldmas 0:253443d82cba 8 public :
goldmas 0:253443d82cba 9 bloc_8_pompe (PinName pompe1, PinName electrovanne1, PinName capteur1,
goldmas 0:253443d82cba 10 PinName pompe2, PinName electrovanne2, PinName capteur2,
goldmas 0:253443d82cba 11 PinName pompe3, PinName electrovanne3, PinName capteur3,
goldmas 0:253443d82cba 12 PinName pompe4, PinName electrovanne4, PinName capteur4,
goldmas 0:253443d82cba 13 PinName pompe5, PinName electrovanne5, PinName capteur5,
goldmas 0:253443d82cba 14 PinName pompe6, PinName electrovanne6, PinName capteur6,
goldmas 0:253443d82cba 15 PinName pompe7, PinName electrovanne7, PinName capteur7,
goldmas 0:253443d82cba 16 PinName pompe8, PinName electrovanne8, PinName capteur8) ;
goldmas 0:253443d82cba 17
goldmas 0:253443d82cba 18
goldmas 0:253443d82cba 19 bool aspirer (int groupe) ;
goldmas 0:253443d82cba 20
goldmas 0:253443d82cba 21 bool relacher (int groupe) ;
goldmas 0:253443d82cba 22
goldmas 0:253443d82cba 23 bool possession (int groupe) ;
goldmas 0:253443d82cba 24
goldmas 0:253443d82cba 25 private :
goldmas 0:253443d82cba 26
goldmas 0:253443d82cba 27 PwmOut _pompe1 ; // MORT
goldmas 0:253443d82cba 28 DigitalOut _electrovanne1 ;
goldmas 0:253443d82cba 29 AnalogIn _capteur1 ;
goldmas 0:253443d82cba 30
goldmas 0:253443d82cba 31 PwmOut _pompe2 ;
goldmas 0:253443d82cba 32 DigitalOut _electrovanne2 ;
goldmas 0:253443d82cba 33 AnalogIn _capteur2 ;
goldmas 0:253443d82cba 34
goldmas 0:253443d82cba 35 PwmOut _pompe3 ;
goldmas 0:253443d82cba 36 DigitalOut _electrovanne3 ;
goldmas 0:253443d82cba 37 AnalogIn _capteur3 ;
goldmas 0:253443d82cba 38
goldmas 0:253443d82cba 39 PwmOut _pompe4 ;
goldmas 0:253443d82cba 40 DigitalOut _electrovanne4 ;
goldmas 0:253443d82cba 41 AnalogIn _capteur4 ;
goldmas 0:253443d82cba 42
goldmas 0:253443d82cba 43 PwmOut _pompe5 ;
goldmas 0:253443d82cba 44 DigitalOut _electrovanne5 ;
goldmas 0:253443d82cba 45 AnalogIn _capteur5 ;
goldmas 0:253443d82cba 46
goldmas 0:253443d82cba 47 PwmOut _pompe6 ;
goldmas 0:253443d82cba 48 DigitalOut _electrovanne6 ;
goldmas 0:253443d82cba 49 AnalogIn _capteur6 ;
goldmas 0:253443d82cba 50
goldmas 0:253443d82cba 51 PwmOut _pompe7 ;
goldmas 0:253443d82cba 52 DigitalOut _electrovanne7 ;
goldmas 0:253443d82cba 53 AnalogIn _capteur7 ;
goldmas 0:253443d82cba 54
goldmas 0:253443d82cba 55 PwmOut _pompe8 ;
goldmas 0:253443d82cba 56 DigitalOut _electrovanne8 ;
goldmas 0:253443d82cba 57 AnalogIn _capteur8 ;
goldmas 0:253443d82cba 58
goldmas 0:253443d82cba 59 float _val_cpt[8] ;
goldmas 0:253443d82cba 60 bool _gobelet_en_place[8] ;
goldmas 0:253443d82cba 61 };
goldmas 0:253443d82cba 62
goldmas 0:253443d82cba 63 #endif