Kildekode
Fork of PRO1 by
Embed:
(wiki syntax)
Show/hide line numbers
nucleo_servo.h
00001 #ifndef _NUCLEO_H_ 00002 #define _NUCLEO_H_ 00003 00004 class Servo { 00005 00006 public: 00007 Servo(PinName pin); 00008 ~Servo(); 00009 void set_position(float deg); 00010 void turn_left(float deg); 00011 void turn_right(float deg); 00012 private: 00013 PwmOut *servoPWM; 00014 float degrees; 00015 }; 00016 00017 00018 #endif
Generated on Thu Jul 14 2022 04:41:32 by
1.7.2
