So a short update of my Lego and Raspberry project. Currently I can control multiple Lego trains at the same time through a Java and AngularJS application. Next to that I added some extra features like sound.
Two Lego trains which are both controlled through WIFI. Each train has a Raspberry Pi, USB WIFI dongle, battery pack and a infrared transmitter.
One of the trains has some more hardware on board:
- Speaker for various sounds. Unfortunately the Raspberry Pi cam cannot record sound. But it plays songs like Steam locomotive.
- Raspberry Pi camera to get streaming video from the train.
- RFID this is still work in progress I can already read the tags but it needs to be integrated with the rest of the software.
And a separate camera for the overview.
The control center is based on Java and AngularJS.
The first screen shows a list of all the trains with their functionality (infrared control, camera, speaker). The first (Cargo) train has all the features, the second (Passenger) train only has infrared for speed control. On the right the ‘overview’ camera’s are shown that are not attached to a train.
The streaming video from the overview camera is shown below.
The streaming video from the train is shown below.
Video from the overview camera
Video from the train camera
Some extra pictures
- Integrating RFID in the application
- Using the Odroid C1 quadcore as a webserver/applicationserver/buildserver etc.
- Add autopilot feature to enable users to predefine the actions of a specific train