Program a Serial Sensor on Arduino MKR WiFi 1010

Hello,

I am having some serious problems trying to program a TFMini sensor on a MKR WiFi 1010. I tried adapting the code from a Software Serial from An Arduino Uno example, an I2C slave example but it's still not working. This is my first trying to program things, if a sesnor is compatible with Arduino Uno it means it can be adpated to other boards, eg. MKR WiFi 1010?.

I am completely lost right now.