-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7a3708b
commit 4cc2430
Showing
1 changed file
with
59 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,60 @@ | ||
# Benchmark documentation... | ||
Simple multi-platform I2C scan utility available on Linux devices, AVR, and STM platforms. | ||
# I2C Scan | ||
Simple I2C utility for scanning addresses on a given bus just like i2cdetect from [i2c-tools](https://git.kernel.org/pub/scm/utils/i2c-tools/i2c-tools.git/) | ||
but with a different approach. This utility was created from some issues I ran into with i2cdetect's | ||
inability to detect all addresses on a given bus, in this utility we write to each address on a | ||
given bus to determine if is alive therefore available for communication. | ||
|
||
TODO | ||
# Usage | ||
```bash | ||
$ i2cscan -h | ||
|
||
Available options: | ||
-h help | ||
-v version | ||
-l lists all available I2C busses | ||
-f fetch all busses & available addresses | ||
-b [BUS] specify I2C bus | ||
-a scan all addresses | ||
-r [FIRST-LAST] scan addresses between FIRST & LAST (int) | ||
** For MCUs ** | ||
-mmcu= [MCU] | ||
Supported MCUs : | ||
- atmega328 | ||
- atmega2560 | ||
-dev [DEVICE] | ||
``` | ||
|
||
* Scan I2C bus `/dev/i2c-1` for any available addresses: | ||
```bash | ||
$ i2cscan -b 1 -a | ||
Scanning all addresses 0 to 127 | ||
Found device at I2C address 0x28 | ||
Found device at I2C address 0x29 | ||
Found device at I2C address 0x53 | ||
Found device at I2C address 0x68 | ||
Found device at I2C address 0x76 | ||
``` | ||
* Scan I2C bus `/dev/i2c-1` for addresses between 0x28(40) - 0x2a(42): | ||
```bash | ||
$ i2cscan -b 1 -r 40-42 | ||
Scanning all addresses 40 to 42 | ||
Found device at I2C address 0x28 | ||
Found device at I2C address 0x29 | ||
``` | ||
|
||
# Installation | ||
## Linux Dependencies | ||
* gcc | ||
|
||
## AVR dependencies | ||
* avr-libc | ||
* gcc-avr | ||
* binutils-avr | ||
* avrdude | ||
|
||
``` | ||
# install | ||
$ sudo make install | ||
# uninstall | ||
$ sudo make uninstall | ||
``` |