.cargo | ||
src | ||
.gitignore | ||
build.rs | ||
Cargo.lock | ||
Cargo.toml | ||
deny.toml | ||
flake.lock | ||
flake.nix | ||
LICENSE | ||
memory.x | ||
README.md | ||
rust-toolchain.toml |
nRF52840 DK I2C Scanner
Quick and simple program to scan for used I2C addresses on an nRF52840 DK.
Setup
Connect I2C as follows:
GND -> GND
VCC -> VDD
SDA -> P0.03
SCL -> P0.04
Software
Either use nix and enter the dev shell with
nix develop
or ensure that at least the following is installed:
Attach the dev-kit with USB, turn it on and run probe-rs list
to verify the
connection. It should show something akin to the following:
The following debug probes were found:
[0]: J-Link (J-Link) (VID: 1366, PID: 1051, Serial: 001050288663, JLink)
Run cargo run
to compile the software and flash it. The resulting output will
tell you at which addresses I2C devices were found.
Example output with a device at 0x27
0.014221 INFO i2c device at 0x27