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

Also, does the slave give the numeric value 0 (0b00000000) or the character '0' (0b00110000)

And you should put a Serial.print() in the code to show you what is actually received - maybe the 0 (or '0') is not being received.

...R