Header for MeEncoderOnBoard.cpp module.
More...
#include <Arduino.h>
#include <stdbool.h>
#include <avr/interrupt.h>
Go to the source code of this file.
|
|
#define | DIRECT_MODE 0x00 |
| |
|
#define | PID_MODE 0x01 |
| |
|
#define | PWM_MODE 0x02 |
| |
|
#define | MOTION_WITH_POS 0x00 |
| |
|
#define | MOTION_WITHOUT_POS 0x01 |
| |
|
#define | PWM_MIN_OFFSET 25 |
| |
|
#define | ENCODER_POS_DEADBAND 10 |
| |
|
#define | DECELERATION_DISTANCE_PITCH 6 |
| |
|
|
typedef void(* | cb) (int16_t, int16_t) |
| |
Header for MeEncoderOnBoard.cpp module.
- Author
- MakeBlock
- Version
- V1.0.4
- 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:
- void MeEncoderOnBoard::reset(uint8_t slot);
- uint8_t MeEncoderOnBoard::getSlotNum(void);
- uint8_t MeEncoderOnBoard::getIntNum(void);
- uint8_t MeEncoderOnBoard::getPortA(void);
- uint8_t MeEncoderOnBoard::getPortB(void);
- long MeEncoderOnBoard::getPulsePos(void);
- void MeEncoderOnBoard::setPulsePos(long pulse_pos);
- void MeEncoderOnBoard::pulsePosPlus(void);
- void MeEncoderOnBoard::pulsePosMinus(void);
- void MeEncoderOnBoard::setCurrentSpeed(float speed);
- float MeEncoderOnBoard::getCurrentSpeed(void);
- int16_t MeEncoderOnBoard::getCurPwm(void);
- void MeEncoderOnBoard::setTarPWM(int16_t pwm_value);
- void MeEncoderOnBoard::setMotorPwm(int16_t pwm);
- void MeEncoderOnBoard::updateSpeed(void);
- void MeEncoderOnBoard::updateCurPos(void);
- long MeEncoderOnBoard::getCurPos(void)
- void MeEncoderOnBoard::runSpeed(float speed);
- void MeEncoderOnBoard::setSpeed(float speed);
- void MeEncoderOnBoard::move(long position,float speed,int16_t extId,cb callback);
- void MeEncoderOnBoard::moveTo(long position,float speed,int16_t extId,cb callback);
- long MeEncoderOnBoard::distanceToGo(void);
- void MeEncoderOnBoard::setSpeedPid(float p,float i,float d);
- void MeEncoderOnBoard::setPosPid(float p,float i,float d);
- void MeEncoderOnBoard::setPulse(int16_t pulseValue);
- void MeEncoderOnBoard::setRatio(float RatioValue);
- void MeEncoderOnBoard::setMotionMode(int16_t motionMode);
- int16_t MeEncoderOnBoard::pidPositionToPwm(void);
- int16_t MeEncoderOnBoard::speedWithoutPos(void);
- void MeEncoderOnBoard::encoderMove(void);
- void MeEncoderOnBoard::pwmMove(void);
- boolean MeEncoderOnBoard::isTarPosReached(void);
- void MeEncoderOnBoard::loop(void);
- History:
`<Author>` `<Time>` `<Version>` `<Descr>`
Mark Yan 2015/12/15 1.0.0 Build New
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.
Mark Yan 2018/01/03 1.0.4 add callback flag.