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

pcf8591read example ignores address parameter #47

Open
lurch opened this issue Apr 29, 2013 · 0 comments
Open

pcf8591read example ignores address parameter #47

lurch opened this issue Apr 29, 2013 · 0 comments

Comments

@lurch
Copy link

lurch commented Apr 29, 2013

quick2wire-python-api/examples/pcf8591read reads the optional first command line argument into a variable named 'address', but this variable isn't then used anywhere else!
The fix is to replace:
adc = PCF8591(i2c, FOUR_SINGLE_ENDED)
with:
adc = PCF8591(i2c, FOUR_SINGLE_ENDED, address)

I haven't checked to see if a similar bug affects any of the other examples.

Once this bug has been fixed, then http://quick2wire.com/testing-the-i2c-analogue-board-part-2/ (and its screenshot) will need to be updated to use ./pcf8591read 72 1 since 48 in hex is 72 in decimal.

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