test
Dependencies: mbed ros_lib_kinetic nhk19mr2_can_info splitData SerialHalfDuplex_HM
KondoServo.h
00001 #ifndef __KONDO_SERVO_H__ 00002 #define __KONDO_SERVO_H__ 00003 00004 #include "mbed.h" 00005 #include "SerialHalfDuplex.h" 00006 00007 typedef enum ServoMode{single = 0,multi = 1}s_mode; 00008 typedef unsigned char u8; 00009 00010 class KondoServo{ 00011 protected: 00012 unsigned int baudrate; 00013 s_mode mode; 00014 SerialHalfDuplex master; 00015 00016 public: 00017 void init(int baud); 00018 void init(); 00019 00020 void setSpeed(int id, u8 speed); 00021 float readSpeed(int id); 00022 int set_degree(int id,float degree); 00023 void setID(u8 id); 00024 u8 readID(); 00025 ~KondoServo(); 00026 KondoServo(PinName txPin,PinName rxPin, int quantity=2, unsigned int baud=115200); 00027 00028 }; 00029 #endif
Generated on Thu Jul 14 2022 13:15:26 by 1.7.2