What is more significant to happy holidays than toys, Lego, happy kids, electronics and an SAP backend?
I hope this will inspire more simple innovations, starting small, thinking big.
Well what you see in the video is a modified Lego Winter Holiday Train (10254) with a Lego Power Functions engine (88002) and battery pack (88000). One cart has been modified to hold the electronics and one cart has been added to work as a somewhat stabilized candy bowl held up by a load cell sensor.
In the electronics cart is an Onion Omega2+ in an Arduino Dock R2, powered by an USB power bank. The Arduino is talking to the load cell sensor via a HX711 load cell amplifier and A/D converter, and transferring the readings to the Omega2+ every two seconds. The train engine is controlled from the Omega2+ using a DRV8833 DC motor driver carrier, providing power to the engine from the separate engine battery pack.
The Omega2+ has built in Wi-Fi and is running two python programs connected to an SAP backend via WebSocket communication protocol. One of them is sending the readings from the load cell (calibrated by “percent candy in cart”) in a JSON to the SAP backend. The other one is listening to start/stop signals and speed settings for the train engine and sending corresponding signals to the DRV8833.
The SAP Backend (non-HANA system actually) is set up with ABAP Messaging Channels and ABAP Push Channels to implement the WebSocket protocol. Every received cart reading is simply inserted into a corresponding database table and also forwarded directly to any connected frontend SAPUI5-application for live updates.
The frontend was built using Neptune Softwares application designer and, well, is a simple SAPUI5 app, allowing display of the current status (load level, train status and speed) updated live using WebSockets, as well as visualization of historical load levels of the day. Changes in train speed and start/stop are sent “onChange” to the SAP Backend and immediately forwarded to the connected Omega2+.
Well, these were all the holiday crafts time allowed. The possibilities are endless, both in building things, connecting data and plugging in to the SAP processes… With or without the cloud.
Edit: Screenshots added from the SAPUI5 app: