Page 1 of 1

[Lego 51515] Lego 51515 ubluetooth to Arduino

Posted: Sat Feb 27, 2021 1:59 pm
by osullivp
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.

Re: [Lego 51515] Lego 51515 ubluetooth to Arduino

Posted: Thu Apr 08, 2021 5:22 am
by hmikelee
Dear Paul,

Thank you for your post. very inspiring example.

I am trying to link a jetson nano board to Lego 51515 and encountered a very unique problem.

When using terminal emulation and bluetooth on jetson nano board, I can talk to 51515 and ask it to execute commands in raw REPL mode. But when I use pyboard.py to talk to 51515. The same python script can only be executed partially, ie. only some python were executed properly but most of the python calls related to motor functions will have no error response but nothing moved.

I wonder if you can help to point me to some trouble shooting directions

Thank you very much for your help.

hmikelee

Re: [Lego 51515] Lego 51515 ubluetooth to Arduino

Posted: Fri Apr 09, 2021 8:29 pm
by osullivp
Hi hmikelee,

Thanks for your note. I'm not familiar with the Jetson Nano but by coincidence I was at one point going to use it instead of the Arduino to talk to the Lego 51515 hub.

I found this GitHub project which maybe of use to you:

https://github.com/beemsoft/lego-mindst ... etson-nano

Hope that helps!

Paul.