
Kildekode til robot
Fork of Robotkode by
Diff: hack_motor.h
- Revision:
- 7:a852e63cac3d
- Parent:
- 0:d3dbe632b1a9
--- a/hack_motor.h Thu Nov 24 09:15:48 2016 +0000 +++ b/hack_motor.h Fri Dec 09 12:32:21 2016 +0000 @@ -1,11 +1,8 @@ +#include "mbed.h" #ifndef HACK_MOTOR_H #define HACK_MOTOR_H -#include "mbed.h" - class Wheel { - public: - Wheel(PinName M1A_pin, PinName M1B_pin, PinName M2A_pin, PinName M2B_pin); ~Wheel(); void FW(); // Forward @@ -17,7 +14,6 @@ void set_speed(float speed); // set your wanted speed (0..1.0) float get_speed(); // get the actual speed void FW(float right, float left); // Overload Forward with right motor speed, left motor speed - private: float fw, bw; float speed; @@ -25,6 +21,5 @@ PwmOut *M2A; DigitalOut *M1B; DigitalOut *M2B; -}; - +}; #endif \ No newline at end of file