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

Example in comments in i2c.py doesn't works (for me) #51

Open
gustavovelascoh opened this issue Mar 10, 2014 · 0 comments
Open

Example in comments in i2c.py doesn't works (for me) #51

gustavovelascoh opened this issue Mar 10, 2014 · 0 comments

Comments

@gustavovelascoh
Copy link

This example provided in comments of i2c.py does not works for me, appears a TypeError message:

"For example:

    from quick2wire.i2c import I2CMaster, writing

    with I2CMaster() as i2c:
        i2c.transaction(
            writing(0x20, bytes([0x01, 0xFF])))"

Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
TypeError: 'tuple' object is not callable

I have to change it to this for it to work:

For example:

    from quick2wire.i2c import I2CMaster, writing

    with I2CMaster() as i2c:
        i2c.transaction(
            writing(0x20, (0x01, 0xFF)))
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