Lego Bob and Titan meets IoT [message #1760888] |
Thu, 04 May 2017 06:43 |
|
On the Craft Conference held in Budapest between the 27th and 28th of April (https://craft-conf.com/) one of the attractions of Ericsson's booth was
a Lego truck controlled by an onboard Raspberry Pi running Titan which receives commands via MQTT; the truck could be controlled
via Internet by visiting a webpage that serves the appropriate content in the visitor's browser.
Lego Bob drives the truck
User interface
The content was generated by a Node.Js server which also connected to Eclipse's MQTT broker as a publisher.
On the other end, Titan was executing on a Raspberry Pi subscribed to the broker messages.
The processed messages then actuated a set of relays via the GPIO test port, starting/stopping Lego motors and switching LEDs on and off.
+--------------------------------------+
| |
| |
| |
| Browser |
| |
| |
| |
| |
| |
+-------------------+------------------+
|
|
|
+-------------------+------------------+
| |
| |
| |
| Node.JS server |
| |
| |
| MQTT Client(publisher) |
| |
| |
+-------------------+------------------+
|
|
|
|
+-------------------+------------------+
| |
| |
| |
| |
| Eclipse MQTT broker |
| |
| iot.eclipse.org:1883 |
| |
| |
+-------------------+------------------+
|
|
|
|
+------------------+-------------------+
| Raspberry Pi (Raspbian) |
| |
| +-----------------------------+ |
| | MQTT Client (subscriber) | |
| | | |
| | GPIO Test port | |
| | | |
| | TTCN-3/Titan | |
| +-----------------------------+ |
+------------------+-------------------+
| GPIO
|
|
|
+-----------------+-------------------+
| relays |
| |
| |
| |
| Lego Technics motors, LEDs |
| |
| |
| |
| |
+-------------------------------------+
See also:
Experimental Titan build for Raspberry Pi
https://www.eclipse.org/forums/index.php/t/1081819/
Titan GPIO test port for Raspberry Pi
https://www.eclipse.org/forums/index.php/t/1084041/
CoAP, MQTT and LWM2M TTCN-3 test case examples(CoAP, MQTT and LWM2M client code)
https://www.eclipse.org/forums/index.php/t/1085007/
This demonstrates a full IoT control chain; it may seem a toy, but controlling e.g. a mining equipment remotely at a distance of thousands of miles
at the bottom of a pit in surroundings incompatible with life will look not much different.
The main takeaway is that TTCN-3 with Titan is not only a test tool, it's a language usable for messaging applications as well, such as protocol gateways, IoT clients/servers and so on.
Best regards
Elemer
|
|
|
Powered by
FUDForum. Page generated in 0.02382 seconds