Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: main.cpp
- Revision:
- 1:bb5b935c0aa9
- Parent:
- 0:5fb4c7e603cf
- Child:
- 2:ee896365f8fe
--- a/main.cpp Mon May 11 09:34:13 2020 +0000
+++ b/main.cpp Mon May 25 06:41:51 2020 +0000
@@ -6,17 +6,17 @@
volatile int flag_fc_haut=0;
volatile int flag_contact=0;
/*************** Interfaces utilisés *************************/
-Serial pc(USBTX, USBRX,115200); // liaison USB
+Serial pc(USBTX, USBRX,9600); // liaison USB
Ticker timer_etat; // Interruptions temporelles (timout)
Ticker timer_reglage_vitesse;
-DigitalOut IN1(PTB23); // sorties logiques
-DigitalOut IN2(PTA1);
-DigitalOut IN3(PTB9);
-DigitalOut IN4(PTC17);
-DigitalOut ENA(PTA2);
-DigitalOut ENB(PTC16);
-AnalogIn ain0(A0); //(lecture potentiometre position) // entrées analogiques
-AnalogIn ain1(A1); // (lecture potentiometre reglage vitesse)
+DigitalOut IN1(PTD3); // sorties logiques
+DigitalOut IN2(PTC4);
+DigitalOut IN3(PTD1);
+DigitalOut IN4(PTC12);
+DigitalOut ENA(PTA1);
+DigitalOut ENB(PTD2);
+AnalogIn ain0(A0); //(lecture potentiometre vitesse) // entrées analogiques
+AnalogIn ain1(A1); // (lecture potentiometre reglage position)
InterruptIn fc_haut(SW2); // entrées KBI
InterruptIn contact(SW3); //
/*************** Programmes d'interruption *******************/
@@ -102,7 +102,7 @@
}
else if(strcmp(command,"position")==0) {
pc.scanf("%s",command);
- consigne_position=atoi(command);*/
+ //consigne_position=atoi(command);*/
}
}
// on traite la commande du moteur