Arduino_EMBRYO_2 - ready()

Returns a boolean value that indicates if the motor is ready.

Syntax

axis.ready()

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 the Start Button to start the machine");
  while(!axis.ready());  // Wait for Start button to be pressed
                         // The start button is attached to the interrupt
                         // service routine that enables the motor and runs
                         // the homing procedure
  axis.moveSteps(50);    // Motor 50 steps
}
void loop() {}

See also