Header for MeEncoderNew.cpp module.
More...
#include <Arduino.h>
#include <stdbool.h>
#include "MeConfig.h"
#include "MePort.h"
Go to the source code of this file.
|
|
#define | LEONARDO_PORT1 |
| |
|
#define | SDA_PORT PORTB |
| |
|
#define | SDA_PIN 7 |
| |
|
#define | SCL_PORT PORTB |
| |
|
#define | SCL_PIN 4 |
| |
|
#define | I2C_SLOWMODE 1 |
| |
|
#define | PULSE_PER_C 8 |
| |
Header for MeEncoderNew.cpp 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