I connected my TSL2591: VIN to 3v, GND to GND, SCL to SCL, SDA to SDA.
This is the logcat:
08/21 09:24:45: Launching 'app' on Google iot_rpi3.
App restart successful without requiring a re-install.
$ adb shell am start -n "hr.unipu.mydriver_tsl2591/hr.unipu.mydriver_tsl2591.TSL2591SensorDriver" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Connected to process 1626 on device 'google-iot_rpi3-Android.local:5555'.
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
I/FirebaseApp: Device unlocked: initializing all Firebase APIs for app [DEFAULT]
I/FirebaseInitProvider: FirebaseApp initialization successful
W/System.err: com.google.android.things.pio.PioException: android.os.ServiceSpecificException: I/O error (code 5)
W/System.err: at com.google.android.things.pio.I2cDeviceImpl.readRegByte(I2cDeviceImpl.java:86)
W/System.err: at hr.unipu.mydriver_tsl2591.TSL2591.checkConnection(TSL2591.kt:169)
at hr.unipu.mydriver_tsl2591.TSL2591.<init>(TSL2591.kt:44)
W/System.err: at hr.unipu.mydriver_tsl2591.TSL2591SensorDriver.onCreate(TSL2591SensorDriver.java:39)
W/System.err: at android.app.Activity.performCreate(Activity.java:7010)
at android.app.Activity.performCreate(Activity.java:7001)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
W/System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
W/System.err: at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
W/System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
W/System.err: Caused by: android.os.ServiceSpecificException: I/O error (code 5)
W/System.err: at android.os.Parcel.readException(Parcel.java:2027)
at android.os.Parcel.readException(Parcel.java:1959)
W/System.err: at com.google.android.things.pio.IPeripheralManagerClient$Stub$Proxy.I2cReadRegByte(IPeripheralManagerClient.java:1301)
at com.google.android.things.pio.I2cDeviceImpl.readRegByte(I2cDeviceImpl.java:84)
... 16 more
D/NetworkSecurityConfig: No Network Security Config specified, using platform default
D/vndksupport: Loading /vendor/lib/hw/android.hardware.graphics.mapper@2.0-impl.so from current namespace instead of sphal namespace.
i2cdetect
if the interface is enabled and the device is connected to the i2c bus it should show up in the output ofi2cdetect -y 1