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.
Diff: boucle.cpp
- Revision:
- 0:af7247fcd74c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/boucle.cpp Sun Jun 15 15:32:04 2014 +0000
@@ -0,0 +1,26 @@
+#include "mbed.h"
+#include"biblio_prog.h"
+
+extern float compt,commandeLimite,comptDem,vitesseMin;
+extern int courantLim;
+extern int tensionMin, tensionMax;
+extern char Etat_Precedant, Etat;
+extern int compteur_Demarreur,compteur_Tempo;
+extern char demInfini,infini;
+extern int tour,tour_par_minute;
+DigitalOut led3(LED4);
+
+void boucle(){
+ led3=!led3; //indication visuel pour verifier le fonctionnement de la boucle
+ Etat_Precedant=Etat; //enregistremant de l'etat actuelle
+ Etat_Futur(); //appel d'une fonction permettant de naviguer entre les etat
+ //test pour les compteurs
+ if((Etat==1)||(Etat==4))
+ compteur_Demarreur=compteur_Demarreur++;
+ if(Etat==3)
+ compteur_Tempo=compteur_Tempo++;
+ tour_par_minute=tour*6000; //calcul des tours par minute
+ tour=0; //remise a zero du compte tour
+ Etat_machine(); //appel de la fonction configurant les sorties par rapport a l'etat actuel
+ Sortie(); //applications des sorties
+}
\ No newline at end of file