condition = true but do...while loop does not end

Thx TomGeorge. Stupdid mistake i didn't spot. I had declared the variable in the setup, but did it again in inside the inner while loop. That made it not function. Problem solved! Thx a lot!

TomGeorge:
Hi
Does the whole code compile?

You have declared the variable
int status_slave inside { },
so it is local to the code inside the { }

but you are using it outside the { } in the while command.

I think you should be declaring status_slave as a global variable.

Tom... :slight_smile: