Driver for Me Stepper on MegaPi.
More...
#include <src/MeStepperOnBoard.h>
Driver for Me Stepper on MegaPi.
Class: MeStepperOnBoard
- Description
- Declaration of Class MeStepperOnBoard.
- Copyright (C), 2012-2016, MakeBlock
◆ MeStepperOnBoard() [1/2]
| MeStepperOnBoard::MeStepperOnBoard |
( |
| ) |
|
Alternate Constructor which can call your own function to map the stepper to arduino port, no pins are used or initialized here.
- Parameters
-
◆ MeStepperOnBoard() [2/2]
| MeStepperOnBoard::MeStepperOnBoard |
( |
int |
slot | ) |
|
Alternate Constructor which can call your own function to map the stepper to arduino port.
- Parameters
-
| [in] | slot | - The slot of MegaPi boards. |
Alternate Constructor which can call your own function to map the stepper to arduino port.
- Parameters
-
| [in] | slot | - The slot of megapi boards. |
◆ computeNewSpeed()
| void MeStepperOnBoard::computeNewSpeed |
( |
void |
| ) |
|
|
protected |
- Function
- computeNewSpeed
- Description
- Compute New Speed of Stepper.
- Parameters
-
- Output
- None
- Return
- None
- Others
- None
◆ currentPosition()
| long MeStepperOnBoard::currentPosition |
( |
void |
| ) |
|
- Function
- currentPosition
- Description
- Stepper's current position.
- Parameters
-
- Output
- None
- Return
- Return the current position of Stepper.
- Others
- None
◆ disableOutputs()
| void MeStepperOnBoard::disableOutputs |
( |
void |
| ) |
|
- Function
- disableOutputs
- Description
- The Stepper disable the outputs.
- Parameters
-
- Output
- None
- Return
- None
- Others
- None
◆ distanceToGo()
| long MeStepperOnBoard::distanceToGo |
( |
void |
| ) |
|
- Function
- distanceToGo
- Description
- The distance that Stepper should go.
- Parameters
-
- Output
- None
- Return
- Return the length of Stepper's running.
- Others
- None
◆ enableOutputs()
| void MeStepperOnBoard::enableOutputs |
( |
void |
| ) |
|
- Function
- enableOutputs
- Description
- The Stepper disable the outputs.
- Parameters
-
- Output
- None
- Return
- None
- Others
- None
◆ getPort()
| int16_t MeStepperOnBoard::getPort |
( |
void |
| ) |
|
- Function
- getPort
- Description
- get the slot number of the stepper.
- Parameters
-
- Output
- None
- Return
- The Slot number Stepper used.
- Others
- None
◆ move() [1/2]
| void MeStepperOnBoard::move |
( |
long |
relative | ) |
|
- Function
- move
- Description
- Stepper moves to the relative positions.
- Parameters
-
| [in] | relative | - The relative length to Stepper's movement. |
- Output
- None
- Return
- None
- Others
- None
◆ move() [2/2]
| void MeStepperOnBoard::move |
( |
long |
relative, |
|
|
int16_t |
extId, |
|
|
cb |
callback |
|
) |
| |
- Function
- move
- Description
- Stepper moves to the relative positions.
- Parameters
-
| [in] | relative | - The relative length to Stepper's movement. |
| [in] | extId | - It is used to indicate the ID of motor. |
| [in] | callback | - callback function when the target position has been reached. |
- Output
- None
- Return
- None
- Others
- None
◆ moveTo() [1/2]
| void MeStepperOnBoard::moveTo |
( |
long |
absolute | ) |
|
- Function
- moveTo
- Description
- Stepper moves to the absolute position.
- Parameters
-
| [in] | absolute | - The absolute length to Stepper's movement. |
- Output
- None
- Return
- None
- Others
- None
◆ moveTo() [2/2]
| void MeStepperOnBoard::moveTo |
( |
long |
absolute, |
|
|
int16_t |
extId, |
|
|
cb |
callback |
|
) |
| |
- Function
- moveTo
- Description
- Stepper moves to the absolute position.
- Parameters
-
| [in] | absolute | - The absolute length to Stepper's movement. |
| [in] | extId | - It is used to indicate the ID of motor. |
| [in] | callback | - callback function when the target position has been reached. |
- Output
- None
- Return
- None
- Others
- None
◆ run()
| boolean MeStepperOnBoard::run |
( |
void |
| ) |
|
- Function
- run
- Description
- Stepper's status-—run or not.
- Parameters
-
- Output
- None
- Return
- Return the status.
- Others
- None
◆ runSpeed()
| boolean MeStepperOnBoard::runSpeed |
( |
void |
| ) |
|
- Function
- runSpeed
- Description
- The speed of Stepper's running.
- Parameters
-
- Output
- None
- Return
- Return true or false.
- Others
- None
◆ runSpeedToPosition()
| boolean MeStepperOnBoard::runSpeedToPosition |
( |
void |
| ) |
|
- Function
- runSpeedToPosition
- Description
- The speed of Stepper on the way to position.
- Parameters
-
- Output
- None
- Return
- Return true or false.
- Others
- None
◆ runToNewPosition()
| void MeStepperOnBoard::runToNewPosition |
( |
long |
position | ) |
|
- Function
- runToNewPosition
- Description
- The Stepper runs to new position.
- Parameters
-
- Output
- None
- Return
- None
- Others
- None
◆ runToPosition()
| void MeStepperOnBoard::runToPosition |
( |
void |
| ) |
|
- Function
- runToPosition
- Description
- Stepper runs to position.
- Parameters
-
- Output
- None
- Return
- None
- Others
- None
◆ setAcceleration()
| void MeStepperOnBoard::setAcceleration |
( |
float |
acceleration | ) |
|
- Function
- setAcceleration
- Description
- Set Acceleration for Stepper.
- Parameters
-
| [in] | acceleration | - The acceleration for Stepper. |
- Output
- None
- Return
- None
- Others
- None
◆ setCurrentPosition()
| void MeStepperOnBoard::setCurrentPosition |
( |
long |
position | ) |
|
- Function
- setCurrentPosition
- Description
- Set Stepper's current position.
- Parameters
-
| [in] | position | - The current position for Stepper. |
- Output
- None
- Return
- Return the current position of Stepper.
- Others
- None
◆ setMaxSpeed()
| void MeStepperOnBoard::setMaxSpeed |
( |
float |
speed | ) |
|
- Function
- setMaxSpeed
- Description
- Set Max Speed for Stepper.
- Parameters
-
- Output
- None
- Return
- None
- Others
- None
◆ setMicroStep()
| void MeStepperOnBoard::setMicroStep |
( |
int8_t |
value | ) |
|
- Function
- setMicroStep
- Description
- Set the micro step.
- Parameters
-
| [in] | value | - the Subdivided value. |
- Output
- None
- Return
- None
- Others
- None
◆ setpin()
| void MeStepperOnBoard::setpin |
( |
int |
slot | ) |
|
- Function
- setpin
- Description
- Set pin for Stepper.
- Parameters
-
| [in] | slot | - The slot of MegaPi boards. |
- Output
- None
- Return
- None
- Others
- None
- Function
- setpin
- Description
- Set pin for Stepper.
- Parameters
-
| [in] | slot | - The slot of megapi boards. |
- Output
- None
- Return
- None
- Others
- None
◆ setSpeed()
| void MeStepperOnBoard::setSpeed |
( |
float |
speed | ) |
|
- Function
- setSpeed
- Description
- Set Speed for Stepper.
- Parameters
-
| [in] | speed | - The speed of Stepper. |
- Output
- None
- Return
- None
- Others
- None
◆ speed()
| float MeStepperOnBoard::speed |
( |
void |
| ) |
|
- Function
- speed
- Description
- The Speed of Stepper.
- Parameters
-
- Output
- None
- Return
- Return the Stepper's speed.
- Others
- None
◆ step()
| void MeStepperOnBoard::step |
( |
void |
| ) |
|
|
virtual |
- Function
- step
- Description
- Stepper runs step by step.
- Parameters
-
- Output
- None
- Return
- None
- Others
- None
◆ targetPosition()
| long MeStepperOnBoard::targetPosition |
( |
void |
| ) |
|
- Function
- targetPosition
- Description
- Stepper goes to target position.
- Parameters
-
- Output
- None
- Return
- Return the position of Stepper.
- Others
- None
◆ update()
| void MeStepperOnBoard::update |
( |
void |
| ) |
|
- Function
- update
- Description
- The Stepper loop function, used to move the stepper.
- Parameters
-
- Output
- None
- Return
- None
- Others
- None
The documentation for this class was generated from the following files: