Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/damdo/i2c-scanner

i2c bus scanner for linux, in pure Go
https://github.com/damdo/i2c-scanner

go gokrazy golang i2c

Last synced: about 1 month ago
JSON representation

i2c bus scanner for linux, in pure Go

Awesome Lists containing this project

README

        

## i2c-scanner
I2C bus scanner for linux.
Written in pure Go, can be compiled to a static binary without dependencies.

### installation
```
go install github.com/damdo/i2c-scanner@latest
```

### usage
```
i2c-scanner
```

the output will look similar to this:
```
$ i2c-scanner

I2C buses available:
- name: /dev/i2c-0
number: 0
aliases: I2C0
pins:
* SDA: I2C0_SDA(GPIO0)
* SCL: I2C0_SCL(GPIO1)

- name: /dev/i2c-1
number: 1
aliases: I2C1
pins:
* SDA: I2C1_SDA(GPIO2)
* SCL: I2C1_SCL(GPIO3)

- name: /dev/i2c-2
number: 2
aliases: I2C2
pins:
* SDA: INVALID
* SCL: INVALID

- name: /dev/i2c-3
number: 3
aliases: I2C3
pins:
* SDA: INVALID
* SCL: INVALID
```

### credits

Code heavily inspired by: https://pkg.go.dev/periph.io/x/periph/conn/i2c