Skip to content

Replacing busio.I2C writeto() and readfrom_into() with combined writeto_then_readfrom #2

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

Merged
merged 1 commit into from
Dec 9, 2020

Conversation

kevinjwalters
Copy link

@kevinjwalters kevinjwalters commented Dec 9, 2020

This is a simple replacement of two i2c methods with the combined writeto_then_readfrom(). This is required for CircuitPython 6.x due to changes in API, see #1.

This is compatible with the two current production releases 5.3.x and 6.x but not the older ones.

I have mpy-cross compiled this and tested in on a Feather nRF52840 Express running 6.0.0 and Enviro+ FeatherWing and it works fine.

…to_then_readfrom() to make this work with CircuitPython 6.x (and 5.3.x) pimoroni#1
@Gadgetoid
Copy link
Member

Thank you! This is hugely useful- right now I'm on the cusp of moving into limbo between two houses so I've had to drastically cut down the projects I'm juggling. As such I'm flying by the seat of my pants and have merged this without verifying! God speed.

Thanks again!

@kevinjwalters
Copy link
Author

You're welcome.

Do you have any imminent plans to update the submodules and do a new release of https://github.com/pimoroni/EnviroPlus-FeatherWing ?

I'm crafting a simple Instructables guide on how to use the Feather nRF52840 with the Enviro+ FeatherWing to help some friends et al. put them together, hence the interest.

@dglaude
Copy link

dglaude commented Dec 10, 2020

Update of the EnviroPlus-FeatherWing repo is much needed. If you do your instructable guide, please link to it with an issue, this will help waiting for a rework to use all the new library.

I think that all the replacement library are available and included in the library bundle or the community bundle.
But the API are not always the same, so some work is needed to properly document the process and rewrite the example. Any verification and confirmation that everything works and is in place is welcome.
Last time I checked I did run/test everything on an M4 and it is documented in one of the issue.
But it should not be a problem anymore to use another MCU, it just require to specify the pin to use.

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

Successfully merging this pull request may close these issues.

3 participants