MakeBlock Drive Updated Updated library for MakeBlock Ranger

Loading...
Searching...
No Matches
MeEncoderOnBoard.cpp File Reference

Driver for Encoder module on MeAuriga and MeMegaPi. More...

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

## Detailed Description

Driver for Encoder module on MeAuriga and MeMegaPi.

Author
  MakeBlock

Version
  V1.0.5

Date
  2018/01/03

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 Encoder On MeAuriga and MeMegaPi.

Method List:

1. void MeEncoderOnBoard::reset(uint8_t slot);
2. uint8_t MeEncoderOnBoard::getSlotNum(void);
3. uint8_t MeEncoderOnBoard::getIntNum(void);
4. uint8_t MeEncoderOnBoard::getPortA(void);
5. uint8_t MeEncoderOnBoard::getPortB(void);
6. long MeEncoderOnBoard::getPulsePos(void);
7. void MeEncoderOnBoard::setPulsePos(long pulse_pos);
8. void MeEncoderOnBoard::pulsePosPlus(void);
9. void MeEncoderOnBoard::pulsePosMinus(void);
10. void MeEncoderOnBoard::setCurrentSpeed(float speed);
11. float MeEncoderOnBoard::getCurrentSpeed(void);
12. int16_t MeEncoderOnBoard::getCurPwm(void);
13. void MeEncoderOnBoard::setTarPWM(int16_t pwm_value);
14. void MeEncoderOnBoard::setMotorPwm(int16_t pwm);
15. void MeEncoderOnBoard::updateSpeed(void);
16. void MeEncoderOnBoard::updateCurPos(void);
17. long MeEncoderOnBoard::getCurPos(void)
18. void MeEncoderOnBoard::runSpeed(float speed);
19. void MeEncoderOnBoard::setSpeed(float speed);
20. void MeEncoderOnBoard::move(long position,float speed,int16_t extId,cb callback);
21. void MeEncoderOnBoard::moveTo(long position,float speed,int16_t extId,cb callback);
22. long MeEncoderOnBoard::distanceToGo(void);
23. void MeEncoderOnBoard::setSpeedPid(float p,float i,float d);
24. void MeEncoderOnBoard::setPosPid(float p,float i,float d);
25. void MeEncoderOnBoard::setPulse(int16_t pulseValue);
26. void MeEncoderOnBoard::setRatio(float RatioValue);
27. void MeEncoderOnBoard::setMotionMode(int16_t motionMode);
28. int16_t MeEncoderOnBoard::pidPositionToPwm(void);
29. int16_t MeEncoderOnBoard::speedWithoutPos(void);
30. void MeEncoderOnBoard::encoderMove(void);
31. void MeEncoderOnBoard::pwmMove(void);
32. boolean MeEncoderOnBoard::isTarPosReached(void);
33. void MeEncoderOnBoard::loop(void);

History:

      `<Author>`         `<Time>`        `<Version>`        `<Descr>`
      forfish         2015/11/10     1.0.0            Add description
      Mark Yan        2016/04/07     1.0.1            fix motor reset issue.
      Mark Yan        2016/05/17     1.0.2            add some comments.
      Mark Yan        2016/06/25     1.0.3            add PID calibration for encoder driver.
      Zzipeng         2017/05/22     1.0.4            when motor turn its direction.
      Mark Yan        2018/01/03     1.0.4            add callback flag.