DA EN

LabVIEW drives a LEGO robot

LabVIEW · AI · LEGO

I had long wondered how I could connect LabVIEW to LEGO. It never happened – there simply wasn't time next to customer work.

Now I had a good reason. I wanted to test what a LabVIEW MCP server can do: how far do you get when AI writes the LabVIEW code itself? So I let AI write all of it.

If the video does not play here, you can watch it directly on YouTube.

What it does

The result is an open source LabVIEW library that controls LEGO Powered Up hubs over Bluetooth Low Energy. It runs motors, changes the hub light and reads the sensors. In the video it drives Vernie, the LEGO BOOST robot, from a LabVIEW panel. Vernie can drive, look around, shoot, and back away when you get too close, while the panel shows live distance, tilt, color and current.

How it was made

None of the code was written by hand. It started with two prompts: one for a LabVIEW wrapper around the LEGO controller interface, and one to turn it into a screen that is nice to work with. Since then it has gained more features and 221 automated tests.

The AI worked in LabVIEW through Zühlke's open source LabVIEW MCP server. A big thank you to the team behind it.

It works very well. Some aspects of the code style could still be better. But development has moved very fast over the past month, so I expect that to be sorted out soon too.

The code is written to be easy to read, because I hope to use it to teach my kids some programming with LabVIEW.

Try it

  • Works with the BOOST Move Hub, City Hub and Technic Hub
  • 8 examples – most run on a pretend hub, so you don't need any LEGO to start
  • Needs Windows 10 or newer with Bluetooth Low Energy, and LabVIEW 2026
  • MIT licensed

Get the code on GitLab.

If you are curious how AI could be used in your own LabVIEW or TestStand projects, get in touch.

/Anders Pedersen Sekanina

LEGO is a trademark of the LEGO Group. This is an independent hobby project.

Shall we have a no-obligation chat?

Tell us about your test or automation challenge, and hear what we can do for you.

Contact us