diff --git a/doc/boards.md b/doc/boards.md index 5c3104be6..e92c4c591 100644 --- a/doc/boards.md +++ b/doc/boards.md @@ -3,27 +3,27 @@ title: Supported Hardware --- ## Table of contents - * [Adafruit HUZZAH ESP8266 (ESP\-12)](#adafruit-huzzah-esp8266-esp-12) - * [NodeMCU 0\.9 ](#nodemcu-09-) - * [Pin mapping](#pin-mapping) - * [NodeMCU 1\.0](#nodemcu-10) - * [Olimex MOD\-WIFI\-ESP8266\-DEV](#olimex-mod-wifi-esp8266-dev) - * [Olimex MOD\-WIFI\-ESP8266](#olimex-mod-wifi-esp8266) - * [SparkFun ESP8266 Thing](#sparkfun-esp8266-thing) - * [SweetPea ESP\-210](#sweetpea-esp-210) - * [Generic ESP8266 modules](#generic-esp8266-modules) - * [Serial Adapter](#serial-adapter) - * [Minimal Hardware Setup for Bootloading and Usage](#minimal-hardware-setup-for-bootloading-and-usage) - * [ESP to Serial](#esp-to-serial) - * [Minimal Hardware Setup for Bootloading only](#minimal-hardware-setup-for-bootloading-only) - * [Minimal Hardware Setup for Running only](#minimal-hardware-setup-for-running-only) - * [Minimal](#minimal) - * [Improved Stability](#improved-stability) - * [Boot Messages and Modes](#boot-messages-and-modes) - * [rst cause](#rst-cause) - * [boot mode](#boot-mode) - * [WeMos D1](#wemos-d1) - * [WeMos D1 mini](#wemos-d1-mini) + * [Adafruit HUZZAH ESP8266 (ESP\-12)](#adafruit-huzzah-esp8266-esp-12) + * [NodeMCU 0\.9 ](#nodemcu-09-) + * [Pin mapping](#pin-mapping) + * [NodeMCU 1\.0](#nodemcu-10) + * [Olimex MOD\-WIFI\-ESP8266\-DEV](#olimex-mod-wifi-esp8266-dev) + * [Olimex MOD\-WIFI\-ESP8266](#olimex-mod-wifi-esp8266) + * [SparkFun ESP8266 Thing](#sparkfun-esp8266-thing) + * [SweetPea ESP\-210](#sweetpea-esp-210) + * [Generic ESP8266 modules](#generic-esp8266-modules) + * [Serial Adapter](#serial-adapter) + * [Minimal Hardware Setup for Bootloading and Usage](#minimal-hardware-setup-for-bootloading-and-usage) + * [ESP to Serial](#esp-to-serial) + * [Minimal Hardware Setup for Bootloading only](#minimal-hardware-setup-for-bootloading-only) + * [Minimal Hardware Setup for Running only](#minimal-hardware-setup-for-running-only) + * [Minimal](#minimal) + * [Improved Stability](#improved-stability) + * [Boot Messages and Modes](#boot-messages-and-modes) + * [rst cause](#rst-cause) + * [boot mode](#boot-mode) + * [WeMos D1](#wemos-d1) + * [WeMos D1 mini](#wemos-d1-mini) ## Adafruit HUZZAH ESP8266 (ESP-12) diff --git a/doc/filesystem.md b/doc/filesystem.md index 31aa148ab..4beae1e15 100644 --- a/doc/filesystem.md +++ b/doc/filesystem.md @@ -3,25 +3,25 @@ title: File System --- ## Table of Contents - * [Flash layout](#flash-layout) - * [Uploading files to file system](#uploading-files-to-file-system) - * [File system object (SPIFFS)](#file-system-object-spiffs) - * [begin](#begin) - * [format](#format) - * [open](#open) - * [exists](#exists) - * [openDir](#opendir) - * [remove](#remove) - * [rename](#rename) - * [info](#info) - * [Filesystem information structure](#filesystem-information-structure) - * [Directory object (Dir)](#directory-object-dir) - * [File object](#file-object) - * [seek](#seek) - * [position](#position) - * [size](#size) - * [name](#name) - * [close](#close) + * [Flash layout](#flash-layout) + * [Uploading files to file system](#uploading-files-to-file-system) + * [File system object (SPIFFS)](#file-system-object-spiffs) + * [begin](#begin) + * [format](#format) + * [open](#open) + * [exists](#exists) + * [openDir](#opendir) + * [remove](#remove) + * [rename](#rename) + * [info](#info) + * [Filesystem information structure](#filesystem-information-structure) + * [Directory object (Dir)](#directory-object-dir) + * [File object](#file-object) + * [seek](#seek) + * [position](#position) + * [size](#size) + * [name](#name) + * [close](#close) ## Flash layout @@ -127,9 +127,7 @@ Returns *true* if a file with given path exists, *false* otherwise. SPIFFS.openDir(path) ``` -Opens a directory given its absolute path. Returns a *Dir* object. To check if -directory was opened successfully, use the boolean operator, similar to opening -a file. +Opens a directory given its absolute path. Returns a *Dir* object. ### remove diff --git a/doc/libraries.md b/doc/libraries.md index 210ef2f81..cb6ad3272 100644 --- a/doc/libraries.md +++ b/doc/libraries.md @@ -3,19 +3,19 @@ title: Libraries --- ## Table of Contents - * [WiFi(ESP8266WiFi library)](#wifiesp8266wifi-library) - * [Ticker](#ticker) - * [EEPROM](#eeprom) - * [I2C (Wire library)](#i2c-wire-library) - * [SPI](#spi) - * [SoftwareSerial](#softwareserial) - * [ESP\-specific APIs](#esp-specific-apis) - * [OneWire](#onewire) - * [mDNS and DNS\-SD responder (ESP8266mDNS library)](#mdns-and-dns-sd-responder-esp8266mdns-library) - * [SSDP responder (ESP8266SSDP)](#ssdp-responder-esp8266ssdp) - * [DNS server (DNSServer library)](#dns-server-dnsserver-library) - * [Servo](#servo) - * [Other libraries (not included with the IDE)](#other-libraries-not-included-with-the-ide) + * [WiFi(ESP8266WiFi library)](#wifiesp8266wifi-library) + * [Ticker](#ticker) + * [EEPROM](#eeprom) + * [I2C (Wire library)](#i2c-wire-library) + * [SPI](#spi) + * [SoftwareSerial](#softwareserial) + * [ESP\-specific APIs](#esp-specific-apis) + * [OneWire](#onewire) + * [mDNS and DNS\-SD responder (ESP8266mDNS library)](#mdns-and-dns-sd-responder-esp8266mdns-library) + * [SSDP responder (ESP8266SSDP)](#ssdp-responder-esp8266ssdp) + * [DNS server (DNSServer library)](#dns-server-dnsserver-library) + * [Servo](#servo) + * [Other libraries (not included with the IDE)](#other-libraries-not-included-with-the-ide) ## WiFi(ESP8266WiFi library) diff --git a/doc/ota_updates/ota_updates.md b/doc/ota_updates/ota_updates.md index 8af5be15a..8071a2303 100644 --- a/doc/ota_updates/ota_updates.md +++ b/doc/ota_updates/ota_updates.md @@ -3,29 +3,29 @@ title: OTA Update --- ## Table of Contents - * [Introduction](#introduction) - * [Security](#security) - * [Safety](#safety) - * [Basic Requirements](#basic-requirements) - * [Arduino IDE](#arduino-ide) - * [Requirements](#requirements) - * [Application Example](#application-example) - * [Classic OTA](#classic-ota) - * [ArduinoOTA](#arduinoota) - * [Web Browser](#web-browser) - * [Requirements](#requirements-1) - * [Implementation Overview](#implementation-overview) - * [Application Example](#application-example-1) - * [HTTP Server](#http-server) - * [Requirements](#requirements-2) - * [Arduino code](#arduino-code) - * [Simple updater](#simple-updater) - * [Advanced updater](#advanced-updater) - * [Server request handling](#server-request-handling) - * [Simple updater](#simple-updater-1) - * [Advanced updater](#advanced-updater-1) - * [Stream Interface](#stream-interface) - * [Updater class](#updater-class) + * [Introduction](#introduction) + * [Security](#security) + * [Safety](#safety) + * [Basic Requirements](#basic-requirements) + * [Arduino IDE](#arduino-ide) + * [Requirements](#requirements) + * [Application Example](#application-example) + * [Classic OTA](#classic-ota) + * [ArduinoOTA](#arduinoota) + * [Web Browser](#web-browser) + * [Requirements](#requirements-1) + * [Implementation Overview](#implementation-overview) + * [Application Example](#application-example-1) + * [HTTP Server](#http-server) + * [Requirements](#requirements-2) + * [Arduino code](#arduino-code) + * [Simple updater](#simple-updater) + * [Advanced updater](#advanced-updater) + * [Server request handling](#server-request-handling) + * [Simple updater](#simple-updater-1) + * [Advanced updater](#advanced-updater-1) + * [Stream Interface](#stream-interface) + * [Updater class](#updater-class) ## Introduction @@ -121,8 +121,9 @@ Instructions below demonstrate how to configure both [Classic OTA](#classic-ota- 2. Now prepare the sketch and configuration for the upload over a serial port. - Start Arduino IDE and load sketch DNS_SD_Arduino_OTA.ino available under File > Examples > ESP8266mDNS ![OTA sketch selection](ota-ide-sketch-selection.png) + **Note:** This sketch is available only for 1.6.5-947-g39819f0 (of July 23, 2015) and 1.6.5-1160-gef26c5f (of Sep 30, 2015) versions of platform packages installed in Arduino IDE using https://github.com/esp8266/Arduino#installing-with-boards-manager. It was removed in [#980](https://github.com/esp8266/Arduino/pull/980) from GitHub repository. - - Update ssid and pass in the sketch so the module can join your Wi-Fi network + - Update SSID and password in the sketch so the module can join your Wi-Fi network ![ssid and pass entry](ota-ide-ssid-pass-entry.png) - Configure upload parameters as below (you may need to adjust configuration if you are using a different module): ![configuration of serial upload](ota-ide-serial-upload-configuration.png) @@ -133,7 +134,7 @@ Instructions below demonstrate how to configure both [Classic OTA](#classic-ota- 4. Only if module is connected to network, after a couple of seconds, the esp8266-ota port will show up in Arduino IDE: - ![selection og OTA port](ota-ide-ota-port-selection.png) + ![selection of OTA port](ota-ide-ota-port-selection.png) 5. Now get ready for your first OTA upload by changing configuration settings as follows: @@ -145,7 +146,7 @@ Instructions below demonstrate how to configure both [Classic OTA](#classic-ota- ![OTA upload complete](ota-ide-ota-upload-complete.png) -**Note** To be able to upload your sketch over and over again using OTA, you need to embed OTA routines inside. Please use DNS_SD_Arduino_OTA.ino as an example. +**Note:** To be able to upload your sketch over and over again using OTA, you need to embed OTA routines inside. Please use DNS_SD_Arduino_OTA.ino as an example. #### ArduinoOTA @@ -217,15 +218,21 @@ You can use another module if it meets “Flash chip size is 2x the size of the - Start Arduino IDE and load sketch WebUpdater.ino available under File > Examples > ESP8266HTTPUpdateServer. - Update ssid and pass in the sketch so the module can join your Wi-Fi network. - Open File > Preferences, look for “Show verbose output during:” and check out “compilation” option. + ![Preferences - enablig verbose output during compilation](ota-web-show-verbose-compilation.png) + **Note:** This setting will be required in step 5 below. You can uncheck this setting afterwards. 3. Upload sketch (Ctrl+U). Once done open Serial Monitor (Ctrl+Shift+M) and check if you see the following message displayed, that contains url for OTA update. + ![Serial Monitor - after first load using serial](ota-web-serial-monitor-ready.png) - **Note:** Such message will be shown only after module successfully joins network and is ready for an OTA upload: + + **Note:** Such message will be shown only after module successfully joins network and is ready for an OTA upload. 4. Now open web browser and enter the url provided on Serial Monitor, i.e. http://esp8266-webupdate.local/update. Once entered, browser should display a form like below that has been served by your module. The form invites you to choose a file for update. + ![OTA update form in web browser](ota-web-browser-form.png) + **Note:** If entering “http://esp8266-webupdate.local/update” does not work, try replacing “esp8266-webupdate” with module’s IP address. For example, if your module IP is “192.168.1.100” then url should be “http://192.168.1.100/update”. This workaround is useful in case the host software installed in step 2 does not work. If still nothing works and there are no clues on Serial Monitor, try to diagnose issue by opening provided url in Google Chrome, pressing F12 and checking contents of “Console” and “Network” tabs. Chrome provides some advanced logging on these tabs. @@ -241,7 +248,7 @@ You can use another module if it meets “Flash chip size is 2x the size of the ![Serial Monitor - after OTA update](ota-web-serial-monitor-reboot.png) -Just after reboot you should see exactly the same message “HTTPUpdateServer ready! Open http:// esp8266-webupdate.local /update in your browser” like in step 3. This is because module has been loaded again with the same code – first using serial port, and then using OTA. + Just after reboot you should see exactly the same message “HTTPUpdateServer ready! Open http:// esp8266-webupdate.local /update in your browser” like in step 3. This is because module has been loaded again with the same code – first using serial port, and then using OTA. Once you are comfortable with this procedure go ahead and modify WebUpdater.ino sketch to print some additional messages, compile it, locate new binary file and upload it using web browser to see entered changes on a Serial Monitor. diff --git a/doc/reference.md b/doc/reference.md index 1138950e7..24cfaa58b 100644 --- a/doc/reference.md +++ b/doc/reference.md @@ -3,13 +3,13 @@ title: Reference --- ## Table of Contents - * [Table of Contents](#table-of-contents) - * [Digital IO](#digital-io) - * [Analog input](#analog-input) - * [Analog output](#analog-output) - * [Timing and delays](#timing-and-delays) - * [Serial](#serial) - * [Progmem](#progmem) + * [Table of Contents](#table-of-contents) + * [Digital IO](#digital-io) + * [Analog input](#analog-input) + * [Analog output](#analog-output) + * [Timing and delays](#timing-and-delays) + * [Serial](#serial) + * [Progmem](#progmem) ## Digital IO