Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/damdo/i2c-scanner
- Owner: damdo
- License: apache-2.0
- Created: 2024-02-02T15:07:20.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-09-05T07:58:35.000Z (4 months ago)
- Last Synced: 2024-10-12T13:18:04.436Z (2 months ago)
- Topics: go, gokrazy, golang, i2c
- Language: Go
- Homepage:
- Size: 21.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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-scannerI2C 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