![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Pour Marc la mignonne
Dependencies: BSP_DISCO_F429ZI LCD_DISCO_F429ZI TS_DISCO_F429ZI mbed
commandes.cpp
- Committer:
- Alex_mln
- Date:
- 2018-05-31
- Revision:
- 0:fcce18d01987
File content as of revision 0:fcce18d01987:
#include "mbed.h" #include "LCD_DISCO_F429ZI.h" #include "commandes.h" AnalogOut moteur1(PA_4); //moteur droit AnalogOut moteur2(PA_5); //moteur gauche float vitesse=0.5; float vit=vitesse*0.3+0.7; void recup_vitesse(float pvit){ vitesse=pvit; } void arreter(){ moteur1=0; moteur2=moteur1; } void avancer(){ moteur1=vit; moteur2=moteur1; } void tourner_droite(){ moteur1=0.70; moteur2=1.0; } void tourner_gauche(){ moteur1=1.0; moteur2=0.70; } void tournerDroitVite(){ moteur1=0.0; moteur2=1.0; } void tournerGaucheVite(){ moteur1=1.0; moteur2=0.0; }