diff --git a/Software/Java/src/com/dexterind/gopigo/components/Board.java b/Software/Java/src/com/dexterind/gopigo/components/Board.java index 67f3a283..3c07eafd 100644 --- a/Software/Java/src/com/dexterind/gopigo/components/Board.java +++ b/Software/Java/src/com/dexterind/gopigo/components/Board.java @@ -88,7 +88,14 @@ public Board() throws IOException, InterruptedException { busId = I2CBus.BUS_1; } - final I2CBus bus = I2CFactory.getInstance(busId); + I2CBus bus = null; + + try { + bus = I2CFactory.getInstance(busId); + } catch (Exception e) { + throw new IOException(e.getMessage()); + } + device = bus.getDevice(ADDRESS); } @@ -332,4 +339,4 @@ public int[] readStatus() throws IOException { return status_reg; } -} \ No newline at end of file +}