Returns the boolean value in the pin connected to the Emergency Stop Button. This button invokes the emergency stop ISR and the end() method.
axis.readBtnEmergencyStop()
The emergency stop button signal: LOW or HIGH.
#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("Emergency Stop button logic");
Serial.println("Not pressed: " + String(axis.readBtnEmergencyStop()));
Serial.println("Pressed: " + String(!axis.readBtnEmergencyStop()));
}
void loop() {}