Steam Train powered by the Steem Chain

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 :)

roelandp-on-the-steem-train.jpg

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
@roelandp

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

H2
H3
H4
Upload from PC
Video gallery
3 columns
2 columns
1 column
55 Comments