I'm using a NodeMCU to control a solenoid through a relay. I need to stop this relay at any moment as na emergency stop, so I used the attachInterrupt function.
This is working and stopping the process at any time, but after 8 seconds the system restart and the process go on.
How can I fix this interrupt for a longer time then 8 seconds?
Someone could help me?
I'm using this function to interrupt:
void interrupt_back(){
restart_buttom = LOW;
lcd.setCursor(0,1);
lcd.print(" PARADA ");
while (restart_buttom == LOW){
restart_buttom = digitalRead(reset_pin);
Serial.print("Status do botão: ");
Serial.println(restart_buttom);
Serial.println("Emergência Acionada");
}
lcd.print(" ");
}