monotowntv
2021-06-12
Transportation is key to any city! In this 3:19 video, we focus on MonoTown's rail systems.
Streaming a LEGO build can sometimes lack the excitement of a gaming stream. That’s probably a controversial statement to some LEGO fans, and building LEGO is very exciting in some ways, but I think you get the idea. I love watching trains.
MonoTown, my LEGO city, has a lot of trains, and, uh, monorails too. What if I could give Twitch viewers the ability to control the trains within MonoTown. That would be almost too much excitement.
We had to do it. After a bit of research, I had a plan. In 2019 LEGO discontinued their PowerFunctions line of infrared based motors.
The replacement line of motors and sensors, somewhat confusingly named Powered Up, now uses Bluetooth. This would simplify the comms to the trains. I wanted bot that would connect to chat via the Twitch API and listen for commands from viewers.
When someone told a train to move, the bot would relay the command via Bluetooth to the LEGO trains. And, it turns out, someone had already taken a stab at connecting LEGO motors to Twitch, and their code was open source. The entire thing could run on a Raspberry Pi.
I downloaded the software, connected everything it worked. One of the authors of the software even stopped by to see their work in action. It was great.
MonoTownTV now has a chatbot that lets my livestream viewers on Twitch control my LEGO trains. Built with TMI.js, Node.js, and NodePoweredUp, this...
Duration: 3:19 | Watch on YouTube
This post is based on our YouTube video documenting the ongoing development of MonoTown, our LEGO city project. Stay tuned for more updates as we continue building and expanding our brick-based metropolis!
Thanks for reading! Stay connected with MonoTown for more updates.