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.
Actionneurs/Moteur.h
- Committer:
- xav_jann1
- Date:
- 2019-05-22
- Revision:
- 0:1cfd66c3a181
File content as of revision 0:1cfd66c3a181:
#ifndef MOTEUR_H #define MOTEUR_H #include "mbed.h" class Moteur { public: // Constructeur: Moteur(PinName pin_en, PinName pin_in1, PinName pin_in2); // Déplacement: void forward(); void backward(); void opposite(); void stop(); void turn(float pwm); // Setter: void setPWM(float pwm); // entre 0 et 1 void setPWM_max(float pwm); // entre 0 et 1 void setOffset(float offset); // entre 0 et 1 private: PwmOut m_pwm; DigitalOut m_in1; DigitalOut m_in2; float m_pwm_max; float m_offset; }; #endif