Driver for Me Stepper device.
More...
#include <src/MeStepper.h>
Driver for Me Stepper device.
Class: MeStepper
- Description
- Declaration of Class MeStepper.
- Copyright (C), 2012-2016, MakeBlock
◆ MeStepper() [1/2]
Alternate Constructor which can call your own function to map the stepper to arduino port, no pins are used or initialized here.
- Parameters
-
◆ MeStepper() [2/2]
| MeStepper::MeStepper |
( |
uint8_t |
port | ) |
|
Alternate Constructor which can call your own function to map the stepper to arduino port, the slot2 pin will be used here since specify slot is not be set.
- Parameters
-
| [in] | port | - RJ25 port from PORT_1 to M2 |
◆ computeNewSpeed()
| void MeStepper::computeNewSpeed |
( |
| ) |
|
|
protected |
- Function
- computeNewSpeed
- Description
- Compute New Speed of Stepper.
- Parameters
-
- Output
- None
- Return
- None
- Others
- None
◆ currentPosition()
| long MeStepper::currentPosition |
( |
| ) |
|
- Function
- currentPosition
- Description
- Stepper's current position.
- Parameters
-
- Output
- None
- Return
- Return the current position of Stepper.
- Others
- None
◆ distanceToGo()
| long MeStepper::distanceToGo |
( |
| ) |
|
- Function
- distanceToGo
- Description
- The distance that Stepper should go.
- Parameters
-
- Output
- None
- Return
- Return the length of Stepper's running.
- Others
- None
◆ move()
| void MeStepper::move |
( |
long |
relative | ) |
|
- Function
- move
- Description
- Stepper moves to the aim.
- Parameters
-
| [in] | relative | - The relative length to Stepper's movement. |
- Output
- None
- Return
- None
- Others
- None
◆ moveTo()
| void MeStepper::moveTo |
( |
long |
absolute | ) |
|
- Function
- moveTo
- Description
- Stepper moves to the aim.
- Parameters
-
| [in] | absolute | - The absolute length to Stepper's movement. |
- Output
- None
- Return
- None
- Others
- None
◆ run()
| boolean MeStepper::run |
( |
| ) |
|
- Function
- run
- Description
- Stepper's status-—run or not.
- Parameters
-
- Output
- None
- Return
- Return the status.
- Others
- None
◆ runSpeed()
| boolean MeStepper::runSpeed |
( |
| ) |
|
- Function
- runSpeed
- Description
- The speed of Stepper's running.
- Parameters
-
- Output
- None
- Return
- Return true or false.
- Others
- None
◆ runSpeedToPosition()
| boolean MeStepper::runSpeedToPosition |
( |
| ) |
|
- Function
- runSpeedToPosition
- Description
- The speed of Stepper on the way to position.
- Parameters
-
- Output
- None
- Return
- Return true or false.
- Others
- None
◆ runToNewPosition()
| void MeStepper::runToNewPosition |
( |
long |
position | ) |
|
- Function
- runToNewPosition
- Description
- The Stepper runs to new position.
- Parameters
-
- Output
- None
- Return
- None
- Others
- None
◆ runToPosition()
| void MeStepper::runToPosition |
( |
| ) |
|
- Function
- runToPosition
- Description
- Stepper runs to position.
- Parameters
-
- Output
- None
- Return
- None
- Others
- None
◆ setAcceleration()
| void MeStepper::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 MeStepper::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 MeStepper::setMaxSpeed |
( |
float |
speed | ) |
|
- Function
- setMaxSpeed
- Description
- Set Max Speed for Stepper.
- Parameters
-
- Output
- None
- Return
- None
- Others
- None
◆ setpin()
| void MeStepper::setpin |
( |
uint8_t |
dir_data, |
|
|
uint8_t |
step_data |
|
) |
| |
- Function
- setpin
- Description
- Set pin for Stepper.
- Parameters
-
| [in] | dir_data | - The direction data of Stepper's movement. |
| [in] | step_data | - The command data for Stepper. |
- Output
- None
- Return
- None
- Others
- None
◆ setSpeed()
| void MeStepper::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 MeStepper::speed |
( |
| ) |
|
- Function
- speed
- Description
- The Speed of Stepper.
- Parameters
-
- Output
- None
- Return
- Return the Stepper's speed.
- Others
- None
◆ step()
- Function
- step
- Description
- Stepper runs step by step.
- Parameters
-
- Output
- None
- Return
- None
- Others
- None
◆ targetPosition()
| long MeStepper::targetPosition |
( |
| ) |
|
- Function
- targetPosition
- Description
- Stepper goes to target position.
- Parameters
-
- Output
- None
- Return
- Return the position of Stepper.
- Others
- None
The documentation for this class was generated from the following files: