Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing the I2C address - pretty sure I'm doing something wrong. #3

Open
Greenburger121 opened this issue Mar 23, 2021 · 0 comments
Open

Comments

@Greenburger121
Copy link

I'm really sorry but after 6 hours of searching the interwebs I've given up and would like to ask for some help.

I have an INA219, both INA219 and INA260 use the same I2C address, so I've soldered the A0 closed, which now gives me 41 as the address (hex 0x29 - right?)

Then I had to change the .py files slightly - I presume?

I've changed both the line 5 within INA260_MINIMAL.py to be:
_INA260_DEVICE_ADDRESS = 0x29

As well as line 8 in my INA260Grafana.py (your ina260_logging_example.py) to be
ina260 = INA260(dev_address=0x29);

The 0x29 values have also been changed to 0x41, 0x45 and other numbers I thought to test. So the error that I get is:

image

I've tried multiple different examples but yours seems to be closest to what I would need - the ability to change the address on the software itself.

Output from sudo i2cdetect -y 1 is:
image

I've started testing this on rpi zero, currently this has no other sensors connected, it worked fine with the example script from (https://learn.adafruit.com/adafruit-ina260-current-voltage-power-sensor-breakout/python-circuitpython)
... before I changed the i2c address that is.

Any help would be HUGELY appreciated! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant