ESP8266 example: Wi-Fi Access point, static IP, web-server and remote GPIO control

After testing the basic Wi-Fi connectivity options of the ESP8266 it is now time to explore some of the more interesting features of the chip. In the sketch below the NodeMCU development board creates a Wi-Fi access point and starts a web-server. A HTML page hosted on the web-server displays analog data from a photocell and allows you to control remotely a LED via Wi-Fi from a web-browser on your phone or PC. As in the previous examples, I am using the Arduino IDE to program the ESP8266 board. The LED is connected to NodeMCU pin D1 (ESP8266 GPIO5)…continue reading →

ESP8266 Wi-Fi tutorial and examples using the Arduino IDE

In the following examples, I will be using the NodeMCU development board and will program it with the Arduino software. Hopefully you have already set-up your ESP8266 development environment and were able to load the blink sketch. If not please follow this tutorial first. ESP8266 WiFi station mode example The ESP8266 can communicate over WiFi in two different modes. It can connect to an existing wireless hot spot, or access point, similar to the way you connect your phone or computer to the Internet. This is called "station" mode. In station mode the ESP8266 board…continue reading →

How to program the ESP8266 WiFi Modules with the Arduino IDE (Part 2 of 2)

Part 1 of this tutorial covers the set-up of the Arduino IDE to support the ESP8266 boards. In part 2 I  will go through the steps of loading a slightly modified Blink sketch to the NodeMCU board. First, a couple of things to be aware of when working with the ESP8266 boards: Power: ESP8266 is a 3.3v board The NodeMCU version of the board has an on-board 3.3v voltage regulator and can be powered from the USB port (5V), or through the vin pin (5-7.5v recommended). All GPIO pins work at 3.3v and…continue reading →

How to program the ESP8266 WiFi Modules with the Arduino IDE (Part 1 of 2)

I have recently started exploring an ESP8266 based development board I had sitting around. There is a growing number of firmware and development tools for the board, but as I am familiar with the Arduino IDE and syntax, I decided to give it a shot first.  If you are familiar with Lua, you might be more comfortable checking out the NodeMCU project. Those guys created an open source hardware development board around the ESP8266 MCU with included USB interface for easy programming and power and custom firmware and development tool-chain to program the ESP8266…continue reading →

NodeMCU: a ESP8266 based low cost IoT board

ESP8266 Introduction The ESP8266 is a low cost MCU with built in Wi-Fi. It can be paired with another host microcontroller, like an Arduino, to provide WiFi networking capability for a basic IoT development platform. Additionally, the ESP8266 can be used as a stand-alone MCU,  as it includes a 32-bit 80Mhz processor, 16 GPIO pins (4 PWM enabled) and a built in Analog-to-Digital converter, SPI and I2C interfaces and more... The MCU has a n operating voltage of 2.5V - 3.6V and average operating current of 80 mA. Here is the official ESP8266 MCU datasheet from the…continue reading →