I2C communication is not working
Most coders would your while (1 &lt; Wire.available()) { write as while ( Wire.available() &gt; 1) { and read it "repeat while there is more the 1 byte available". but wait, why leave that one byte there? you want "repeat while there is no more byte available".

you need while (0 &lt; Wire.available())