Extend Motordriver library
Fork of Motordriver by
Revision 6:8dc1d797f383, committed 2014-12-03
- Comitter:
- Nasupl
- Date:
- Wed Dec 03 07:11:52 2014 +0000
- Parent:
- 5:3110b9209d3c
- Commit message:
- I have added a function to change the PWM frequency.
Changed in this revision
motordriver.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/motordriver.cpp Thu Nov 25 13:34:15 2010 +0000 +++ b/motordriver.cpp Wed Dec 03 07:11:52 2014 +0000 @@ -46,6 +46,10 @@ sign = 0;//i.e nothing. } +void Motor::setPwmFreq(float sec) { + _pwm.period(sec); +} + float Motor::speed(float speed) { float temp = 0; if (sign == 0) {