Arduino_EMBRYO_2 - moveForward()

Rotates motor in clockwise direction and pulses the motor one half step. Moves the robot carriage farther from motor home.

Syntax

axis.moveForward()

Example

#include <Arduino_EMBRYO_2.h>

StepMotor axis(1, A5, 5, 6, 3, 4, A2, A1, 2, 12);

void setup() {
  Serial.begin(9600);
  while (!Serial) {};
  axis.begin();
  Serial.println("Press Init Button to start the machine");
  while(!axis.ready()); // Wait for Init button to be pressed
}
void loop() {
  if(axis.readBtnForward()) axis.moveForward();
  if(axis.readBtnBackward()) axis.moveBackward();
}

See also