Skip to content

pcf8591read example ignores address parameter #47

Description

@lurch

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions