d2r2 / go-i2c

Implementation of I2C-bus written in Golang. Forked from davecheney/i2c.
MIT License
176 stars 55 forks source link

Golang usage #13

Open blueisaak opened 3 years ago

blueisaak commented 3 years ago

Hi, I'am just starting with golang. But is the usage example correct? I can not find a function "Write" in i2c.go only a "write". Maybe "WriteBytes" is ment? Cheers Isaak ... // to and from device connected via I2C bus, like: _, err := i2c.Write([]byte{0x1, 0xF3}) ...

d2r2 commented 3 years ago

Hi @blueisaak! You right, there is no i2c.Write(...) function in the library, and this must be changed to i2c.WriteBytes(...). You can apply PR with the update, either I will do it some time later.

blueisaak commented 3 years ago

Hi @d2r2 I tried to do a PR but failed...

~/git/go-i2c$ git push --set-upstream origin fix_readme
Username for 'https://github.com': blueisaak
Password for 'https://blueisaak@github.com': 
remote: Permission to d2r2/go-i2c.git denied to blueisaak.