Librairie pour contrôler un moteur connecté à une contrôleur SDC21XX
Dependencies: CANopen_Node Roboteq_SDC_serie
Diff: SDC21XX_Motor.h
- Revision:
- 0:1c0bc44980e0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SDC21XX_Motor.h Wed Jun 01 15:03:34 2016 +0000 @@ -0,0 +1,41 @@ +#ifndef SDC21XX_MOTOR_H +#define SDC21XX_MOTOR_H + +#include "mbed.h" +#include "Roboteq.h" + +namespace mbed { + + class SDC21XX_Motor { + + public : + + SDC21XX_Motor(uint8_t _node_id, CAN * _can, uint8_t _channel, uint32_t _reductor); + void GoAngle(int16_t _angle); + int16_t GetAngle(); + void SetChannel(uint8_t _channel); + uint8_t GetChannel(void); + void SetReductor(uint32_t _reductor); + uint32_t GetReductor(void); + void SetNodeID(uint8_t _node_id); + uint8_t GetNodeID(void); + void SetCan(CAN * _can); + CAN* GetCan(void); + + private : + + protected : + + Roboteq RB; + uint8_t channel; + uint32_t reductor; + + + };//end class + + + + +}//end namespace + +#endif \ No newline at end of file