MX-12W Servo Library

Dependents:   DISCO_L475VG_IOT01-Sensors-BSP

Committer:
tsoul
Date:
Thu Dec 10 21:51:18 2020 +0000
Revision:
0:5e5d94ac9c80
Child:
1:d0c3878f77ee
First working version

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tsoul 0:5e5d94ac9c80 1 #ifndef MBED_MX12_H
tsoul 0:5e5d94ac9c80 2 #define MBED_MX12_H
tsoul 0:5e5d94ac9c80 3
tsoul 0:5e5d94ac9c80 4 #include "mbed.h"
tsoul 0:5e5d94ac9c80 5
tsoul 0:5e5d94ac9c80 6 class MX12 {
tsoul 0:5e5d94ac9c80 7 public:
tsoul 0:5e5d94ac9c80 8 MX12(PinName tx, PinName rx, int baud=115200);
tsoul 0:5e5d94ac9c80 9
tsoul 0:5e5d94ac9c80 10 void SetSpeed(unsigned char mot_id, float speed);
tsoul 0:5e5d94ac9c80 11
tsoul 0:5e5d94ac9c80 12 void rw(char rw, unsigned char mot_id, char adress, char len, char *data);
tsoul 0:5e5d94ac9c80 13
tsoul 0:5e5d94ac9c80 14 private:
tsoul 0:5e5d94ac9c80 15 UnbufferedSerial _mx12;
tsoul 0:5e5d94ac9c80 16 int _baud;
tsoul 0:5e5d94ac9c80 17 };
tsoul 0:5e5d94ac9c80 18
tsoul 0:5e5d94ac9c80 19 #endif /* MBED_MX12_H */