Driver for Encoder Motor module.
More...
|
|
#define | ENCODER_MOTOR_GET_PARAM 0x01 |
| |
|
#define | ENCODER_MOTOR_SAVE_PARAM 0x02 |
| |
|
#define | ENCODER_MOTOR_TEST_PARAM 0x03 |
| |
|
#define | ENCODER_MOTOR_SHOW_PARAM 0x04 |
| |
|
#define | ENCODER_MOTOR_RUN_STOP 0x05 |
| |
|
#define | ENCODER_MOTOR_GET_DIFF_POS 0x06 |
| |
|
#define | ENCODER_MOTOR_RESET 0x07 |
| |
|
#define | ENCODER_MOTOR_SPEED_TIME 0x08 |
| |
|
#define | ENCODER_MOTOR_GET_SPEED 0x09 |
| |
|
#define | ENCODER_MOTOR_GET_POS 0x10 |
| |
|
#define | ENCODER_MOTOR_MOVE 0x11 |
| |
|
#define | ENCODER_MOTOR_MOVE_TO 0x12 |
| |
|
#define | ENCODER_MOTOR_DEBUG_STR 0xCC |
| |
|
#define | ENCODER_MOTOR_ACKNOWLEDGE 0xFF |
| |
|
| uint32_t | MeHost_Pack (uint8_t *buf, uint32_t bufSize, uint8_t module, uint8_t *data, uint32_t length) |
| |
Driver for Encoder Motor module.
- Author
- MakeBlock
- Version
- V1.0.1
- Date
- 2015/11/09
- 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 EncoderMotor device, The Me EncoderMotor inherited the MeSerial class from SoftwareSerial.
- Method List:
- void MeEncoderMotor::begin();
- boolean MeEncoderMotor::reset();
- boolean MeEncoderMotor::move(float angle, float speed);
- boolean MeEncoderMotor::moveTo(float angle, float speed);
- boolean MeEncoderMotor::runTurns(float turns, float speed);
- boolean MeEncoderMotor::runSpeed(float speed);
- boolean MeEncoderMotor::runSpeedAndTime(float speed, float time);
- float MeEncoderMotor::getCurrentSpeed();
- float MeEncoderMotor::getCurrentPosition();
- History:
`<Author>` `<Time>` `<Version>` `<Descr>`
Mark Yan 2015/11/03 1.0.0 Fix minor errors on format
forfish 2015/11/09 1.0.1 Add description
◆ MeHost_Pack()
| uint32_t MeHost_Pack |
( |
uint8_t * |
buf, |
|
|
uint32_t |
bufSize, |
|
|
uint8_t |
module, |
|
|
uint8_t * |
data, |
|
|
uint32_t |
length |
|
) |
| |
- Function
- MeHost_Pack
- Description
- Pack data into a package to send.
- Parameters
-
| [in] | buf | - Buffer to save package. |
| [in] | bufSize | - Size of buf. |
| [in] | module | - The associated module of package. |
| [in] | data | - The data to pack. |
| [in] | length | - The length(size) of data. |
- Output
- None \Return 0.
- Others
- package size.