Problem i2c with while loop

This is my go-to for I2C communication between boards (however I prefer to avoid example 2);

This is a basic tutorial on how to communicate through the serial UART interface (lots easier than I2C and works well bi-directionally);