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.
Fork of Motor by
Moteur.h
00001 #ifndef MOTOR_H 00002 #define MOTOR_H 00003 00004 #include "mbed.h" 00005 00006 00007 class Moteur { 00008 public: 00009 00010 /** Create a motor control interface 00011 * 00012 * @param pwm A PwmOut pin, driving the H-bridge enable line to control the speed 00013 * @param fwd A DigitalOut, set high when the motor should go forward 00014 * @param rev A DigitalOut, set high when the motor should go backwards 00015 */ 00016 Moteur(PinName pwm, PinName avancer, PinName reculer); 00017 void vitesse(float vit); /*@param speed The speed of the motor as a normalised value between -1.0 and 1.0*/ 00018 00019 protected: 00020 PwmOut _pwm; 00021 DigitalOut _avancer; 00022 DigitalOut _reculer; 00023 }; 00024 00025 #endif
Generated on Sun Jul 17 2022 00:03:12 by
1.7.2
