Send anlog input into 6 bytes overs I2C

Hi BLH64 !

Thanks in advance from your help!

With remainder "%" I found a sketch which use it and realized 4 cut ,from thousand to unit of my analog input

The serial monitor display the 4 cut of 0 to 1023 into 1 0 2 3 ( four bytes) .

And can display my four bytes into HEX byte with the function HEX with the code :

"Serial.print(analogInput, HEX);"

But

This is with the I2C communication where I have some problem ,in particularly to convert the value into HEX value

Like Serial.print ,I tryed that :

"Wire.write(analogInput, HEX);"

Without any success > Error code

I'm tested different code to convert directly a decimal value from my analog into hex value on I2C ,but I'm so stopped now .

If you have any idea ,thanks in advance