Skip to content

Update to import options and examples #79

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 6 commits into from
Dec 17, 2019

Conversation

kattni
Copy link
Contributor

@kattni kattni commented Dec 17, 2019

THIS IS A BREAKING CHANGE FOR THE UPDATED EXAMPLES. ALL PREVIOUS CODE WILL CONTINUE TO WORK AS-IS.

REQUIRES LATEST CHANGES TO CIRCUITPYTHON TO USE ON CIRCUIT PLAYGROUND EXPRESS. 5.x support for using this updated library on CPX requires this PR: adafruit/circuitpython#2393 and there is a forthcoming PR for 4.x of the same nature that will be required to use the updated lib.

As this library is frozen into the CPX build, we will be doing a new release of 4.x once all the fixes are in. For now, this update doesn't affect the current 4.1.0 because the frozen library has not been updated yet.

  • You can now from adafruit_circuitplayground import cp and it will detect whether you are using a Circuit Playground Express or a Circuit Playground Bluefruit and import the appropriate library.

  • All examples have been updated to reflect this. THE EXAMPLES IN THIS REPO WILL NOW ONLY WORK WITH THE LATEST VERSION OF THE LIBRARY.

  • Both from adafruit_circuitplayground.express import cpx and from adafruit_circuitplayground.bluefruit import cpb still work, so all previous example code will continue to work with the updated library.

  • Updated doc strings to reflect changes - all references to CPX are now "Circuit Playground" to include the added Bluefruit support.

  • Added exception handling to the IR examples as the Bluefruit does not support IR.

Tested every example on Circuit Playground Bluefruit, Circuit Playground Express 5.x test build, and Circuit Playground Express 4.x test build.

@kattni kattni requested review from ladyada and dhalbert December 17, 2019 21:22
Copy link
Member

@ladyada ladyada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great work!

Copy link
Contributor

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I think the import change will be easier in the long run.

@dhalbert dhalbert merged commit 82ba9e4 into adafruit:master Dec 17, 2019
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Dec 18, 2019
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