Just add another statement to check if your loop is about to set your motor to a power you don’t want it to like I did below
If (new motor power < minimum){
Set new motor power to the minimum.
}
Just add another statement to check if your loop is about to set your motor to a power you don’t want it to like I did below
If (new motor power < minimum){
Set new motor power to the minimum.
}