≡ Menu

Control LEGO Powered Up Elements Via Twitch!

I have been recently contacted about a very interesting project that I thought to share with you today. Students from Anderson University in Indiana have been working on open-source software to interact with LEGO Powered Up elements via Twitch chat using a Raspberry Pi.

The project was inspired by a question on Bricks Stack Exchange asking about the ability for multiple users to control a single LEGO train. If you have been working with the LEGO Powered Up elements, you know this is not possible out-of-the-box; however, there are some creative ways to work around this.

The solution the students came up with is similar in concept to the classic Twitch Plays Pokemon (link to video demo). A LEGO model is streamed via Twitch.tv, and viewers are able to control it by sending commands over Twitch chat.

To break this down, LEGO Powered Up hubs are paired with a host device (Raspberry Pi) via Bluetooth. The host device monitors a Twitch chat room for commands and uses those commands to control LEGO elements connected to the hubs. The host device also streams a webcam via Twitch showing the live state of the LEGO model.

The Twitch Powered Up software has been designed and tested to run on a Raspberry Pi 4, but it should be able to run on most devices that support Bluetooth Low Energy. The software has been tested on the following components: #88006 LEGO Powered Up Move Hub, #88009 LEGO Powered Up Hub, #45303 LEGO Powered Up Simple Medium Linear Motor, #88005 LEGO Powered Up Lights, and #88011 LEGO Powered Up Train Motor. The software should also be compatible with any other device supported by node-poweredup.

The creators of the software hope that it will benefit the LEGO fan community. It could be especially beneficial to LEGO User Groups that cannot hold physical events under the current circumstances related to COVID-19. Instead, they could run some fun interactive virtual activities within their communities using the Twitch Powered Up software.

The Twitch Powered Up software is presented today in a live demo from 9 AM to 5 PM EST. If you’re interested, the project is hosted on Github at this link: Github.com/JNCraton/Twitch-Powered-Up. And the live demo is running on Twitch here: Twitch.TV/TwitchPoweredUp.

Also, as this project is open-source, contributions are welcome. If you have suggestions for features, improvements, or bug fixes, you can suggest them at Github as well. And of course, you can also share your thoughts and discuss the project in the comment section below.

{ 10 comments… add one }
  • yoladiel December 11, 2020, 9:44 AM

    Wait, what?! This sounds really cool!

  • Peter December 11, 2020, 9:51 AM

    I had no idea you can do something like this. Checking it out now.

  • Undercover Afol December 11, 2020, 9:58 AM

    It’s not moving for me. What am I doing wrong?

    • j.j. December 11, 2020, 10:05 AM

      I ran into that too. I just refreshed the page and it started working.

      • Undercover Afol December 11, 2020, 10:09 AM

        Oh, yes, it’s working now.

  • Okosh December 11, 2020, 10:12 AM

    Haha. I like the propeller at the end of the train! Anyway, great demo.

  • lifelibertylego December 11, 2020, 10:27 AM

    How long does each command last? Until they get the next command? Or do they time out on their own?

    • Jon Craton December 11, 2020, 11:21 AM

      The command duration is configurable. For the demo, they are configured to last for 5 seconds.

  • Grim December 11, 2020, 3:12 PM

    Oh great another high tech idea that only a computer brainiac will be able to figure out. I bought a Raspberry pi once. It is a dust collector in the drawer. Very complicated and impossible to program. Required things they didn’t teach in school. Ideas like this need to be useable by regular people with no computer knowledge. Just like scripts for Twitch that nobody knows how to write. These extremely difficult coding concepts should be a plug and play device and not a data entry nightmare. I will derail this idea on my next Lego stream on Twitch. If we can’t all have easy to understand access to this tech, then nobody should. Another failure by Lego.

  • Will December 11, 2020, 5:37 PM

    This is the next level of interactive media I guess.

    Rather novel use of technology.

Leave a Comment