Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed CalPID motorout ros_lib_melodic MotorController_AbsEC
KondoServoLibrary/KondoServo.h
- Committer:
- koheim
- Date:
- 2021-07-25
- Revision:
- 11:df2acf22123e
- Parent:
- 0:83b2c6a67cce
File content as of revision 11:df2acf22123e:
#ifndef __KONDO_SERVO_H__
#define __KONDO_SERVO_H__
#include "mbed.h"
#include "SerialHalfDuplex.h"
typedef enum ServoMode{single = 0,multi = 1}s_mode;
typedef unsigned char u8;
class KondoServo{
protected:
unsigned int baudrate;
s_mode mode;
SerialHalfDuplex master;
public:
void init(int baud);
void init();
void setSpeed(int id, u8 speed);
float readSpeed(int id);
int set_degree(int id,float degree);
void setID(u8 id);
u8 readID();
~KondoServo();
KondoServo(PinName txPin,PinName rxPin, int quantity=2, unsigned int baud=115200);
};
#endif