Hello Friends,
I created a awesome pice of code, where I can control my Spike Prime / Mindstorms Hub with the Lego Powered UP Remote Control 88010.
How does it work:
The BLE lib is scanning for devices and services, parsing the meta data from this devices.
If the identifier of the Remote is found, the BLE is trying to connect. After a successfully connection, the hub is subscribing the remote (for notification). After that, the hub must send some specific bytes to enable the remote's input and notification service for button press.
Big help was the documentation of the Lego Wireless Protocol 3.0
[ Ссылка ]
For every button press a different dot it light up on the Lego hub. Source code can be found here in my Github repo:
[ Ссылка ]
Happy Coding :)
Ещё видео!