The ESP8266 is a low-cost Wi-Fi microchip, with a full TCP/IP stack and microcontroller capability, produced by Espressif Systems in Shanghai, China.

The chip first came to the attention of Western makers in August 2014 with the ESP-01 module, made by a third-party manufacturer Ai-Thinker. This small module allows microcontrollers to connect to a Wi-Fi network and make simple TCP/IP connections using Hayes-style commands. The very low price and the fact that there were very few external components on the module, which suggested that it could eventually be very inexpensive in volume, attracted many hackers to explore the module, the chip, and the software on it.

The ESP8285 is an ESP8266 with 1 MiB of built-in flash, allowing the building of single-chip devices capable of connecting to Wi-Fi.

The successor to these microcontroller chips is the ESP32, released in 2016.

ESP8266_MQTT_Pi

Picture

This is an example of using an ESP8266 via MQTT to a Raspberry Pi.

The wiring is similar to the other ESP MQTT Button examples with D7 pin 13 connected to a push button with Vcc on one side and a 1K resistor to GND.

The ESP publish code is similar to all the other IoT internet examples.

In this case though, we are going to use a Raspberry Pi as the MQTT broker (server).

The subscribe request will be issued by your PC via Putty.

This example does not use any user/password security.

Vast credit and thanks to www.instructables.com with a few upgrades and clarifications for the latest Raspberry Pi4 Buster version.

 

 

ESP8266 Automated M2M with IFTTT

Picture

Machine to machine communication with 2 ESP8266 WIFIs to the cloud.

Now we will add to the simple Basic example of a switch input client to an LED display client.

ESP8266 Button > IFTTT > Adafruit IO >ESP8266 LED

The ESP8266 Button will wait and read a button toggle state change and then send a changed value to IFTTT.

The IFTTT event will send the change to the Adafruit IO.

The Adafruit IO will then send the change to the ESP8266 LED.

The ESP8266 LED will then change the LED status.

First you need to get an Adafruit account and copy the AIO key
 IO_USERNAME 
 IO_KEY      

Create the FEED ( needed for IFTTT ) and Dashboard with Blocks.

( Free Plan per account 30 data points per minute, 30 days of data storage, 10 feeds, & 5 dashboards )

Then create a free IFTTT account.

Create an IFTTT Webhook event to send to Adafruit.

Create the Adafruit Dashboard , Feed , & Block ( Toggle Button or Gauge ).

Modify the included programs with your wifi and cloud account information and upload to each ESP.

You can use the Arduino IDE after you make the needed changes as explained in :

The ESP8266 Button is wired with a toggle switch to D4 input pin GPIO2 and a 1K to 10K resistor to ground.

The ESP8266 LED is wired to D4 input pin GPIO2 with 1K resistor inline with an LED to ground.

 

 

ESP8266 12-E NodeMCU Begin Basic Functionality

Picture

There are many variations using the ESP8266.

These examples are based on the ESP8266 12-E NodeMCU Kit a nice solder free breadboard version.

Here is a nice link to the many versions:

To begin ESP8266, lets start with the most basic functionality of reading a button switch.

The ESP is similar to Arduino boards and is also compatible with the Arduino IDE.

Arduino IDE needs to be installed, add the CH340G Driver for your OS, then add the json file to the Arduino per the installation video.

ESP8266 Github Page:

Boards manager link JSON:

Installation Video 

CH340G Driver:

Documentation:

This is the digital equivalent of Hello World.

Connect a Push button and a 1 kΩ pull up resistor to the ( D4 ) GPIO2 pin.

The result will display on the Serial Monitor.

If all works fine your Arduino IDE is successfully configured and the ESP8266 board is functional.

The board LED light will go on when D4 is 0 and off when D4 is 1.

 

Tutorials

Here are some helpful tutorials on some the systems available with Scada123 to try on your own.

You can view videos at:     Youtube Channel Scada LLC

Sort through Topics on the left Menu "Tutorial Menu"

Click on one the Topic Tags that interest you.

License : All programs in the tutorial section are free software. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful,  but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.