MakeBlock Drive Updated Updated library for MakeBlock Ranger

Loading...
Searching...
No Matches
Classes | Macros
MeEncoderNew.h File Reference

Header for MeEncoderNew.cpp module. More...

`#include <Arduino.h>`
`#include <stdbool.h>`
`#include "MeConfig.h"`
`#include "MePort.h"`
Include dependency graph for MeEncoderNew.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Classes
class | MeEncoderNew
| Driver for Me Encoder New module. More...

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

## Detailed Description

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:

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