![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
carte esclave pompe 2020 V1
Dependencies: mbed ident_crac
Diff: main.cpp
- Revision:
- 3:cf33f9d4d6ff
- Parent:
- 2:4cc8fa2f64be
diff -r 4cc8fa2f64be -r cf33f9d4d6ff main.cpp --- a/main.cpp Tue May 07 13:14:29 2019 +0000 +++ b/main.cpp Tue May 07 18:53:22 2019 +0000 @@ -52,13 +52,15 @@ case HACHEUR_GET_ATOM: BRAS = msgRxBuffer[FIFO_lecture].data[0]; pc.printf("HACHEUR_GET_ATOM bras %d\n", BRAS); - ventouse[BRAS]->action(1); + //ventouse[BRAS]->action(1); + ventouse[BRAS]->setPompe(0.5); break; case HACHEUR_RELEASE_ATOM: BRAS = msgRxBuffer[FIFO_lecture].data[0]; pc.printf("HACHEUR_RELEASE_ATOM bras %d\n", BRAS); - ventouse[BRAS]->action(0); + //ventouse[BRAS]->action(0); + ventouse[BRAS]->setPompe(0.0); break; case HACHEUR_GET_PRESENTOIR_AR: @@ -98,18 +100,24 @@ can.attach(&canRx_ISR); // création de l'interrupt attachée à la réception sur le CAN wait(1); #ifdef ROBOT_SMALL + + + ventouse[AR_BAS] = new Ventouse(PA_11, PC_1, AR_BAS); + ventouse[AR_GAUCHE] = new Ventouse(PA_6, PA_5, PA_7, AR_GAUCHE); ventouse[AR_CENTRE] = new Ventouse(PC_9, PA_8, PB_0, AR_CENTRE); ventouse[AR_DROIT] = new Ventouse(PA_9, PA_10, PB_1, AR_DROIT); - ventouse[AR_BAS] = new Ventouse(PA_11, PA_15, PC_1, AR_BAS); + + + ventouse[AV_BAS] = new Ventouse(PB_10, PC_4, AV_BAS); ventouse[AV_GAUCHE] = new Ventouse(PB_7, PB_6, PC_0, AV_GAUCHE); - ventouse[AV_CENTRE] = new Ventouse(PC_7,PC_8 , PC_5, AV_CENTRE); - ventouse[AV_BAS] = new Ventouse(PB_10, PB_2, PC_4, AV_BAS); - ventouse[AR_GAUCHE] = new Ventouse(PA_6, PA_5, PA_7, AR_GAUCHE); ventouse[AV_DROIT] = new Ventouse(PA_0, PA_1, PA_4, AV_DROIT); + + #endif pc.printf("LAUNCHED"); + while(1) { canProcessRx(); for(int i=0; i<8; i++){