Driver for Me Encoder New module.
More...
|
|
#define | HOLD 0x40 |
| |
|
#define | SYNC 0x80 |
| |
|
#define | CMD_RESET 0x00 |
| |
|
#define | CMD_MOVE_TO 0x01 |
| |
|
#define | CMD_MOVE 0x02 |
| |
|
#define | CMD_MOVE_SPD 0x03 |
| |
|
#define | CMD_STOP 0x05 |
| |
|
#define | CMD_SET_SPEED_PID 0x10 |
| |
|
#define | CMD_SET_POS_PID 0x11 |
| |
|
#define | CMD_SET_CUR_POS 0x12 |
| |
|
#define | CMD_SET_MODE 0x13 |
| |
|
#define | CMD_SET_PWM 0x14 |
| |
|
#define | CMD_SET_RATIO 0x15 |
| |
|
#define | CMD_SET_PULSE 0x16 |
| |
|
#define | CMD_SET_DEVID 0x17 |
| |
|
#define | CMD_GET_SPEED_PID 0x20 |
| |
|
#define | CMD_GET_POS_PID 0x21 |
| |
|
#define | CMD_GET_POS 0x23 |
| |
|
#define | CMD_GET_SPEED 0x24 |
| |
|
#define | CMD_GET_RATIO 0x25 |
| |
|
#define | CMD_GET_PULSE 0x26 |
| |
|
#define | CMD_GET_LOCK_STATE 0x27 |
| |
|
#define | CMD_GET_FIRWARE_VERSION 0x30 |
| |
Driver for Me Encoder New module.
- Author
- MakeBlock
- Version
- V1.0.0
- Date
- 2016/03/18
- Copyright
- This software is Copyright (C), 2012-2016, MakeBlock. Use is subject to license
conditions. The main licensing options available are GPL V2 or Commercial:
- Open Source Licensing GPL V2
- This is the appropriate option if you want to share the source code of your
application with everyone you distribute it to, and you also want to give them
the right to share who uses it. If you wish to use this software under Open
Source Licensing, you must contribute all your source code to the open source
community in accordance with the GPL Version 2 when your application is
distributed. See http://www.gnu.org/copyleft/gpl.html
- Description
- This file is a drive for Me EncoderNew device, The Me EncoderNew inherited the MeSerial class from SoftwareSerial.
- Method List:
- void MeEncoderNew::begin(void);
- void MeEncoderNew::setAddr(uint8_t i2cAddr,uint8_t slot);
- void MeEncoderNew::move(long angle, float speed, float lock_state);
- void MeEncoderNew::moveTo(long angle, float speed,float lock_state);
- void MeEncoderNew::runSpeed(int speed);
- void MeEncoderNew::runTurns(long turns, float speed,float lock_state);
- void MeEncoderNew::reset(void);
- void MeEncoderNew::setSpeedPID(float p,float i,float d);
- void MeEncoderNew::setPosPID(float p,float i,float d);
- void MeEncoderNew::setMode(uint8_t mode);
- void MeEncoderNew::setPWM(int pwm);
- void MeEncoderNew::setCurrentPosition(long pulse_counter)
- long MeEncoderNew::getCurrentPosition();
- void MeEncoderNew::getSpeedPID(float * p,float * i,float * d);
- void MeEncoderNew::getPosPID(float * p,float * i,float * d);
- float MeEncoderNew::getCurrentSpeed(void);
- void MeEncoderNew::sendCmd(void);
- float MeEncoderNew::getRatio(void);
- void MeEncoderNew::setRatio(float r);
- int MeEncoderNew::getPulse(void);
- void MeEncoderNew::setPulse(int p);
- void MeEncoderNew::setDevid(int devid);
- void MeEncoderNew::runSpeedAndTime(float speed, float time, float lock_state);
- boolean MeEncoderNew::isTarPosReached(void);
- History:
`<Author>` `<Time>` `<Version>` `<Descr>`
Mark Yan 2016/03/18 1.0.0 build the new
Mark Yan 2017/06/09 1.0.1 add function setAddr