Ozeki Matrix Stepper Motor Control Code
Stepper motors are the most precise motors available. You can order them to move exactly 1.8/16 = 0.1125 degrees/step in each direction. Although this can depend on the motortype. These orders are given out in the form of PWM signals. These signals are square signal. You can read more about PWM on the internet. Everytime the signal jumps to HIGH state the motor turns a step. Our stepper motor devicehandler can control multiple stepper motors simultaneously. It is also capable to handle two endstops for each motor, which are capable to keep the motors moving between a minimum and maximum range.
Required hardware
- Ozeki Stepper Motor Controller Module
- Stepper Motors (4)
- Stepper Motor Drivers (4)
- Micro Switches (5)
- Power Supply (1)
Source code to install on controller
Before you upload this code to your Arduino, please format the EEPROM...
#include <OzIDManager.h> #include <OzMotorMultiController.h> OzIDManager* manager; OzMotorMultiController* motorController; void setup() { Serial.begin(115200); manager = new OzIDManager; manager->_sendACK = true; manager->_checksum = true; OzCommunication::setIDManager(manager); motorController = new OzMotorMultiController(PinPreset::RAMPS_v14); int x=1; manager->sendLinkSetup(); manager->PrintWelcomeLine(motorController, x++, "MyStepperMotors"); } void loop() { OzCommunication::communicate(); motorController->ownLoop(); }
More information