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: Actionneurs/Servo.h
- Revision:
- 0:1cfd66c3a181
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Actionneurs/Servo.h Wed May 22 16:54:27 2019 +0000 @@ -0,0 +1,28 @@ +#ifndef SERVO_H +#define SERVO_H + +#include "mbed.h" + +class Servo { + +public: + // Constructeur: + Servo(PinName Pin); + + // Déplacement: + void pos(int pos); + void enable(int startPos, float period); + void disable(); + +private: + // Gestion de l'impulsion: + void startPulse(); + void endPulse(); + + int m_position; + DigitalOut m_pin; + Ticker m_pulse; + Timeout m_pulseStop; +}; + +#endif \ No newline at end of file