
Kildekode til robot
Fork of PRO1 by
Diff: nucleo_servo.h
- Revision:
- 0:d3dbe632b1a9
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nucleo_servo.h Mon Oct 31 09:57:07 2016 +0000 @@ -0,0 +1,18 @@ +#ifndef _NUCLEO_H_ +#define _NUCLEO_H_ + +class Servo { + +public: + Servo(PinName pin); + ~Servo(); + void set_position(float deg); + void turn_left(float deg); + void turn_right(float deg); +private: + PwmOut *servoPWM; + float degrees; +}; + + +#endif \ No newline at end of file