Skip to content

I2C initialize problem #2

@narise77

Description

@narise77
-        Field f = this.i2c.getClass().getDeclaredField("fd");
-        f.setAccessible(true);
-        this.fd = f.getInt(this.i2c);

+      this.fd = I2C.wiringPiI2CSetup(address);
+      if ( this.fd == -1 ){
+       	throw new IOException("Unable to open device at address: " + address);
+      }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions