Thank you for pointing out the problem with my motor control routine. That was not something that I would have considered with my current experience level. I change the code as per your suggestion.
So change those lines to :
Code:
Extending = false;
That hasn't changed the behavior of the actuator. It still moves past the goalPosition without stopping. It seems to be acting like a While loop. While (incomingByte == 'B') // nothing else will happen until another Byte is registered on the serial monitor, be it 'A' or 'S' or another 'B'. Or could there still be an error I've missed around the code you've adjusted for me? Thank you for that by the way.
if (Extending == true && CurrentPosition > goalPosition ){
//we have reached our goal, shut the relays off
actuatorStop();
Extending = false;
Serial.println("IDLE");
}
I just can't see it though. Frustrating.