Arduino_EMBRYO_2 - getTotalSteps()

Returns the total steps count of the motor in the robot axis. The total steps is initialized with 0 and assigned with the correct number of steps during the homing procedure.

Syntax

axis.getTotalSteps()

Returns

The maximum step count allowed for the motor.

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("Total steps initial: " + String(axis.getTotalSteps()));
  axis.homing();
  Serial.println("Total steps after homing procedure: " + String(axis.getTotalSteps()));
}
void loop() {}

See also