This is a basic demonstration of how to use PubNub to handle the communication between an ESP8266 and any other PubNub enabled device. The ESP8266 is a remarkable little piece of hardware, and works perfectly as the controller for an embedded IoT project. Most projects using this module use an external controller like an Arduino to control it using the serial AT commands, but this is unnecessary. The ESP8266 is a programmable 32 bit MCU and can easily work as a standalone device.
I have created a basic library demonstrating how to publish and subscribe to a PubNub channel. This channel can also be published or subscribed to from any other PubNub enabled device in the world. This makes setting up a network of IoT sensors or external actuator nodes incredibly simple! The demo shows how to read a button and blink an LED in accordance to data transmitted on the PubNub channel from a remote source.
I also demonstrate how to use the PubNub debug console as well as printing debug information over the serial port. A full description of the project including in-depth instructions is available in the source code repository: https://github.com/Kurt-E-Clothier/pubnub-esp8266
As stated, this is a basic demo illustrating what is possible using an ESP8266 with PubNub. The provided code will work; however, it should be modified to best suit a particular application.
Comments