Refactor to add support for Circuit Playground Bluefruit #74
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a complete refactor to include support for Circuit Playground Bluefruit. I have created a new bluefruit.py for the CPB and circuit_playground_base.py for all the common code. As well, I have included two new features into the
bluefruit
module:sound_level
andloud_sound
. These were desired features for theexpress
module but were never included due to memory constraints on the CPX, an issue not currently present on the CPB.There is no plan for this to be included in 4.x. There is no change to how the
express
module works which is what is included in 4.x, and therefore there is no reason to update the build.Once the BLE/CPB-specific CircuitPython code is finalised, I will look into what features should be added here. This refactor was done with that intent in mind.
Change log:
touch_A7
totouch_TX
in the base class to match the Bluefruit silk (No pad A7), and added alias toexpress
(CPX has both TX and A7 on the silk) so all current code continues to function the same. You can calltouch_A7
ortouch_TX
using theexpress
module.sound_level
andloud_sound
features tobluefruit
moduleExample use on Bluefruit:
Express usage has not changed.
I have attached a 5.x Circuit Playground Express CircuitPython build with this library frozen in - the
bluefruit
module is not included as it will not be included when this refactor is released. To test, double-tap the reset button on your Circuit Playground Express to enter the bootloader, and drag theCPX_refactor_build.uf2
to the CPLAYBOOT drive.CPX_refactor_build.uf2.zip