Arduino Library for controlling Powered UP and Boost controllers
With this feature release the Super Mario Hub (Lego Set #71360) is supported. So hopefully you will like this small christmas gift 🎄 🎁
You can find an example implementation in the Mario.ino sketch
Thanks to @tthiery and @bricklife for their work to document the new Mario features: https://github.com/bricklife/LEGO-Mario-Reveng https://github.com/sharpbrick/docs/blob/master/hubs/mariohub.md
With this release the BLE scan function which is started with the hub.init()
call is no longer blocking the execution of the code. Now a callback is used and with this the non blocking way of scanning is enforced in the NimBLE-Arduino
library.
Thanks to @bjgz and @fvanroie for pointing me in the right direction
To use this feature you have nothing to do 😃 beside the update of the library to this version
With this bugfix release several minor and major bugs were fixed:
Thanks to all users who has again put in major contributions in this release 👏 !
With this bugfix release several minor and major bugs were fixed:
ColorStringFromColor
to convert a color or int value to a color string. This should now be used instead of directly using the COLOR_STRING arrayMoveHubDeviceInfo.ino
to fetch the HW and FW version of the hubI am very happy about all the feedback and contributions which take the library to that step. After over a year of learnings and feedback i have reworked the library to be more consistent and to make some things easier. Unfortunately this was not possible without breaking changes. This means some functions and methods has to be removed or renamed.
To make the migration of your sketches easier, just have a look into the Migration guide
setAbsoluteMotorPosition
, setAbsoluteMotorEncoderPosition
getHubName
log_d
, log_w
, log_xx
messages. Log levels could now be switched via the Arduino environmentI am very happy about the whole community who participates in that library and contributes with ideas and even code improvements via Pull request.
With this release the bug in fetching the hub type is fixed. Additionally the address of a connected hub could be fetched with the getHubAddress()
function
stopMotor
function to ControlPlusHubmyHub.init(2); // initializes the hub and connection parameters with 2 seconds scan duration
With this update the Arduino library manager will automatically inform about the dependent NimBLE-Arduino library
With this release version the underlying BLE library changed to the https://github.com/h2zero/NimBLE-Arduino library. This library is mainly compatible with the old BLE library but have the following benefits:
Additionally the support of Control+ Hubs are added with this release version
To connect to more than 3 devices you have to change the following settings:
Changed the setting in the /Users/<username>/Documents/Arduino/libraries/NimBLE-Arduino/src/nimconfig.h
file to #define CONFIG_BT_NIMBLE_MAX_CONNECTIONS 8
Changed the setting in the /Users/<username>/Library/Arduino15/packages/esp32/hardware/esp32/1.0.4/tools/sdk/include/config/sdkconfig.h
file to #define CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF 8
and #define CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN 8