Cant run Uno`s code on Leonardo

Hello everybody,
I just was playing with my Leonardo today (after a few months break) and i wanted to run a code that i used on my UNO. The code uploaded with no problems, but its not working. I run it on Uno again and there was no problems. I uploaded a blink code on Leonardo and worked. The driver and the port are OK. The pins on Leonardo are working.

Thank you!
(sorry for bad English :slight_smile: )

code.txt (2.52 KB)

The I2C/TWI/Wire interface uses different pins on the Leonardo. See the Wire library reference:

Thank you!