[Lego 51515] Lego 51515 ubluetooth to Arduino
Posted: Sat Feb 27, 2021 1:59 pm
Hi all,
I've been working on a project to develop an object detection capability for my Lego Mindstorms 51515 robot.
Looking at various options I decided to use the ArdObjectTracker Android app to provide the object detection functionality. However, this generates a stream of object detection data over Bluetooth Classic whereas the Lego 51515 hub uses BluetoothLE.
I therefore built a Bluetooth Classic to BluetoothLE bridge using an Arduino Micro, an HC-05 and HM-10 Bluetooth modules. However, getting the Lego 51515 hub to speak to the Arduino board using the MicroPython ubluetooth module was challenging as this is not currently documented in the official MicroPython docs in the Lego 51515/Spike Prime apps. Note that currently the Lego 51515 hub needs to be flashed with the Spike Prime firmware in order to gain access to the ubluetooth module.
I am sharing the full code to the solution in the hope that this can help others wanting to use the Lego 51515/Spike Prime ubluetooth functionality to integrate with external devices. Here is the link to the GitHub repo:
https://github.com/osullivp/Lego51515BL ... ensorFlow
Also, here is a video of the robot in action:
https://www.youtube.com/watch?v=QxI5LIQsAGA
Any questions, please shout!
Regards,
Paul.
I've been working on a project to develop an object detection capability for my Lego Mindstorms 51515 robot.
Looking at various options I decided to use the ArdObjectTracker Android app to provide the object detection functionality. However, this generates a stream of object detection data over Bluetooth Classic whereas the Lego 51515 hub uses BluetoothLE.
I therefore built a Bluetooth Classic to BluetoothLE bridge using an Arduino Micro, an HC-05 and HM-10 Bluetooth modules. However, getting the Lego 51515 hub to speak to the Arduino board using the MicroPython ubluetooth module was challenging as this is not currently documented in the official MicroPython docs in the Lego 51515/Spike Prime apps. Note that currently the Lego 51515 hub needs to be flashed with the Spike Prime firmware in order to gain access to the ubluetooth module.
I am sharing the full code to the solution in the hope that this can help others wanting to use the Lego 51515/Spike Prime ubluetooth functionality to integrate with external devices. Here is the link to the GitHub repo:
https://github.com/osullivp/Lego51515BL ... ensorFlow
Also, here is a video of the robot in action:
https://www.youtube.com/watch?v=QxI5LIQsAGA
Any questions, please shout!
Regards,
Paul.