Hacker News new | ask | show | jobs
by olegp 1483 days ago
I was in the same situation and ended up writing a browser based controller for the Duplo train using the Web Bluetooth API. It works best on mobiles in portrait mode and you can find it here: https://legotrain.netlify.app/

The source is a single HTML file that also contains the JS. Just view source and modify if you're interested in taking this further. What's cool is that the protocol allows you to receive readings from the train and not just send commands. Also, it allows you to drive the train faster than you can via the official mobile app.

2 comments

Again thanks for the comment. I updated the repo and created this site: https://benna100.github.io/duplo-train-voice-control/
Uhh this is super nice. I did not even know there was a Web Bluetooth api. That's dope. Then I can drop all of the nodejs stuff and also run it from the phone that's a lot nicer. Thanks for the share!