A lot of change
Dependents: MX106-finaltest dynamixel Arm_dynamixel_can Arm_dynamixel_can_procedurale
Diff: MX106.h
- Revision:
- 0:8fda718cb527
- Child:
- 1:555b9b4a1ecd
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MX106.h Mon May 23 02:18:19 2016 +0000 @@ -0,0 +1,42 @@ +#ifndef MBED_MX106_H +#define MBED_MX106_H + +#include "mbed.h" +#include "SerialHalfDuplex.h" +#include "cominication_1.h" + +#define REG_ID 0x3 +#define REG_CW_LIMIT 0x06 +#define REG_CCW_LIMIT 0x08 +#define REG_GOAL_POSITION 0x1E +#define REG_MOVING_SPEED 0x20 +#define REG_VOLTS 0x2A +#define REG_TEMP 0x2B +#define REG_MOVING 0x2E +#define REG_POSITION 0x24 + + class MX106 { + + public: + + MX106(int ID, comunication_1 line, float gear_train); + + int SetMode(int mode); + + int SetCWLimit(float degrees); + + int SetCCWLimit(float degrees); + + int GoalPosition(float degrees); + + int SetSpeed(float goal_speed); + + float GetTemperature(void); + + private: + + float _gear_train; + comunication_1 _line; + int _ID; + int _mode; + };