fin de séance - 2024/11/6

This commit is contained in:
Samuel 2024-12-07 22:22:48 +01:00
parent e66a77b245
commit 6843d46b93

26
main.c
View File

@ -78,18 +78,16 @@ void main()
Adc_Init(); Adc_Init();
// Boutons // Boutons
init_bouton(2); init_bouton(PIN_BUTTON_ELEVATOR);
init_bouton(6); init_bouton(PIN_BUTTON_LEFT_ROTATION);
init_bouton(10); init_bouton(PIN_BUTTON_POT);
init_bouton(14); init_bouton(PIN_BUTTON_RIGHT_ROTATION);
init_bouton(PIN_BUTTON_CLAW);
init_bouton(PIN_BUTTON_MID_ELEVATOR);
ascenseur = ASCENSEUR_BAS; ascenseur = ASCENSEUR_BAS;
pince = PINCE_OUVERTE; pince = PINCE_OUVERTE;
gpio_init(1);
gpio_pull_up(1);
gpio_set_dir(1, GPIO_IN);
gpio_init(PIN_LED_VERTE); gpio_init(PIN_LED_VERTE);
gpio_set_dir(PIN_LED_VERTE, GPIO_OUT); gpio_set_dir(PIN_LED_VERTE, GPIO_OUT);
gpio_put(PIN_LED_VERTE, true); gpio_put(PIN_LED_VERTE, true);
@ -220,18 +218,18 @@ void main()
} }
} }
message [3] = pince; message[3] = pince;
message[4] = ascenseur; message[4] = ascenseur;
printf(">x:%d\n", message[0]); //printf(">x:%d\n", message[0]);
printf(">Y:%d\n", message[1]); //printf(">Y:%d\n", message[1]);
printf(">Rz:%d\n", message[2]); printf(">Rz:%d\n", message[2]);
printf(">pince:%d\n", message[3]); printf(">pince:%d\n", message[3]);
printf(">ascenseur:%d\n", message[4]); printf(">ascenseur:%d\n", message[4]);
printf(">result0:%d\n", result0); //printf(">result0:%d\n", result0);
sleep_ms(25);
communication_envoyer_message(message, 254); communication_envoyer_message(message, 254);
sleep_ms(25);
} }
} }