diff --git a/PjtKEIL_Integration/Src/principal.c b/PjtKEIL_Integration/Src/principal.c index c3bff67..8092cb1 100644 --- a/PjtKEIL_Integration/Src/principal.c +++ b/PjtKEIL_Integration/Src/principal.c @@ -38,15 +38,10 @@ int nCible = 1; void majCible() { Prepare_Clear_LED(nLed); - - nLed++; - nCible++; - if (nCible > 4) { - nCible = 1; - } - if (nLed > 3) { - nLed = 0; - } + + // on utilise le "bruit" de l'entree (capteur) comme source d'aléatoire + nLed=tabJoueur[0].dft % 4; + nCible = nLed +1; Prepare_Set_LED(nLed); Choix_Capteur(nCible);