ESP8266: Difference between revisions

From air
Jump to navigation Jump to search
No edit summary
No edit summary
Line 19: Line 19:
* Firmware permettant la programmation en langage Lua: [http://www.nodemcu.com/ nodemcu]
* Firmware permettant la programmation en langage Lua: [http://www.nodemcu.com/ nodemcu]
* Tutorial utilisant le firmware '''nodemcu''' pour réaliser capteur avec une interface web: [http://importhack.wordpress.com/2014/11/22/how-to-use-ep8266-esp-01-as-a-sensor-web-client/ ici].
* Tutorial utilisant le firmware '''nodemcu''' pour réaliser capteur avec une interface web: [http://importhack.wordpress.com/2014/11/22/how-to-use-ep8266-esp-01-as-a-sensor-web-client/ ici].
* Utiliser l'ESP8266 en standalone: [http://www.arduinesp.com/]
* [http://www.arduinesp.com/ Getting started with arduino ESP8266]


=Programmation=
=Programmation=

Revision as of 13:53, 4 March 2016

Carte ESP8266
Carte ESP8266 Mod
Configuration IDE Arduino pour ESP8266 Mod

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.

Programmation

C

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

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