A nightmare with I2C serial link, especially with onReceive

Great, good luck and see if you can get this to work.

About the grey block thing: just on top of the post textbox, there's this little icon that says '</>'. You can paste your code, select it and then press that icon. The code will then be displayed (more or less) correctly in terms of formatting.