Wire.write() comes in two versions.
-
Wire.write(val) which converts 'val' to an unsigned 8 bit value and transmits it. This is what you are using, so you are sending 1 byte
-
Wire.write( array, size) which sends 'size' bytes of data from 'array'. This is what you should be using.