ESP8266
L' ESP8266 est un module Wifi très peu cher (5 USD) accessible par ligne série (https://espressif.com/en/products/esp8266/). Parmi les caractéristiques
- 802.11 b/g/n
- Wi-Fi Direct (P2P), soft-AP
- Integrated TCP/IP protocol stack
- Integrated low power 32-bit CPU could be used as application processor (80Mhz)
- SDIO 1.1/2.0, SPI, UART
Dans une utilisation simple, d'apporter une connectivité wifi par ligne série à tout équipement notamment les cartes à base de microcontrolleur comme: Arduino, Nucleo...
Le support récent dans un gcc modifié (http://hackaday.com/2014/10/02/gcc-for-the-esp8266-wifi-module/) permettra d'utiliser ce module de facon autonome.
- Firmware permettant la programmation en langage Lua: nodemcu
- Tutorial utilisant le firmware nodemcu pour réaliser capteur avec une interface web: ici.
- Getting started with arduino ESP8266
Programmation
C
- [IDE Arduino + Addon https://learn.sparkfun.com/tutorials/esp8266-thing-hookup-guide/installing-the-esp8266-arduino-addon]
Lua
Python
ESP8266 @ AIR
Outils
ESPTool
https://github.com/themadinventor/esptool
A cute Python utility to communicate with the ROM bootloader in Espressif ESP8266. It is intended to be a simple, platform independent, open source replacement for XTCOM.
git clone https://github.com/themadinventor/esptool.git cd esptool/ sudo ln -s /dev/tty.wch\ ch341\ USB\=\>RS232\ 1450 /dev/tty.USB0 ./esptool.py -h usage: esptool [-h] [--port PORT] [--baud BAUD] {load_ram,dump_mem,read_mem,write_mem,write_flash,run,image_info,make_image,elf2image,read_mac,chip_id,flash_id,read_flash,verify_flash,erase_flash} ... ESP8266 ROM Bootloader Utility positional arguments: {load_ram,dump_mem,read_mem,write_mem,write_flash,run,image_info,make_image,elf2image,read_mac,chip_id,flash_id,read_flash,verify_flash,erase_flash} Run esptool {command} -h for additional help load_ram Download an image to RAM and execute dump_mem Dump arbitrary memory to disk read_mem Read arbitrary memory location write_mem Read-modify-write to arbitrary memory location write_flash Write a binary blob to flash run Run application code in flash image_info Dump headers from an application image make_image Create an application image from binary files elf2image Create an application image from ELF file read_mac Read MAC address from OTP ROM chip_id Read Chip ID from OTP ROM flash_id Read SPI flash manufacturer and device ID read_flash Read SPI flash content verify_flash Verify a binary blob against flash erase_flash Perform Chip Erase on SPI flash optional arguments: -h, --help show this help message and exit --port PORT, -p PORT Serial port device --baud BAUD, -b BAUD Serial port baud rate ./esptool.py -b 115200 -p /dev/tty.USB0 flash_id Connecting... Manufacturer: e0 Device: 4016 ./esptool.py -b 115200 -p /dev/tty.USB0 chip_id Connecting... Chip ID: 0x000befb3 ./esptool.py -b 115200 -p /dev/tty.USB0 read_mac Connecting... MAC: 5c:cf:7f:0b:ef:b3
Liens
- Brochage http://zeflo.com/wp-content/uploads/2014/09/esp8266_pinout_h-569x236.png
- http://www.seeedstudio.com/wiki/WiFi_Serial_Transceiver_Module
- http://forum.arduino.cc/index.php?topic=267564.0
- http://www.instructables.com/id/ESP8266-Wifi-Temperature-Logger/
- http://www.esp8266.com/wiki/doku.php?id=esp8266-module-family
Exemple de code pour Arduino
Réécrit à partir de http://www.seeedstudio.com/wiki/WiFi_Serial_Transceiver_Module
Exemple de code pour STM32 Nucleo
TODO