Control an H-Bridge using a PwmOut (enable) and two DigitalOuts (direction select). Does not change PWM Frequency
Diff: Motor.h
- Revision:
- 3:0394af44cf3e
- Parent:
- 2:f265e441bcd9
--- a/Motor.h Tue Nov 23 16:16:43 2010 +0000 +++ b/Motor.h Mon Sep 23 19:48:36 2019 +0000 @@ -46,6 +46,8 @@ */ void speed(float speed); + Motor& operator= (float speed); + operator float(); protected: PwmOut _pwm; DigitalOut _fwd;