Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Copy link
Copy link
@gustavovelascoh

Description

@gustavovelascoh
Issue body actions

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)))

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.