MX-12W Servo Library

Dependents:   DISCO_L475VG_IOT01-Sensors-BSP

MX12.h

Committer:
tsoul
Date:
2020-12-10
Revision:
0:5e5d94ac9c80
Child:
1:d0c3878f77ee

File content as of revision 0:5e5d94ac9c80:

#ifndef MBED_MX12_H
#define MBED_MX12_H

#include "mbed.h"

class MX12 {
public:
    MX12(PinName tx, PinName rx, int baud=115200);
    
    void SetSpeed(unsigned char mot_id, float speed);
    
    void rw(char rw, unsigned char mot_id, char adress, char len, char *data);

private:
    UnbufferedSerial _mx12;
    int _baud;
};

#endif /* MBED_MX12_H */