The IoT-Lab will demonstrate in a hands-on manner some basics of the Internet-of-Things (IoT). Using an ESP8266 MCU, we will build an internet-connected device, which will be similar in it's functionality to the Amazon Dash Button. The following topics will be covered by the lab:
- Wiring of the ESP8266 micro controlling unit and passive components (LED, button, resistor) using a breadboard.
- Programming of the ESP8266 micro controlling unit using C++ and the Arduino IDE
- Basics of the MQTT communication protocol
The solution consists of 3 major blocks:
- the device: when the customer presses the hardware button, an order event is generated which signals that the customer wants to order the good associated with the device.
- the order service: the backend/server-side service which consumes the order event and processes the order. The order service notifies the device about the order status which is visualized for the user through a LED. The order service is built with Express, a web framework for the event-driven I/O server-side JavaScript environment Node.js.
- the messaging infrastructure: middleware which facilitiates the exchange of messages between the device and the order service based on the publish-subscribe pattern.
The main focus in this lab is the device. We will set up the hardware consisting of a NodeMCU prototyping board, LEDs and switches and develop a firmware which is able to:
- detect a button press
- connect to the messaging infrastructure
- send a message
- consume a message
- control a LED
The message infrastructure and the order service will not be built as part of this lab but are available as ready to use components and will be integrated.
- Check the prerequisites and set up your computer ( Windows/Mac OS X specific, Linux specific, general instructions for all platforms)
- Start with the Hello, world! sketch
- Set up our hardware device, the ordering button
- Implement the firmware for the device
- Testing and Debugging of the firmware.
- Closing words
+--doc project documentation
+--src source folder
+--order-service demonstrative micro service for order processing
+--sketches sketches for ESP8266 - copy contents to Arduino directory.
+--hello_world "hello, world!" sketch
+--order_button sketch for the order button