Esp8266

From

Jump to: navigation, search

A little WiFi wonder


For more than a year now the Chinese firm Espressif makes the ESP8266 chip and sells it in a variety of configurations. The ESP8266-01 is the smallest configuration with just 2 GPIO ports on the outside, GPIO0 and GPIO2. Other boards can have far more ports available on the outside. The logic on the boards is TTL, meaning that 5 V is too much! Use 3,3 V only!!

ESP8266-01

This small board (1,5 by 2,5 cm approximately) has 8 pins that are too close together for use on a breadboard. You have to come with your own solution or buy a connector intended for use on a breadboard. The ESP8266-01 has a price tag of €4 or less, shipping included, when you can wait for mail delivery from China.

After connecting the board to the power supply (max. 3,3 V) it is showing a WiFi access point when looking with the right tooling. It has an IP-address and is not password protected. After hooking up you get an IP-address from the tiny DHCP-server. It is easy to make the board a station and connect to your local WiFi network.

You can connect to the ESP8266 with an Arduino or a FTDI cable and a terminal program. In both cases the RX and TX connections are used. The ESP8266-01 as programmed by Espressif listens to the old modem commands, AT … OK. It is also possible program the ESP8266 through the Arduino, when you install de ESP8266 modules. A very nice solution is flashing the chip with a Lua interpreter. After flashing the ESP8266-01 comes with 519821 bytes to write your own programs in this Lua version on chip.


Lua, Hello world

-- pwm.lua

-- ESP8266-01 GPIO Mapping

gpio0 = 3

gpio2 = 4


-- GPIO Setup --


print("Setting Up GPIO...")

-- Enable PWM output

pwm.setup(gpio2, 2, 512) -- 2Hz, 50% duty default

pwm.start(gpio2)

nodeMCU

This System on Chip is bigger than the ESP8266 en will fit nicely on a breadboard. It has a lot of ports that are accessible on the breadboard. The nodeMCU has a micro USB connection that can be used to feed the chip and to communicate with it. There is more memory available. Recently is the V3 version of this SOC. Out of the box it is programmable in Lua.

ESP32

The success of the chips from Espressif has lead to a new device, the ESP32. The ESP32 can be connected over WiFi and Bluetooth! Shopping is expected later this month.

Domoticz

Of course you can make a LED blink or let a sensor show you the temperature and humidity but really nice is integrating your sensor values and actions with for instance Domoticz. Domoticz has an interface based on json that does a good job!

Resources