Arduino_EMBRYO_2 - getLength()

Gets the length of the robot axis in centimeters.

Syntax

axis.getLength()

Returns

The maximum length of the liner axis in centimeters.

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.setLenght(45);
  int length = axis.getLenght();
  Serial.println("Length: " + String(length));
}
void loop() {}

See also