MakeBlock Drive Updated Updated library for MakeBlock Ranger

Loading...
Searching...
No Matches
Macros
MeEncoderNew.cpp File Reference

Driver for Me Encoder New module. More...

`#include "MeEncoderNew.h"`
Include dependency graph for MeEncoderNew.cpp:

## Macros
#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

## Detailed Description

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:

1. void MeEncoderNew::begin(void);
2. void MeEncoderNew::setAddr(uint8_t i2cAddr,uint8_t slot);
3. void MeEncoderNew::move(long angle, float speed, float lock_state);
4. void MeEncoderNew::moveTo(long angle, float speed,float lock_state);
5. void MeEncoderNew::runSpeed(int speed);
6. void MeEncoderNew::runTurns(long turns, float speed,float lock_state);
7. void MeEncoderNew::reset(void);
8. void MeEncoderNew::setSpeedPID(float p,float i,float d);
9. void MeEncoderNew::setPosPID(float p,float i,float d);
10. void MeEncoderNew::setMode(uint8_t mode);
11. void MeEncoderNew::setPWM(int pwm);
12. void MeEncoderNew::setCurrentPosition(long pulse_counter)
13. long MeEncoderNew::getCurrentPosition();
14. void MeEncoderNew::getSpeedPID(float * p,float * i,float * d);
15. void MeEncoderNew::getPosPID(float * p,float * i,float * d);
16. float MeEncoderNew::getCurrentSpeed(void);
17. void MeEncoderNew::sendCmd(void);
18. float MeEncoderNew::getRatio(void);
19. void MeEncoderNew::setRatio(float r);
20. int MeEncoderNew::getPulse(void);
21. void MeEncoderNew::setPulse(int p);
22. void MeEncoderNew::setDevid(int devid);
23. void MeEncoderNew::runSpeedAndTime(float speed, float time, float lock_state);
24. 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