ESP8266: Difference between revisions
From charlesreid1
| Line 56: | Line 56: | ||
===Serial Software=== | ===Serial Software=== | ||
To communicate with the serial device, I used [[Pyserial]], which is a Python library for communicating with serial devices. | To communicate with the serial device, I used [[Pyserial]], which is a Python library for communicating with serial devices. | ||
The chip requires hooking up four pins: | |||
* GND - ground | |||
* VCC - 3.3 V | |||
* TX - transmit | |||
* RX - receive | |||
=Useful Links= | =Useful Links= | ||
Revision as of 22:09, 22 June 2016
Notes on the ESP8266 chip.
Overview
This board enables Arduinos and other embedded devices to communicate with wireless networks via the 802.11 protocol.
The board has a microchip that implements the entire TCP/IP stack, so you don't have to implement it on your embedded device. The embedded device simply uses serial commands to control and interact with the chip. Think of it as a dumbed-down, physical API for wifi.
The chip has an 8-pin array on the underside. The pins here use 3.3 V logic, so it is important you use it with embedded devices that also use 3.3 V logic! Some embedded devices (such as the Arduino Uno) use 5 V logic. If you have a device using 5 V logic, you need a down-converter (also called a level shifter) to convert the 5 V logic signals to 3.3 V logic signals.
Pinout
The 8 pins on the chip are arranged as follows:
___________________________________________ | _______ _____________ | | (1) | O O | (2) | _________| | | | | | |________ | | (3) | O O | (4) | ________| | | | | | |________ | | (5) | O O | (6) | ________| | | | | | |________ | | (7) | O O | (8) | | | | ------- | | | |__________________________________________| (1) TXD (2) GND (3) CH_PD (4) GPIO2 (5) RST (6) GPIO0 (7) VCC (8) RXD
Serial Communication
To communicate with the chip, use serial commands, at a baud rate of 57600.
Commands fall into three different categories:
- Set
- Modify the parameters on the chip
- Inquiry
- Read the current state of the chip's parameters
- Test
- Return the different modes supported
The AT commands are all listed in the following table: http://wiki.iteadstudio.com/ESP8266_Serial_WIFI_Module#AT_Commands
Serial Cable
I was using an ArmorView USB to TTL 4-pin connector. This is a cheap knockoff of a USB-to-serial adapter by Prolific [1], so the Prolific drivers were necessary to make the computer recognize the serial adapter.
When the USB adapter was plugged in, it showed up under /dev/cu.usbserial and /dev/tty.usbserial. We can use this device file to communicate with the USB serial adpater.
Serial Software
To communicate with the serial device, I used Pyserial, which is a Python library for communicating with serial devices.
The chip requires hooking up four pins:
- GND - ground
- VCC - 3.3 V
- TX - transmit
- RX - receive
Useful Links
Comprehensive Guide
There is a comprehensive guide to this chip here: http://wiki.iteadstudio.com/ESP8266_Serial_WIFI_Module#AT_Commands
Github Pages
The ESP8266 has a wiki and a collection of related repositories on Github.
Link to wiki: https://github.com/esp8266/esp8266-wiki/wiki
Link to Github repos: https://github.com/esp8266
Flags
| Arduino all the arduino things
Arduino/Micro · Arduino/Leonardo · Arduino/Esplora
Arduino/Micro/Hello World · Arduino/Leonardo/Hello World · Arduino RGB LED
Arduino/Micro/Blink · Arduino/Leonardo/Blink
Arduino/Morse Code Libraries · Arduino/Morse Code Circuit · Arduino/Micro/Blink Morse Code
|