Classes et code de la partie pompe du Robot 2021
Dependencies: mbed ident_crac
main.cpp
- Committer:
- goldmas
- Date:
- 2021-01-15
- Revision:
- 3:ac32a4abb2cc
- Parent:
- 2:61ffa6e3eee5
- Child:
- 4:4bae30d48662
File content as of revision 3:ac32a4abb2cc:
#include "bloc_8_pompe.h" #define VENT_AT 0x266 #define VENT_RE 0x267 #define TEST_VENT_1_ON 0x268 #define TEST_VENT_1_OFF 0x269 #define VENT_ETAT 0x27A //initialisations relatives au Bus CAN CAN bus_CAN(PB_8, PB_9) ; int flag_reception_CAN = 0 ; void interruption_reception(void) ; int main() { bloc_8_pompe::bloc_8_pompe classe_pompe (PC_9, PA_8, PB_0, //bloc 1 PA_9, PA_10, PB_1, //bloc 2 PA_11, PA_15, PC_1, //bloc 3 PB_7, PB_6, PC_0, //bloc 4 PC_7, PC_8, PC_5, //bloc 5 PB_10, PB_2, PC_4, //bloc 6 PA_6, PA_5, PA_7, //bloc 7 PA_0, PA_1, PA_4); //bloc 8 bool possession_gobelet[7] ; bus_CAN.attach(&interruption_reception, RxIrq) ; while(1) { for(int i=1 ; i<9 ; i++) { possession_gobelet[i-1] = classe_pompe.aspirer(i) ; wait_ms(500) ; if(possession_gobelet) { possession_gobelet[i-1] = classe_pompe.relacher(i) ; wait_ms(100) ; //detrompeur_possession = classe_pompe.possession(2) ; } //detrompeur_possession = classe_pompe.possession(2) ; wait_ms(1000) ; } } }