ci = (c0 == 1 && c1 == 1 && c2 == 0 && c3 == 0 && c5 == 0 && c6 == 0); if (marche_frontmontant == 1 && ci == 1) { mode_auto = 1; etape = 1; } if (arret_frontdescedant == 1) { mode_auto = 0; } if (etape == 1 && c6 == 1) { etape = 2; } if (etape == 2 && c2 == 1) { etape = 3; } if (etape == 3 && tempo == 0) { tempo = millis(); } if (etape == 3 && millis() > tempo + 3000) { etape = 4; tempo = 0; } if (etape == 4 && c1 == 1) { etape = 5; } if (etape == 5 && c3 == 1) { etape = 6; } if (etape == 6 && c5_frontdescendant == 1) { etape = 1; } s0 = mode_auto == 1; if (ci && mode_auto == 0) { s8 = 1; } else if (ci && mode_auto == 1) { s8 = 2; } else if (mode_auto) { s8 = 3; } else { s8 = 0; } s10 = etape; a0 = (etape == 1); a1 = (etape == 2 || etape == 3); a2 = (etape == 5); a3 = (etape == 6);