Skip to content

Commit

Permalink
i2c: example of using optional params
Browse files Browse the repository at this point in the history
Signed-off-by: deadprogram <[email protected]>
  • Loading branch information
deadprogram committed Feb 10, 2017
1 parent ace49b2 commit 74d9dc4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/i2c/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,11 @@ Gobot has a extensible system for connecting to hardware devices. The following
- Wii Nunchuck Controller

More drivers are coming soon...

## Using A Different Bus or Address

You can set a different I2C address or I2C bus than the default when initializing your I2C drivers by using optional parameters. Here is an example:

```go
blinkm := i2c.NewBlinkMDriver(e, i2c.WithBus(0), i2c.WithAddress(0x09))
```

0 comments on commit 74d9dc4

Please sign in to comment.