|
Loom 4 v4.5
Arduino library for Internet of Things Rapid Prototyping in environmental sensing
|
#include <Loom_Stepper.h>


Public Member Functions | |
| Loom_Stepper (Manager &man, int instance_num=0) | |
| Loom_Stepper (int instance_num=0) | |
| ~Loom_Stepper () | |
| void | control (JsonArray json) override |
| void | initialize () override |
| void | package (JsonObject json) override |
| void | moveSteps (const uint16_t steps, const uint8_t speed, const bool clockwise=true) |
Public Member Functions inherited from Actuator | |
| Actuator (ACTUATOR_TYPE actType, int instance) | |
| virtual void | initialize ()=0 |
| virtual void | package (JsonObject json)=0 |
| virtual void | control (JsonArray json)=0 |
| void | printModuleName (const char *message) override |
| const char * | getModuleName () override |
| const char * | typeToString () |
| int | get_instance_num () |
Public Member Functions inherited from Module | |
| Module (const char *modName) | |
| void | setModuleName (const char *modName) |
| virtual const char * | getModuleName () |
| virtual void | printModuleName (const char *message) |
| virtual void | initialize ()=0 |
| virtual void | measure ()=0 |
| virtual void | package ()=0 |
| virtual void | power_up ()=0 |
| virtual void | power_down ()=0 |
| virtual void | display_data () |
Additional Inherited Members | |
Public Attributes inherited from Module | |
| bool | moduleInitialized = true |
| int | module_address = -1 |
Protected Member Functions inherited from Actuator | |
| void | measure () override |
| void | power_up () override |
| void | power_down () override |
| void | package () override |
Stepper Motor Control for Max
| Loom_Stepper::Loom_Stepper | ( | Manager & | man, |
| int | instance_num = 0 |
||
| ) |
Construct a new
| Loom_Stepper::~Loom_Stepper | ( | ) |
Deconstructor to clean up motor controller pointers
|
overridevirtual |
Called when a packet is received that needs to move the actuator
| json | The parameters that can change |
Implements Actuator.
|
overridevirtual |
Implements Actuator.
| void Loom_Stepper::moveSteps | ( | const uint16_t | steps, |
| const uint8_t | speed, | ||
| const bool | clockwise = true |
||
| ) |
Move the motor a set number of steps forward
| steps | Number of steps to move |
| speed | The speed to move steps |
| clockwise | If we want to rotate clockwise or counter clockwise |
|
overridevirtual |
Implements Actuator.