From 6843d46b933d1db165fb7112fdd4a2156a3bb18e Mon Sep 17 00:00:00 2001 From: Samuel Date: Sat, 7 Dec 2024 22:22:48 +0100 Subject: [PATCH] =?UTF-8?q?fin=20de=20s=C3=A9ance=20-=202024/11/6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/main.c b/main.c index c6f2229..ef797be 100644 --- a/main.c +++ b/main.c @@ -78,18 +78,16 @@ void main() Adc_Init(); // Boutons - init_bouton(2); - init_bouton(6); - init_bouton(10); - init_bouton(14); + init_bouton(PIN_BUTTON_ELEVATOR); + init_bouton(PIN_BUTTON_LEFT_ROTATION); + init_bouton(PIN_BUTTON_POT); + init_bouton(PIN_BUTTON_RIGHT_ROTATION); + init_bouton(PIN_BUTTON_CLAW); + init_bouton(PIN_BUTTON_MID_ELEVATOR); ascenseur = ASCENSEUR_BAS; pince = PINCE_OUVERTE; - gpio_init(1); - gpio_pull_up(1); - gpio_set_dir(1, GPIO_IN); - gpio_init(PIN_LED_VERTE); gpio_set_dir(PIN_LED_VERTE, GPIO_OUT); gpio_put(PIN_LED_VERTE, true); @@ -220,18 +218,18 @@ void main() } } - message [3] = pince; + message[3] = pince; message[4] = ascenseur; - printf(">x:%d\n", message[0]); - printf(">Y:%d\n", message[1]); + //printf(">x:%d\n", message[0]); + //printf(">Y:%d\n", message[1]); printf(">Rz:%d\n", message[2]); printf(">pince:%d\n", message[3]); printf(">ascenseur:%d\n", message[4]); - printf(">result0:%d\n", result0); - - sleep_ms(25); + //printf(">result0:%d\n", result0); communication_envoyer_message(message, 254); + + sleep_ms(25); } }