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.
Dependents: JS_1motor_20170707_ok Task_1_BallRidingbot_KeepingStationCatching_layingDown_1230 Task_2_BallRidingbot_MovingForwardCatching_backward_1230 testSSWMR_StationKeeping_200170830_OK ... more
Servo.h@2:4c315bcd91b4, 2013-02-15 (annotated)
- Committer:
- andrewrussell
- Date:
- Fri Feb 15 05:16:58 2013 +0000
- Revision:
- 2:4c315bcd91b4
- Parent:
- 0:e50cd1696bca
Fixed the bug that the bug fix created.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| andrewrussell | 0:e50cd1696bca | 1 | #include "mbed.h" |
| andrewrussell | 0:e50cd1696bca | 2 | |
| andrewrussell | 0:e50cd1696bca | 3 | class Servo { |
| andrewrussell | 0:e50cd1696bca | 4 | public: |
| andrewrussell | 0:e50cd1696bca | 5 | Servo(PinName pwm32); |
| andrewrussell | 0:e50cd1696bca | 6 | |
| andrewrussell | 0:e50cd1696bca | 7 | int invert; |
| andrewrussell | 0:e50cd1696bca | 8 | |
| andrewrussell | 0:e50cd1696bca | 9 | float read(void); |
| andrewrussell | 0:e50cd1696bca | 10 | void write(float); |
| andrewrussell | 0:e50cd1696bca | 11 | void calibrate(float,float,float); |
| andrewrussell | 0:e50cd1696bca | 12 | |
| andrewrussell | 0:e50cd1696bca | 13 | private: |
| andrewrussell | 0:e50cd1696bca | 14 | PwmOut _pwm; |
| andrewrussell | 0:e50cd1696bca | 15 | |
| andrewrussell | 0:e50cd1696bca | 16 | float _period; |
| andrewrussell | 0:e50cd1696bca | 17 | float _min; |
| andrewrussell | 0:e50cd1696bca | 18 | float _max; |
| andrewrussell | 0:e50cd1696bca | 19 | float _slope; |
| andrewrussell | 0:e50cd1696bca | 20 | |
| andrewrussell | 0:e50cd1696bca | 21 | float _pos; |
| andrewrussell | 0:e50cd1696bca | 22 | }; |