Steam Train powered by the Steem Chain

in steemhacks •  23 days ago

Previously I hooked up a giant whale to the Steem blockchain (currently in wintersleep), but today I found out that the Duplo Steam Train we gave as a Xmas gift to our son, actually has BLE (bluetooth low energy) so I wanted to see if that could be programmable! And of course I wanted it to work with the Steem chain :)


Now it happens to be that there are already many fans building stuff on top of Lego and Duplo peripherals and they all gather on the Eurobricks forums.

This is where I found out that Nathan had already written a Node library which handles all the barebones (bluetooth connection, communications layer) for talking and pushing and receiving events from the Duplo train.

Putting my script together was as simple as hooking Nathan's library together with the dSteem library by @almost-digital and voila... A Steam Train powered by the Steem Chain.

How it works

The node script connects to the Bluetooth of the Duplo Train. As soon as a connection is established, the script will start connecting to the Steem blockchain and streaming blocks as they are pushed to the chain.

Whenever a new block arrives, the script has the light of the train's bumper blink and checks the amount of transactions in the block. If the amount of transactions is higher than the avarage transactions per block, it will speed up the train. If the amount is lower than the average, it will slow down the train.

As a gimmick I also added the "choo choo" whenever my witness @roelandp signs a block.

Here is a demo video

Sources / Links

Wishing you a great 2019, may you have a prosperous year and have a great NYE!

See you on the chain

If you like what I do, consider supporting my witness @roelandp

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Wow! This is simply amazing buddy. Pure engineering ingenuity. Cool!

Happy new year from here

It's time someone pushed the steem/steam connection to it's logical train-y conclusion :D

Youre programming leggo now??? I think i still am in 2017. Anyway happy happy new years eve!

That was pretty cool. :D

Ha ha, that's so cool! Hopefully you have it in the back room so the train doesn't keep you awake at night. Although the lack of "choo choo" could be a clever way to alert you if your witness is having issues.


:p today it ran out of battery :) plus my son wanted to play with it again. i found out it has a whistle too with 5 tones so i might find some way to play simple songs on it :)


If the battery ran out, then at least we know the Steem blockchain didn't stop.

That's just rude of your son to want to play with a toy that you got him when you're already playing with it. Ha ha. :)


You are really cool sir @roelandp always keeping this journey sir

Posted using Partiko Android

Hi @roelandp!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your UA account score is currently 8.488 which ranks you at #4 across all Steem accounts.
Your rank has not changed in the last three days.

In our last Algorithmic Curation Round, consisting of 204 contributions, your post is ranked at #1. Congratulations!

Evaluation of your UA score:
  • Your follower network is great!
  • The readers appreciate your great work!
  • Great user engagement! You rock!

Feel free to join our @steem-ua Discord server

Woow woow... totally insane. I truly believe that activate real machines using the chain is a game changer.
And by the way the whale was fantastic and now the choo choo? - what to say man...?

What about free sweet dispenser machines? :)
Love and a mad 2019!!!!

Peace V!

Pure class! What a great mini-project to work on and showcase blockchain technology in the quirkiest of ways! (again!). All the best for 2019 to you and the family......look forward to seeing what you bring to the chain in the new year......


thabks! and to you! have a great 2019!

@roelandp this is so cool man!. how
long did it take you?

Posted using Partiko Android


tbh it took me longer to cut the video :) and i was fiddling around a lot with the duplo library as it has other cool features onboard the train such as a color sensor, speedometer and distance meter. toys are not what they used to be these days haha

Wow, this is really cool! Not quite as awesome as the Steem whale fountain you made a while back, but still amazing. The funniest part for me is that my 2-year old child got one of these Duplo trains for Christmas a few days ago, so now I'm tempted to learn how to build stuff on top of it :P


haha cool :)

if u have a mac its really as simple as copy pasting my script, installing dsteem and the other linked package and running it!

Steem + steam = fun

What a fun project. I wish you and your family a wonderful new year.


u2 steve have a great eve and year ahead!

This post has been voted on by the SteemSTEM curation team and voting trail in collaboration with @curie.

If you appreciate the work we are doing then consider voting both projects for witness by selecting stem.witness and curie!

For additional information please join us on the SteemSTEM discord and to get to know the rest of the community!


I'm literally Laughing Out Loud.

You're actually raising your son on Steem, it's freaking awesome. Love that you coded a little bit of a narcissistic streak onto the train as well.

Could we try to run Nationale Spoorwegen on Steem somehow?

This gave me such a smile today. Appreciated.

i knew you are a great builder in tech, but was unaware you had such great lego building skills too :) nice post !!

I'm curious as to how much mileage you'll rack up on the train during 2019.

Posted using Partiko Android

narcissistic wink 😆

I think you deserve your own choo-choo for creating epic stuff like this, even though it was barely audible.

Happy New Year!

🚂 Choo-choooo...

Oh mate, that's fantastic and entertaining!

Very cool :)

Posted using Partiko Android

That is a great idea man!!! Superb!

This post has been included in today's SOS Daily News - a digest of all you need to know about the State of Steem.

Awesome, I will give it a try!

Cool idea. :) I have seen the giant whale and loved that concept and I guess this beats that

Posted using Partiko Android

Hoe kom je erop?! :D

That's really cool! Have a smooth ride into 2019!

That is awesome. Love it!

Hahaha! GREAT STUFF! :)
Now the question arises - when will the kid have some time with HIS train? :)

Choo Choo...that's awesome and just the tip of the iceberg. Wishing you and your family a healthy, happy and very prosperous New Year!.

Oh man that was amazing. Creativity at its finest.
Happy new year too!!

Marvelous! Does your child misses his toy already? Or are you already teaching him how to code properly at 2,5 years of age ;)

Wow, this is amazing. Complement of the season to you and your family

This is the best idea ever ahah

Posted using Partiko iOS

This is f*cking hilarious

Happy knew year!

Really cool stuff m8, I dug the video! That’s some creativity right there

Very cool as Always @roelandp! Makes me want to give the whale a blast! Anyone not see this whale? Should check out what @roelandp made here!

Posted using Partiko Android


whale is in wintersleep unfortunately :) we'll be getting the interiors out somewhere in January to get her ready for 2019 :)

Ha! I love it.

Posted using Partiko Android

Wow sir @roelandp you are always pretty guy..carry on sir

Posted using Partiko Android

Lol! This is the cutest thing ever! The "choo-choo" trigger is just genius!

This is awesome!

Oh man that was amazing. Creativity at its finest.