MakeBlock Drive Updated Updated library for MakeBlock Ranger

Loading...
Searching...
No Matches
MeEncoderMotor.h
Go to the documentation of this file.
1
49#ifndef MeEncoderMotor_h
50#define MeEncoderMotor_h
51
52#include <stdbool.h>
53#include "MeConfig.h"
54#include "MePort.h"
55
57 class MeEncoderMotor: public MePort{
58 public:
67 MeEncoderMotor(uint8_t addr,uint8_t slot);
68
75 MeEncoderMotor(uint8_t slot);
76
83 MeEncoderMotor();
84
99 void begin();
100
115 boolean reset();
116
133 boolean move(float angle, float speed);
134
151 boolean moveTo(float angle, float speed);
152
169 boolean runTurns(float turns, float speed);
170
185 boolean runSpeed(float speed);
186
203 boolean runSpeedAndTime(float speed, float time);
204
219 float getCurrentSpeed();
220
235 float getCurrentPosition();
236
237 private:
258 void request(byte *writeData, byte *readData, int wlen, int rlen);
259
260 uint8_t _slot;
261 uint8_t _slaveAddress;
262 unsigned long _lastTime;
263};
264#endif
MeConfig.h
Configuration file of library.
MePort.h
Header for MePort.cpp module.
MeEncoderMotor
Class for Encoder Motor Driver.
Definition MeEncoderMotor.h:57
MeEncoderMotor::moveTo
boolean moveTo(float angle, float speed)
Definition MeEncoderMotor.cpp:242
MeEncoderMotor::move
boolean move(float angle, float speed)
Definition MeEncoderMotor.cpp:287
MeEncoderMotor::getCurrentPosition
float getCurrentPosition()
Definition MeEncoderMotor.cpp:474
MeEncoderMotor::getCurrentSpeed
float getCurrentSpeed()
Definition MeEncoderMotor.cpp:440
MeEncoderMotor::reset
boolean reset()
Definition MeEncoderMotor.cpp:208
MeEncoderMotor::runTurns
boolean runTurns(float turns, float speed)
Definition MeEncoderMotor.cpp:335
MeEncoderMotor::MeEncoderMotor
MeEncoderMotor()
Definition MeEncoderMotor.cpp:168
MeEncoderMotor::runSpeedAndTime
boolean runSpeedAndTime(float speed, float time)
Definition MeEncoderMotor.cpp:399
MeEncoderMotor::begin
void begin()
Definition MeEncoderMotor.cpp:188
MeEncoderMotor::runSpeed
boolean runSpeed(float speed)
Definition MeEncoderMotor.cpp:354
MePort
Port Mapping for RJ25.
Definition MePort.h:128