Programme de test à priori fonctionnel avec la version 2018 de la carte
Dependencies: PwmIn mbed Encoder_Nucleo_16_bits
Diff: main.cpp
- Revision:
- 11:df0957bf8f16
- Parent:
- 10:c6db803927b6
- Child:
- 12:ee9e5009f7ce
--- a/main.cpp Wed Oct 23 09:56:01 2019 +0000 +++ b/main.cpp Mon Mar 09 05:54:45 2020 +0000 @@ -515,15 +515,15 @@ do { Led1 = 0; - Pc.printf ("\n\n\n\n\rProgramme de test\n\n\rEntrez le code du test a effectuer :\n\n"); - Pc.printf ("\r1- Capteurs Ultra Son (les 3)\n"); - Pc.printf ("\r2- Boussole et I2C\n"); - Pc.printf ("\r3- Capteurs GP2 (les 4)\n"); - Pc.printf ("\r4- Capteurs CNY70 (les 3)\n"); - Pc.printf ("\r5- VBAT \t! erreur de composant la mesure est fausse !\n"); - Pc.printf ("\r6- Moteur Gauche\n"); - Pc.printf ("\r7- Moteur Droit\n"); - Pc.printf ("\r8- Servomoteur\n"); + Pc.printf ("\n\n\n\n\rTest program \n\n\r Choos the component to test :\n\n"); + Pc.printf ("\r1- Ultrasonic sensors (3)\n"); + Pc.printf ("\r2- Compass et I2C\n"); + Pc.printf ("\r3- GP2 sensors \n"); + Pc.printf ("\r4- CNY70 (3)\n"); + Pc.printf ("\r5- VBAT \t! value error!\n"); + Pc.printf ("\r6- Left motor\n"); + Pc.printf ("\r7- Right motor\n"); + Pc.printf ("\r8- Servomotor\n"); Pc.printf ("\r9- PIXY (CMUCAM5)\n"); MENU_choix = Pc.getc (); } while (((MENU_choix-'0')<1) || ((MENU_choix-'0')>9)); @@ -712,9 +712,9 @@ break; case 6 : - Pc.printf ("\n\n\rMoteur Gauche\n"); - Pc.printf ("\rAppuyez sur Entree pour quitter\n"); - + Pc.printf ("\n\n\rLeft motor\n"); + Pc.printf ("\rHit Enter to quit \n"); + Pc.printf ("\rPWM should change regularly and left motor should move, Tick should increase, Period should be 50 us \n", MOTG_duty, Gauche.GetCounter(), Gperiod); Led2 = 1; @@ -755,6 +755,7 @@ } Pwm_MG = MOTG_duty; + Pc.printf ("\rPWM = %2.1lf => Pos = %10ld Tick, Period = %ldus", MOTG_duty, Gauche.GetCounter(), Gperiod); @@ -769,8 +770,9 @@ break; case 7 : - Pc.printf ("\n\n\rMoteur Droit\n"); - Pc.printf ("\rAppuyez sur Entree pour quitter\n"); + Pc.printf ("\n\n\rLeft motor\n"); + Pc.printf ("\rHit Enter to quit \n"); + Pc.printf ("\rPWM should change regularly and left motor should move, Tick should increase, Period should be 50 us \n", MOTG_duty, Gauche.GetCounter(), Gperiod); Led2 = 1;