I actually wanted to do this myself too. I'm quite sure there is a firmware that can be expanded not very dissimilar from an arduino.
The other thing that I'd love to do is to 3d print a station (with related time stop) with a Qi charger. Shouldn't be too hard to have an induction coil under the train. The only problem is that the firmware shut down the train when it is charging.