At developerWorks Recipes from IBM, novices and experienced developers can access and contribute powerful IoT recipes. This step-by-step tutorial offers a head start on IoT or other applications that connect hardware, run analytics, use machine learning and more.
This recipe provides an example on how to connect ESP8266 wifi module to IoT Foundation with NodeMCU Lua interpreter.
To program ESP8266, the authos used lua based NodeMCU firmware that has built-in MQTT functions required to communicate with IoT Foundation service. The recipe is basically few lines of lua script that periodically publish emulated data to the IoT Foundation.
In real application, the data will be obtained from external sensor such as temperature, humidity, etc through ESP8266 GPIOs.