docs(vale): Enable vale and fix errors (#10231)

* docs(vale): Enable vale and fix errors

* Apply suggestions
This commit is contained in:
Lucas Saavedra Vaz 2024-08-28 09:48:18 -03:00 committed by GitHub
parent e04f050639
commit 683fea103c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
51 changed files with 163 additions and 135 deletions

View File

@ -65,8 +65,6 @@ repos:
pass_filenames: false pass_filenames: false
args: [sync] args: [sync]
types_or: [markdown, rst] types_or: [markdown, rst]
stages: [manual]
- id: vale - id: vale
language_version: "1.21.6" language_version: "1.21.6"
types_or: [markdown, rst] types_or: [markdown, rst]
stages: [manual]

View File

@ -23,7 +23,7 @@ StylesPath = .vale/styles
# Specify the minimum alert severity that Vale will report. # Specify the minimum alert severity that Vale will report.
MinAlertLevel = suggestion # "suggestion", "warning", or "error" MinAlertLevel = error # "suggestion", "warning", or "error"
# Specify vocabulary for special treatment. # Specify vocabulary for special treatment.

View File

@ -53,7 +53,7 @@ analogReadResolution
^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^
This function is used to set the resolution of ``analogRead`` return value. Default is 12 bits (range from 0 to 4095) This function is used to set the resolution of ``analogRead`` return value. Default is 12 bits (range from 0 to 4095)
for all chips except ESP32S3 where default is 13 bits (range from 0 to 8191). for all chips except ESP32-S3 where default is 13 bits (range from 0 to 8191).
When different resolution is set, the values read will be shifted to match the given resolution. When different resolution is set, the values read will be shifted to match the given resolution.
Range is 1 - 16 .The default value will be used, if this function is not used. Range is 1 - 16 .The default value will be used, if this function is not used.
@ -146,7 +146,7 @@ analogSetWidth
.. note:: This function is only available for ESP32 chip. .. note:: This function is only available for ESP32 chip.
This function is used to set the hardware sample bits and read resolution. This function is used to set the hardware sample bits and read resolution.
Default is 12bit (0 - 4095). Default is 12 bits (0 - 4095).
Range is 9 - 12. Range is 9 - 12.
.. code-block:: arduino .. code-block:: arduino
@ -250,13 +250,13 @@ This function is used to set the attenuation for ADC continuous peripheral. For
void analogContinuousSetAtten(adc_attenuation_t attenuation); void analogContinuousSetAtten(adc_attenuation_t attenuation);
* ``attenuation`` sets the attenuation (default is 11db). * ``attenuation`` sets the attenuation (default is 11 dB).
analogContinuousSetWidth analogContinuousSetWidth
^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^
This function is used to set the hardware resolution bits. This function is used to set the hardware resolution bits.
Default value for all chips is 12bit (0 - 4095). Default value for all chips is 12 bits (0 - 4095).
.. note:: This function will take effect only for ESP32 chip, as it allows to set resolution in range 9-12 bits. .. note:: This function will take effect only for ESP32 chip, as it allows to set resolution in range 9-12 bits.

View File

@ -33,7 +33,7 @@ This function is used to set the DAC value for a given pin/DAC channel.
void dacWrite(uint8_t pin, uint8_t value); void dacWrite(uint8_t pin, uint8_t value);
* ``pin`` GPIO pin. * ``pin`` GPIO pin.
* ``value`` to be set. Range is 0 - 255 (equals 0V - 3.3V). * ``value`` to be set. Range is 0 - 255 (equals 0 V - 3.3 V).
dacDisable dacDisable
********** **********

View File

@ -104,7 +104,7 @@ Create an instance of the `ESP_NOW_Peer` class.
* ``mac_addr``: MAC address of the peer device. * ``mac_addr``: MAC address of the peer device.
* ``channel``: Communication channel. * ``channel``: Communication channel.
* ``iface``: WiFi interface. * ``iface``: Wi-Fi interface.
* ``lmk``: Optional. Pass the local master key (LMK) if encryption is enabled. * ``lmk``: Optional. Pass the local master key (LMK) if encryption is enabled.
add add
@ -190,24 +190,24 @@ Set the communication channel of the peer.
getInterface getInterface
^^^^^^^^^^^^ ^^^^^^^^^^^^
Get the WiFi interface of the peer. Get the Wi-Fi interface of the peer.
.. code-block:: cpp .. code-block:: cpp
wifi_interface_t getInterface() const; wifi_interface_t getInterface() const;
Returns the WiFi interface. Returns the Wi-Fi interface.
setInterface setInterface
^^^^^^^^^^^^ ^^^^^^^^^^^^
Set the WiFi interface of the peer. Set the Wi-Fi interface of the peer.
.. code-block:: cpp .. code-block:: cpp
void setInterface(wifi_interface_t iface); void setInterface(wifi_interface_t iface);
* ``iface``: WiFi interface. * ``iface``: Wi-Fi interface.
isEncrypted isEncrypted
^^^^^^^^^^^ ^^^^^^^^^^^

View File

@ -103,7 +103,7 @@ This function will return the current frequency configuration.
setTimeOut setTimeOut
^^^^^^^^^^ ^^^^^^^^^^
Set the bus timeout given in milliseconds. The default value is 50ms. Set the bus timeout given in milliseconds. The default value is 50 ms.
.. code-block:: arduino .. code-block:: arduino

View File

@ -5,7 +5,7 @@ ESP Insights
About About
----- -----
ESP Insights is a remote diagnostics solution that allows users to remotely monitor the health of ESP devices in the field. ESP Insights is a remote diagnostics solution that allows users to remotely monitor the health of Espressif devices in the field.
Developers normally prefer debugging issues by physically probing them using gdb or observing the logs. This surely helps debug issues, but there are often cases wherein issues are seen only in specific environments under specific conditions. Even things like casings and placement of the product can affect the behavior. A few examples are Developers normally prefer debugging issues by physically probing them using gdb or observing the logs. This surely helps debug issues, but there are often cases wherein issues are seen only in specific environments under specific conditions. Even things like casings and placement of the product can affect the behavior. A few examples are
@ -156,8 +156,8 @@ This function will return
Insights.metrics.dumpWiFi Insights.metrics.dumpWiFi
************************* *************************
Dumps the wifi metrics and prints them to the console. Dumps the Wi-Fi metrics and prints them to the console.
This API can be used to collect wifi metrics at any given point in time. This API can be used to collect Wi-Fi metrics at any given point in time.
.. code-block:: arduino .. code-block:: arduino
@ -185,8 +185,8 @@ Insights.metrics.setWiFiPeriod
****************************** ******************************
Reset the periodic interval Reset the periodic interval
By default, wifi metrics are collected every 30 seconds, this function can be used to change the interval. By default, Wi-Fi metrics are collected every 30 seconds, this function can be used to change the interval.
If the interval is set to 0, wifi metrics collection disabled. If the interval is set to 0, Wi-Fi metrics collection disabled.
.. code-block:: arduino .. code-block:: arduino

View File

@ -29,7 +29,7 @@ ESP RainMaker Agent API
RMaker.initNode RMaker.initNode
*************** ***************
This initializes the ESP RainMaker agent, wifi and creates the node. This initializes the ESP RainMaker agent, Wi-Fi and creates the node.
You can also set the configuration of the node using the following API You can also set the configuration of the node using the following API
@ -54,7 +54,7 @@ It starts the ESP RainMaker agent.
**NOTE**: **NOTE**:
1. ESP RainMaker agent should be initialized before this call. 1. ESP RainMaker agent should be initialized before this call.
2. Once ESP RainMaker agent starts, compulsorily call WiFi.beginProvision() API. 2. Once ESP RainMaker agent starts, compulsorily call ``WiFi.beginProvision()`` API.
.. code-block:: arduino .. code-block:: arduino

View File

@ -36,7 +36,7 @@ touchSetCycles
^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^
This function is used to set cycles that measurement operation takes. The result from touchRead, threshold and detection accuracy depend on these values. This function is used to set cycles that measurement operation takes. The result from touchRead, threshold and detection accuracy depend on these values.
The defaults are setting touchRead to take ~0.5ms. The defaults are setting touchRead to take ~0.5 ms.
.. code-block:: arduino .. code-block:: arduino
@ -112,8 +112,8 @@ the threshold value. Default is lower.
void touchInterruptSetThresholdDirection(bool mustbeLower); void touchInterruptSetThresholdDirection(bool mustbeLower);
TOUCH API specific for ESP32S2 and ESP32S3 chip (TOUCH_V2) TOUCH API specific for ESP32-S2 and ESP32-S3 chip (TOUCH_V2)
********************************************************** ************************************************************
touchInterruptGetLastStatus touchInterruptGetLastStatus
^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -154,7 +154,7 @@ Get the USB power configuration.
uint16_t usbPower(void); uint16_t usbPower(void);
Return the current in mA. The default value is: ``0x500`` (500mA). Return the current in mA. The default value is: ``0x500`` (500 mA).
usbClass usbClass
^^^^^^^^ ^^^^^^^^

View File

@ -43,7 +43,7 @@ This is the mode to be used if you want to connect your project to the Internet.
API Description API Description
--------------- ---------------
Here is the description of the WiFi API. Here is the description of the Wi-Fi API.
Common API Common API
---------- ----------
@ -53,7 +53,7 @@ Here are the common APIs that are used for both modes, AP and STA.
onEvent (and removeEvent) onEvent (and removeEvent)
************************* *************************
Registers a caller-supplied function to be called when WiFi events Registers a caller-supplied function to be called when Wi-Fi events
occur. Several forms are available. occur. Several forms are available.
Function pointer callback taking the event ID: Function pointer callback taking the event ID:
@ -92,7 +92,7 @@ A similar set of functions are available to remove callbacks:
In all cases, the subscribing function accepts an optional event type to In all cases, the subscribing function accepts an optional event type to
invoke the callback only for that specific event; with the default invoke the callback only for that specific event; with the default
``ARDUINO_EVENT_MAX``, the callback will be invoked for all WiFi events. ``ARDUINO_EVENT_MAX``, the callback will be invoked for all Wi-Fi events.
Any callback function is given the event type in a parameter. Any callback function is given the event type in a parameter.
Some of the possible callback function formats also take an Some of the possible callback function formats also take an
@ -141,9 +141,9 @@ may be retrieved:
.. warning:: .. warning::
The ``setHostname()`` function must be called BEFORE WiFi is started with The ``setHostname()`` function must be called BEFORE Wi-Fi is started with
``WiFi.begin()``, ``WiFi.softAP()``, ``WiFi.mode()``, or ``WiFi.run()``. ``WiFi.begin()``, ``WiFi.softAP()``, ``WiFi.mode()``, or ``WiFi.run()``.
To change the name, reset WiFi with ``WiFi.mode(WIFI_MODE_NULL)``, To change the name, reset Wi-Fi with ``WiFi.mode(WIFI_MODE_NULL)``,
then proceed with ``WiFi.setHostname(...)`` and restart WiFi from scratch. then proceed with ``WiFi.setHostname(...)`` and restart WiFi from scratch.
useStaticBuffers useStaticBuffers
@ -619,7 +619,7 @@ WiFiScan
To perform the Wi-Fi scan for networks, you can use the following functions: To perform the Wi-Fi scan for networks, you can use the following functions:
Start scan WiFi networks available. Start scan Wi-Fi networks available.
.. code-block:: arduino .. code-block:: arduino
@ -637,7 +637,7 @@ Delete last scan result from RAM.
void scanDelete(); void scanDelete();
Loads all infos from a scanned wifi in to the ptr parameters. Loads all infos from a scanned Wi-Fi in to the ptr parameters.
.. code-block:: arduino .. code-block:: arduino
@ -648,7 +648,7 @@ To see how to use the ``WiFiScan``, take a look at the ``WiFiScan.ino`` or ``WiF
Examples Examples
-------- --------
`Complete list of WiFi examples <https://github.com/espressif/arduino-esp32/tree/master/libraries/WiFi/examples>`_. `Complete list of Wi-Fi examples <https://github.com/espressif/arduino-esp32/tree/master/libraries/WiFi/examples>`_.
.. _ap example: .. _ap example:

View File

@ -7,8 +7,8 @@ The ESP32-C3-DevKitM-1 development board is one of Espressif's official boards.
Specifications Specifications
-------------- --------------
- Small­ sized 2.4 GHz Wi­Fi (802.11 b/g/n) and Bluetooth® 5 module - Small sized 2.4 GHz Wi-Fi (802.11b/g/n) and Bluetooth® 5 module
- Built around ESP32­C3 series of SoCs, RISC­V single­core microprocessor - Built around ESP32-C3 series of SoCs, RISC-V single-core microprocessor
- 4 MB flash in chip package - 4 MB flash in chip package
- 15 available GPIOs (module) - 15 available GPIOs (module)
- Peripherals - Peripherals
@ -30,7 +30,7 @@ Specifications
- 2 × 54-bit general-purpose timers - 2 × 54-bit general-purpose timers
- 3 × watchdog timers - 3 × watchdog timers
- 1 × 52-bit system timer - 1 × 52-bit system timer
- On­board PCB antenna or external antenna connector - PCB antenna or external antenna connector
Header Block Header Block
------------ ------------
@ -40,6 +40,9 @@ Header Block
J1 J1
^^^ ^^^
.. vale off
=== ==== ========== =================================== === ==== ========== ===================================
No. Name Type [1]_ Function No. Name Type [1]_ Function
=== ==== ========== =================================== === ==== ========== ===================================
@ -60,6 +63,8 @@ No. Name Type [1]_ Function
15 GND G Ground 15 GND G Ground
=== ==== ========== =================================== === ==== ========== ===================================
.. vale on
J3 J3
^^^ ^^^
=== ==== ========== ==================================== === ==== ========== ====================================

View File

@ -7,7 +7,7 @@ The `ESP32-DevKitC-1`_ development board is one of Espressif's official boards.
Specifications Specifications
-------------- --------------
- Wi-Fi 802.11 b/g/n (802.11n up to 150 Mbps) - Wi-Fi 802.11b/g/n (802.11n up to 150 Mbps)
- Bluetooth v4.2 BR/EDR and BLE specification - Bluetooth v4.2 BR/EDR and BLE specification
- Built around ESP32 series of SoCs - Built around ESP32 series of SoCs
- Integrated 4 MB SPI flash - Integrated 4 MB SPI flash
@ -28,7 +28,7 @@ Specifications
- ADC - ADC
- DAC - DAC
- Two-Wire Automotive Interface (TWAI®, compatible with ISO11898-1) - Two-Wire Automotive Interface (TWAI®, compatible with ISO11898-1)
- On­board PCB antenna or external antenna connector - PCB antenna or external antenna connector
Header Block Header Block
------------ ------------
@ -38,6 +38,9 @@ Header Block
J1 J1
^^^ ^^^
.. vale off
=== ==== ===== =================================== === ==== ===== ===================================
No. Name Type Function No. Name Type Function
=== ==== ===== =================================== === ==== ===== ===================================
@ -62,6 +65,8 @@ No. Name Type Function
19 5V0 P 5 V power supply 19 5V0 P 5 V power supply
=== ==== ===== =================================== === ==== ===== ===================================
.. vale on
J3 J3
^^^ ^^^
=== ==== ===== ==================================== === ==== ===== ====================================
@ -110,7 +115,7 @@ Some of the GPIO's have important features during the booting process. Here is t
==== ========= ===================================================================== ============ ============== ==== ========= ===================================================================== ============ ==============
GPIO Default Function Pull-up Pull-down GPIO Default Function Pull-up Pull-down
==== ========= ===================================================================== ============ ============== ==== ========= ===================================================================== ============ ==============
IO12 Pull-down Voltage of Internal LDO (VDD_SDIO) 1V8 3V3 IO12 Pull-down Voltage of Internal LDO (VDD_SDIO) 1.8 V 3.3 V
IO0 Pull-up Booting Mode SPI Boot Download Boot IO0 Pull-up Booting Mode SPI Boot Download Boot
IO2 Pull-down Booting Mode Don't Care Download Boot IO2 Pull-down Booting Mode Don't Care Download Boot
IO15 Pull-up Enabling/Disabling Log Print During Booting and Timing of SDIO Slave U0TXD Active U0TXD Silent IO15 Pull-up Enabling/Disabling Log Print During Booting and Timing of SDIO Slave U0TXD Active U0TXD Silent

View File

@ -7,7 +7,7 @@ The `ESP32-S2-Saola-1`_ development board is one of Espressif's official boards.
Specifications Specifications
-------------- --------------
- Wi-Fi 802.11 b/g/n (802.11n up to 150 Mbps) - Wi-Fi 802.11b/g/n (802.11n up to 150 Mbps)
- Built around ESP32-S2 series of SoCs Xtensa® single-core - Built around ESP32-S2 series of SoCs Xtensa® single-core
- Integrated 4 MB SPI flash - Integrated 4 MB SPI flash
- Integrated 2 MB PSRAM - Integrated 2 MB PSRAM
@ -28,7 +28,7 @@ Specifications
- 1 × LCD interface (8-bit serial RGB/8080/6800), implemented using the hardware resources of SPI2 - 1 × LCD interface (8-bit serial RGB/8080/6800), implemented using the hardware resources of SPI2
- 1 × LCD interface (8/16/24-bit parallel), implemented using the hardware resources of I2S - 1 × LCD interface (8/16/24-bit parallel), implemented using the hardware resources of I2S
- 1 × TWAI® controller (compatible with ISO 11898-1) - 1 × TWAI® controller (compatible with ISO 11898-1)
- On­board PCB antenna or external antenna connector - PCB antenna or external antenna connector
Header Block Header Block
------------ ------------
@ -38,6 +38,9 @@ Header Block
J2 J2
^^^ ^^^
.. vale off
=== ==== ===== =================================== === ==== ===== ===================================
No. Name Type Function No. Name Type Function
=== ==== ===== =================================== === ==== ===== ===================================
@ -64,6 +67,8 @@ No. Name Type Function
21 GND G Ground 21 GND G Ground
=== ==== ===== =================================== === ==== ===== ===================================
.. vale on
J3 J3
^^^ ^^^
=== ==== ===== ==================================== === ==== ===== ====================================
@ -114,7 +119,7 @@ Some of the GPIO's have important features during the booting process. Here is t
==== ========= ===================================================================== ============ ============== ==== ========= ===================================================================== ============ ==============
GPIO Default Function Pull-up Pull-down GPIO Default Function Pull-up Pull-down
==== ========= ===================================================================== ============ ============== ==== ========= ===================================================================== ============ ==============
IO45 Pull-down Voltage of Internal LDO (VDD_SDIO) 1V8 3V3 IO45 Pull-down Voltage of Internal LDO (VDD_SDIO) 1.8 V 3.3 V
IO0 Pull-up Booting Mode SPI Boot Download Boot IO0 Pull-up Booting Mode SPI Boot Download Boot
IO46 Pull-down Booting Mode Don't Care Download Boot IO46 Pull-down Booting Mode Don't Care Download Boot
IO46 Pull-up Enabling/Disabling Log Print During Booting and Timing of SDIO Slave U0TXD Active U0TXD Silent IO46 Pull-up Enabling/Disabling Log Print During Booting and Timing of SDIO Slave U0TXD Active U0TXD Silent

View File

@ -12,6 +12,9 @@ Header Block
Header1 Header1
^^^^^^^ ^^^^^^^
.. vale off
=== ==== ===== =================================== === ==== ===== ===================================
No. Name Type Function No. Name Type Function
=== ==== ===== =================================== === ==== ===== ===================================
@ -21,6 +24,8 @@ No. Name Type Function
4 GND G Ground 4 GND G Ground
=== ==== ===== =================================== === ==== ===== ===================================
.. vale on
Pin Layout Pin Layout
---------- ----------

View File

@ -178,12 +178,14 @@ If you are writing code that does not require Arduino to compile and you want yo
FreeRTOS Tick Rate (Hz) FreeRTOS Tick Rate (Hz)
----------------------- -----------------------
The Arduino component requires the FreeRTOS tick rate `CONFIG_FREERTOS_HZ` set to 1000Hz in `make menuconfig` -> `Component config` -> `FreeRTOS` -> `Tick rate`. The Arduino component requires the FreeRTOS tick rate `CONFIG_FREERTOS_HZ` set to 1000 Hz in `make menuconfig` -> `Component config` -> `FreeRTOS` -> `Tick rate`.
Compilation Errors Compilation Errors
------------------ ------------------
As commits are made to esp-idf and submodules, the codebases can develop incompatibilities that cause compilation errors. If you have problems compiling, follow the instructions in `Issue #1142 <https://github.com/espressif/arduino-esp32/issues/1142>`_ to roll esp-idf back to a different version. As commits are made to ESP-IDF and submodules, the codebases can develop incompatibilities that cause compilation errors.
If you have problems compiling, follow the instructions in `Issue #1142 <https://github.com/espressif/arduino-esp32/issues/1142>`_
to roll ESP-IDF back to a different version.
Adding arduino library Adding arduino library
---------------------- ----------------------

View File

@ -64,14 +64,14 @@ Supported Operating Systems
--------------------------- ---------------------------
+-------------------+-------------------+-------------------+ +-------------------+-------------------+-------------------+
| |windows-logo| | |linux-logo| | |macos-logo| | | |windows-logo| | |linux-logo| | |macOS-logo| |
+-------------------+-------------------+-------------------+ +-------------------+-------------------+-------------------+
| Windows | Linux | macOS | | Windows | Linux | macOS |
+-------------------+-------------------+-------------------+ +-------------------+-------------------+-------------------+
.. |windows-logo| image:: ../_static/logo_windows.png .. |windows-logo| image:: ../_static/logo_windows.png
.. |linux-logo| image:: ../_static/logo_linux.png .. |linux-logo| image:: ../_static/logo_linux.png
.. |macos-logo| image:: ../_static/logo_macos.png .. |macOS-logo| image:: ../_static/logo_macos.png
Supported IDEs Supported IDEs
--------------------------- ---------------------------

View File

@ -316,7 +316,7 @@ After that, you can use the following structure to include the image in the docs
You can adjust the ``width`` according to the image size. You can adjust the ``width`` according to the image size.
Be sure the file size does not exceed 600kB. Be sure the file size does not exceed 600 kB.
Support Support
******* *******

View File

@ -66,12 +66,12 @@ Flash Frequency
Use this function to select the flash memory frequency. The frequency will be dependent on the memory model. Use this function to select the flash memory frequency. The frequency will be dependent on the memory model.
* **40MHz** * **40 MHz**
* **80MHz** * **80 MHz**
If you don't know if your memory supports **80Mhz**, you can try to upload the sketch using the **80MHz** option and watch the log output via the serial monitor. If you don't know if your memory supports **80 MHz**, you can try to upload the sketch using the **80 MHz** option and watch the log output via the serial monitor.
.. note:: In some boards/SoC, the flash frequency is automatically selected according to the flash mode. In some cases (i.e ESP32-S3), the flash frequency is up to 120MHz. .. note:: In some boards/SoC, the flash frequency is automatically selected according to the flash mode. In some cases (i.e ESP32-S3), the flash frequency is up to 120 MHz.
Flash Mode Flash Mode
********** **********
@ -95,17 +95,17 @@ Depending on the application, this mode can be changed in order to increase the
* **OPI** - Octal I/O * **OPI** - Octal I/O
* Eight SPI pins are used to write and to read from the flash. * Eight SPI pins are used to write and to read from the flash.
If you don't know how the board flash is physically connected or the flash memory model, try the **QIO** at **80MHz** first. If you don't know how the board flash is physically connected or the flash memory model, try the **QIO** at **80 MHz** first.
Flash Size Flash Size
********** **********
This option is used to select the flash size. The flash size should be selected according to the flash model used on your board. This option is used to select the flash size. The flash size should be selected according to the flash model used on your board.
* **2MB** (16Mb) * **2 MB** (16 Mb)
* **4MB** (32Mb) * **4 MB** (32 Mb)
* **8MB** (64Mb) * **8 MB** (64 Mb)
* **16MB** (128Mb) * **16 MB** (128 Mb)
If you choose the wrong size, you may have issues when selecting the partition scheme. If you choose the wrong size, you may have issues when selecting the partition scheme.
@ -118,13 +118,13 @@ Some SoC has embedded flash. The ESP32-S3 is a good example.
Example: **ESP32-S3FH4R2** Example: **ESP32-S3FH4R2**
This particular ESP32-S3 variant comes with 4MB Flash and 2MB PSRAM. This particular ESP32-S3 variant comes with 4 MB Flash and 2 MB PSRAM.
**Options for Embedded Flash** **Options for Embedded Flash**
* **Fx4** 4MB Flash (*QIO*) * **Fx4** 4 MB Flash (*QIO*)
* **Fx8** 8MB Flash (*QIO*) * **Fx8** 8 MB Flash (*QIO*)
* **V** 1.8V SPI * **V** 1.8 V SPI
The **x** stands for the temperature range specification. The **x** stands for the temperature range specification.
@ -169,13 +169,13 @@ Some SoC has embedded PSRAM. The ESP32-S3 is a good example.
Example: **ESP32-S3FH4R2** Example: **ESP32-S3FH4R2**
This particular ESP32-S3 comes with 4MB Flash and 2MB PSRAM. This particular ESP32-S3 comes with 4 MB Flash and 2 MB PSRAM.
**Options for Embedded Flash and PSRAM** **Options for Embedded Flash and PSRAM**
* **R2** 2MB PSRAM (*QSPI*) * **R2** 2 MB PSRAM (*QSPI*)
* **R8** 8MB PSRAM (*OPI*) * **R8** 8 MB PSRAM (*OPI*)
* **V** 1.8V SPI * **V** 1.8 V SPI
The **x** stands for the temperature range specification. The **x** stands for the temperature range specification.

View File

@ -355,7 +355,7 @@ Where ``~/Documents/Arduino`` represents your sketch book location as per "Ardui
- Try ``python3`` instead of ``python`` if you get the error: ``IOError: [Errno socket error] [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590)`` when running ``python get.py`` - Try ``python3`` instead of ``python`` if you get the error: ``IOError: [Errno socket error] [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590)`` when running ``python get.py``
- If you get the following error when running ``python get.py`` urllib.error.URLError: <urlopen error SSL: CERTIFICATE_VERIFY_FAILED, go to Macintosh HD > Applications > Python3.6 folder (or any other python version), and run the following scripts: Install Certificates.command and Update Shell Profile.command - If you get the following error when running ``python get.py``: ``urllib.error.URLError: <urlopen error SSL: CERTIFICATE_VERIFY_FAILED``, go to ``Macintosh HD > Applications > Python3.6 folder (or any other python version)``, and run the following scripts: Install Certificates.command and Update Shell Profile.command
- Restart Arduino IDE. - Restart Arduino IDE.

View File

@ -172,7 +172,7 @@ Set the build type. ex. 'build' to build the project and prepare for uploading t
Additional Configuration Additional Configuration
^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^
Specify additional configs to be applied. ex. 'qio 80m' to compile for QIO Flash@80MHz. Specify additional configs to be applied. ex. ``qio 80m`` to compile for QIO Flash at 80 MHz.
.. note:: This command requires the ``-b`` to work properly. .. note:: This command requires the ``-b`` to work properly.

View File

@ -217,8 +217,8 @@ Functional changes
* ``begin(baud)`` will not change any pins that have been set before this call, through a previous ``begin(baud, rx, tx)`` or ``setPin()``. * ``begin(baud)`` will not change any pins that have been set before this call, through a previous ``begin(baud, rx, tx)`` or ``setPin()``.
* If the application only uses RX or TX, ``begin(baud, -1, tx)`` or ``begin(baud, rx)`` will change only the assigned pin and keep the other unchanged. * If the application only uses RX or TX, ``begin(baud, -1, tx)`` or ``begin(baud, rx)`` will change only the assigned pin and keep the other unchanged.
WiFi Wi-Fi
**** *****
Functional changes Functional changes
^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^

View File

@ -62,8 +62,8 @@ Here are some steps that you can try:
* Make sure that nothing is connected to pins labeled **TX** and **RX**. Please refer to the pin layout table - some TX and RX pins may not be labeled on the dev board. * Make sure that nothing is connected to pins labeled **TX** and **RX**. Please refer to the pin layout table - some TX and RX pins may not be labeled on the dev board.
* In some instances, you must keep **GPIO0** LOW during the uploading process via the serial interface. * In some instances, you must keep **GPIO0** LOW during the uploading process via the serial interface.
* Hold down the **“BOOT”** button on your ESP32 board while uploading/flashing. * Hold down the **“BOOT”** button on your ESP32 board while uploading/flashing.
* Solder a **10uF** capacitor in parallel with **RST** and **GND**. * Solder a **10 uF** capacitor in parallel with **RST** and **GND**.
* If you are using external power connected to pins, it is easy to confuse pins **CMD** (which is usually next to the 5V pin) and **GND**. * If you are using external power connected to pins, it is easy to confuse pins **CMD** (which is usually next to the ``5V`` pin) and **GND**.
In some development boards, you can try adding the reset delay circuit, as described in the *Power-on Sequence* section on the `ESP32 Hardware Design Guidelines <https://www.espressif.com/sites/default/files/documentation/esp32_hardware_design_guidelines_en.pdf>`_ to get into the download mode automatically. In some development boards, you can try adding the reset delay circuit, as described in the *Power-on Sequence* section on the `ESP32 Hardware Design Guidelines <https://www.espressif.com/sites/default/files/documentation/esp32_hardware_design_guidelines_en.pdf>`_ to get into the download mode automatically.
@ -131,7 +131,7 @@ I have uploaded firmware to the ESP32 device, but I don't see any response from
Solution Solution
^^^^^^^^ ^^^^^^^^
Newer ESP32 variants have two possible USB connectors- USB and UART. The UART connector will go through a USB->UART adapter, and will typically present itself with the name of that mfr (eg, Silicon Labs CP210x UART Bridge). The USB connector can be used as a USB-CDC bridge and will appear as an Espressif device (Espressif USB JTAG/serial debug unit). On Espressif devkits, both connections are available, and will be labeled. ESP32 can only use UART, so will only have one connector. Other variants with one connector will typically be using USB. Please check in the product [datasheet](https://products.espressif.com) or [hardware guide](https://www.espressif.com/en/products/devkits) to find Espressif products with the appropriate USB connections for your needs. Newer ESP32 variants have two possible USB connectors - USB and UART. The UART connector will go through a USB->UART adapter, and will typically present itself with the name of that mfr (eg, Silicon Labs CP210x UART Bridge). The USB connector can be used as a USB-CDC bridge and will appear as an Espressif device (Espressif USB JTAG/serial debug unit). On Espressif devkits, both connections are available, and will be labeled. ESP32 can only use UART, so will only have one connector. Other variants with one connector will typically be using USB. Please check in the product [datasheet](https://products.espressif.com) or [hardware guide](https://www.espressif.com/en/products/devkits) to find Espressif products with the appropriate USB connections for your needs.
If you use the UART connector, you should disable USB-CDC on boot under the Tools menu (-D ARDUINO_USB_CDC_ON_BOOT=0). If you use the USB connector, you should have that enabled (-D ARDUINO_USB_CDC_ON_BOOT=1) and set USB Mode to "Hardware CDC and JTAG" (-D ARDUINO_USB_MODE=0). If you use the UART connector, you should disable USB-CDC on boot under the Tools menu (-D ARDUINO_USB_CDC_ON_BOOT=0). If you use the USB connector, you should have that enabled (-D ARDUINO_USB_CDC_ON_BOOT=1) and set USB Mode to "Hardware CDC and JTAG" (-D ARDUINO_USB_MODE=0).
USB-CDC may not be able to initialize in time to catch all the data if your device is in a tight reboot loop. This can make it difficult to troubleshoot initialization issues. USB-CDC may not be able to initialize in time to catch all the data if your device is in a tight reboot loop. This can make it difficult to troubleshoot initialization issues.

View File

@ -39,25 +39,25 @@ Where:
``ota`` ``ota``
The ota subtype is used to store the OTA information. This partition is used only when the OTA is used to select the initialization partition, otherwise no need to add it to your custom partition table. The ota subtype is used to store the OTA information. This partition is used only when the OTA is used to select the initialization partition, otherwise no need to add it to your custom partition table.
The size of this partition should be a fixed size of 8kB (0x2000 bytes). The size of this partition should be a fixed size of 8 kB (0x2000 bytes).
``nvs`` ``nvs``
The nvs partition subtype is used to define the partition to store general data, like the WiFi data, device PHY calibration data and any other data to be stored on the non-volatile memory. The nvs partition subtype is used to define the partition to store general data, like the Wi-Fi data, device PHY calibration data and any other data to be stored on the non-volatile memory.
This kind of partition is suitable for small custom configuration data, cloud certificates, etc. Another usage for the NVS is to store sensitive data, since the NVS supports encryption. This kind of partition is suitable for small custom configuration data, cloud certificates, etc. Another usage for the NVS is to store sensitive data, since the NVS supports encryption.
It is highly recommended to add at least one nvs partition, labeled with the name nvs, in your custom partition tables with size of at least 12kB (0x3000 bytes). If needed, you can increase the size of the nvs partition. It is highly recommended to add at least one nvs partition, labeled with the name nvs, in your custom partition tables with size of at least 12 kB (0x3000 bytes). If needed, you can increase the size of the nvs partition.
The recommended size for this partition is from 12kb to 64kb. Although larger NVS partitions can be defined, we recommend using FAT or SPIFFS filesystem for storage of larger amounts of data. The recommended size for this partition is from 12 kB to 64 kB. Although larger NVS partitions can be defined, we recommend using FAT or SPIFFS filesystem for storage of larger amounts of data.
``coredump`` ``coredump``
The coredump partition subtype is used to store the core dump on the flash. The core dump is used to analyze critical errors like crash and panic. The coredump partition subtype is used to store the core dump on the flash. The core dump is used to analyze critical errors like crash and panic.
This function must be enabled in the project configuration menu and set the data destination to flash. This function must be enabled in the project configuration menu and set the data destination to flash.
The recommended size for this partition is 64kB (0x10000). The recommended size for this partition is 64 kB (0x10000).
``nvs_keys`` ``nvs_keys``
The nvs_keys partition subtype is used to store the keys when the NVS encryption is used. The nvs_keys partition subtype is used to store the keys when the NVS encryption is used.
The size for this partition is 4kB (0x1000). The size for this partition is 4 kB (0x1000).
``fat`` ``fat``
@ -90,7 +90,7 @@ Where:
The offset defines the partition start address. The offset is defined by the sum of the offset and the size of the earlier partition. The offset defines the partition start address. The offset is defined by the sum of the offset and the size of the earlier partition.
.. note:: .. note::
Offset must be multiple of 4kB (0x1000) and for app partitions it must be aligned by 64kB (0x10000). Offset must be multiple of 4 kB (0x1000) and for app partitions it must be aligned by 64 kB (0x10000).
If left blank, the offset will be automatically calculated based on the end of the previous partition, including any necessary alignment, however, the offset for the first partition must be always set as **0x9000** and for the first application partition **0x10000**. If left blank, the offset will be automatically calculated based on the end of the previous partition, including any necessary alignment, however, the offset for the first partition must be always set as **0x9000** and for the first application partition **0x10000**.
5. **Size** 5. **Size**
@ -129,13 +129,13 @@ Here is an example you can use for a custom partition table:
app1, app, ota_1, , 2M, app1, app, ota_1, , 2M,
spiffs, data, spiffs, , 8M, spiffs, data, spiffs, , 8M,
This partition will use about 12MB of the 16MB flash. The offset will be automatically calculated after the first application partition and the units are in K and M. This partition will use about 12 MB of the 16 MB flash. The offset will be automatically calculated after the first application partition and the units are in K and M.
An alternative is to create the new partition table as a new file in the `tools/partitions <https://github.com/espressif/arduino-esp32/tree/master/tools/partitions>`_ folder and edit the `boards.txt <https://github.com/espressif/arduino-esp32/tree/master/boards.txt>`_ file to add your custom partition table. An alternative is to create the new partition table as a new file in the `tools/partitions <https://github.com/espressif/arduino-esp32/tree/master/tools/partitions>`_ folder and edit the `boards.txt <https://github.com/espressif/arduino-esp32/tree/master/boards.txt>`_ file to add your custom partition table.
Another alternative is to create the new partition table as a new file, and place it in the `variants <https://github.com/espressif/arduino-esp32/tree/master/variants>`_ folder under your boards folder, and edit the `boards.txt <https://github.com/espressif/arduino-esp32/tree/master/boards.txt>`_ file to add your custom partition table, noting that in order for the compiler to find your custom partition table file you must use the '.build.custom_partitions=' option in the boards.txt file, rather than the standard '.build.partitions=' option. The '.build.variant=' option has the name of the folder holding your custom partition table in the variants folder. Another alternative is to create the new partition table as a new file, and place it in the `variants <https://github.com/espressif/arduino-esp32/tree/master/variants>`_ folder under your boards folder, and edit the `boards.txt <https://github.com/espressif/arduino-esp32/tree/master/boards.txt>`_ file to add your custom partition table, noting that in order for the compiler to find your custom partition table file you must use the '.build.custom_partitions=' option in the boards.txt file, rather than the standard '.build.partitions=' option. The '.build.variant=' option has the name of the folder holding your custom partition table in the variants folder.
An example of the PartitionScheme listing using the ESP32S3 Dev Module as a reference, would be to have the following: An example of the PartitionScheme listing using the ESP32-S3 Dev Module as a reference, would be to have the following:
**Custom Partition - CSV file in /variants/custom_esp32s3/ folder** **Custom Partition - CSV file in /variants/custom_esp32s3/ folder**
@ -150,7 +150,7 @@ An example of the PartitionScheme listing using the ESP32S3 Dev Module as a refe
Examples Examples
-------- --------
**2MB no OTA** **2 MB no OTA**
.. code-block:: .. code-block::
@ -158,7 +158,7 @@ Examples
nvs, data, nvs, 36K, 20K, nvs, data, nvs, 36K, 20K,
factory, app, factory, 64K, 1900K, factory, app, factory, 64K, 1900K,
**4MB no OTA** **4 MB no OTA**
.. code-block:: .. code-block::
@ -166,7 +166,7 @@ Examples
nvs, data, nvs, 36K, 20K, nvs, data, nvs, 36K, 20K,
factory, app, factory, 64K, 4000K, factory, app, factory, 64K, 4000K,
**4MB with OTA** **4 MB with OTA**
.. code-block:: .. code-block::
@ -176,7 +176,7 @@ Examples
app0, app, ota_0, 64K, 1900K, app0, app, ota_0, 64K, 1900K,
app1, app, ota_1, , 1900K, app1, app, ota_1, , 1900K,
**8MB no OTA with Storage** **8 MB no OTA with Storage**
.. code-block:: .. code-block::
@ -185,7 +185,7 @@ Examples
factory, app, factory, 64K, 2M, factory, app, factory, 64K, 2M,
spiffs, data, spiffs, , 5M, spiffs, data, spiffs, , 5M,
**8MB with OTA and Storage** **8 MB with OTA and Storage**
.. code-block:: .. code-block::

View File

@ -386,7 +386,7 @@ To send to the serial monitor the number of available entries the following coul
The number of available entries in the key table changes depending on the number of keys in the namespace and also the dynamic size of certain types of data stored in the namespace. Details are in the `Preferences API Reference`_. The number of available entries in the key table changes depending on the number of keys in the namespace and also the dynamic size of certain types of data stored in the namespace. Details are in the `Preferences API Reference`_.
Do note that the number of entries in the key table does not guarantee that there is room in the opened NVS namespace for all the data to be stored in that namespace. Refer to the espressif `Non-volatile storage library`_ documentation for full details. Do note that the number of entries in the key table does not guarantee that there is room in the opened NVS namespace for all the data to be stored in that namespace. Refer to the Espressif `Non-volatile storage library`_ documentation for full details.
Determining the Type of a key-value Pair Determining the Type of a key-value Pair

View File

@ -1,5 +1,5 @@
# ESP32 BLE for Arduino # ESP32 BLE for Arduino
The Arduino IDE provides an excellent library package manager where versions of libraries can be downloaded and installed. This Github project provides the repository for the ESP32 BLE support for Arduino. The Arduino IDE provides an excellent library package manager where versions of libraries can be downloaded and installed. This Github project provides the repository for the ESP32 BLE support for Arduino.
The original source of the project, **which is not maintained anymore**, can be found here: https://github.com/nkolban/esp32-snippets The original source of the project, **which is not maintained anymore**, can be found here: https://github.com/nkolban/esp32-snippets

View File

@ -1,4 +1,4 @@
## EEPROM ## EEPROM
EEPROM is deprecated. For new applications on ESP32, use Preferences. EEPROM is provided for backwards compatibility with existing Arduino applications. EEPROM is deprecated. For new applications on ESP32, use Preferences. EEPROM is provided for backwards compatibility with existing Arduino applications.
EEPROM is implemented using a single blob within NVS, so it is a container within a container. As such, it is not going to be a high performance storage method. Preferences will directly use nvs, and store each entry as a single object therein. EEPROM is implemented using a single blob within NVS, so it is a container within a container. As such, it is not going to be a high performance storage method. Preferences will directly use nvs, and store each entry as a single object therein.

View File

@ -32,7 +32,7 @@ It is also worth mentioning that two or more tasks running the same function wil
``` ```
- **pxTaskCode** is the name of your function which will run as a task - **pxTaskCode** is the name of your function which will run as a task
- **pcName** is a string of human-readable descriptions for your task - **pcName** is a string of human-readable descriptions for your task
- **usStackDepth** is the number of words (word = 4B) available to the task. If you see an error similar to this "Debug exception reason: Stack canary watchpoint triggered (Task Blink)" you should increase it - **usStackDepth** is the number of words (word = 4 B) available to the task. If you see an error similar to this "Debug exception reason: Stack canary watchpoint triggered (Task Blink)" you should increase it
- **pvParameters** is a parameter that will be passed to the task function - it must be explicitly converted to (void*) and in your function explicitly converted back to the intended data type. - **pvParameters** is a parameter that will be passed to the task function - it must be explicitly converted to (void*) and in your function explicitly converted back to the intended data type.
- **uxPriority** is a number from 0 to configMAX_PRIORITIES which determines how the FreeRTOS will allow the tasks to run. 0 is the lowest priority. - **uxPriority** is a number from 0 to configMAX_PRIORITIES which determines how the FreeRTOS will allow the tasks to run. 0 is the lowest priority.
- **pxCreatedTask** task handle is a pointer to the task which allows you to manipulate the task - delete it, suspend and resume. - **pxCreatedTask** task handle is a pointer to the task which allows you to manipulate the task - delete it, suspend and resume.

View File

@ -39,7 +39,7 @@ You can do the following:
* In the Arduino IDE go to the Tools menu and set `Erase All Flash Before Sketch Upload` to `Enabled` * In the Arduino IDE go to the Tools menu and set `Erase All Flash Before Sketch Upload` to `Enabled`
* In the sketch uncomment function `esp_zb_nvram_erase_at_start(true);` located in `esp_zb_task` function. * In the sketch uncomment function `esp_zb_nvram_erase_at_start(true);` located in `esp_zb_task` function.
By default, the coordinator network is open for 180s after rebooting or flashing new firmware. After that, the network is closed for adding new devices. By default, the coordinator network is open for 180 s after rebooting or flashing new firmware. After that, the network is closed for adding new devices.
You can change it by editing `esp_zb_bdb_open_network(180);` in `esp_zb_app_signal_handler` function. You can change it by editing `esp_zb_bdb_open_network(180);` in `esp_zb_app_signal_handler` function.
***Important: Make sure you are using a good quality USB cable and that you have a reliable power source*** ***Important: Make sure you are using a good quality USB cable and that you have a reliable power source***

View File

@ -39,7 +39,7 @@ You can do the following:
* In the Arduino IDE go to the Tools menu and set `Erase All Flash Before Sketch Upload` to `Enabled`. * In the Arduino IDE go to the Tools menu and set `Erase All Flash Before Sketch Upload` to `Enabled`.
* In the `Zigbee_Light_Bulb` example sketch uncomment function `esp_zb_nvram_erase_at_start(true);` located in `esp_zb_task` function. * In the `Zigbee_Light_Bulb` example sketch uncomment function `esp_zb_nvram_erase_at_start(true);` located in `esp_zb_task` function.
By default, the coordinator network is open for 180s after rebooting or flashing new firmware. After that, the network is closed for adding new devices. By default, the coordinator network is open for 180 s after rebooting or flashing new firmware. After that, the network is closed for adding new devices.
You can change it by editing `esp_zb_bdb_open_network(180);` in `esp_zb_app_signal_handler` function. You can change it by editing `esp_zb_bdb_open_network(180);` in `esp_zb_app_signal_handler` function.
***Important: Make sure you are using a good quality USB cable and that you have a reliable power source*** ***Important: Make sure you are using a good quality USB cable and that you have a reliable power source***

View File

@ -49,7 +49,7 @@ You can do the following:
* In the Arduino IDE go to the Tools menu and set `Erase All Flash Before Sketch Upload` to `Enabled` * In the Arduino IDE go to the Tools menu and set `Erase All Flash Before Sketch Upload` to `Enabled`
* In the sketch uncomment function `esp_zb_nvram_erase_at_start(true);` located in `esp_zb_task` function. * In the sketch uncomment function `esp_zb_nvram_erase_at_start(true);` located in `esp_zb_task` function.
By default, the coordinator network is open for 180s after rebooting or flashing new firmware. After that, the network is closed for adding new devices. By default, the coordinator network is open for 180 s after rebooting or flashing new firmware. After that, the network is closed for adding new devices.
You can change it by editing `esp_zb_bdb_open_network(180);` in `esp_zb_app_signal_handler` function. You can change it by editing `esp_zb_bdb_open_network(180);` in `esp_zb_app_signal_handler` function.
***Important: Make sure you are using a good quality USB cable and that you have a reliable power source*** ***Important: Make sure you are using a good quality USB cable and that you have a reliable power source***

View File

@ -48,7 +48,7 @@ You can do the following:
* In the Arduino IDE go to the Tools menu and set `Erase All Flash Before Sketch Upload` to `Enabled`. * In the Arduino IDE go to the Tools menu and set `Erase All Flash Before Sketch Upload` to `Enabled`.
* In the `Zigbee_Temperature_Sensor` example sketch uncomment function `esp_zb_nvram_erase_at_start(true);` located in `esp_zb_task` function. * In the `Zigbee_Temperature_Sensor` example sketch uncomment function `esp_zb_nvram_erase_at_start(true);` located in `esp_zb_task` function.
By default, the coordinator network is open for 180s after rebooting or flashing new firmware. After that, the network is closed for adding new devices. By default, the coordinator network is open for 180 s after rebooting or flashing new firmware. After that, the network is closed for adding new devices.
You can change it by editing `esp_zb_bdb_open_network(180);` in `esp_zb_app_signal_handler` function. You can change it by editing `esp_zb_bdb_open_network(180);` in `esp_zb_app_signal_handler` function.
***Important: Make sure you are using a good quality USB cable and that you have a reliable power source*** ***Important: Make sure you are using a good quality USB cable and that you have a reliable power source***

View File

@ -23,8 +23,8 @@ Copy Auth Key to the example
const char insights_auth_key[] = "<ENTER YOUR AUTH KEY>"; const char insights_auth_key[] = "<ENTER YOUR AUTH KEY>";
``` ```
### Enter WiFi Credentials ### Enter Wi-Fi Credentials
Inside the example sketch, enter your WiFi credentials in `WIFI_SSID` and `WIFI_PASSPHRASE` macros. Inside the example sketch, enter your Wi-Fi credentials in `WIFI_SSID` and `WIFI_PASSPHRASE` macros.
### Setup ### Setup
* Build and flash the sketch and monitor the console * Build and flash the sketch and monitor the console

View File

@ -5,9 +5,9 @@
## What to expect in this example? ## What to expect in this example?
- This example demonstrates the use of ESP Insights framework in minimal way - This example demonstrates the use of ESP Insights framework in minimal way
- Device will try to connect with the configured WiFi network - Device will try to connect with the configured Wi-Fi network
- ESP Insights is enabled in this example, so any error/warning logs, crashes will be reported to cloud - ESP Insights is enabled in this example, so any error/warning logs, crashes will be reported to cloud
- This example collects heap and wifi metrics every 10 minutes and network variables are collected when they change - This example collects heap and Wi-Fi metrics every 10 minutes and network variables are collected when they change
## Try out the example ## Try out the example
@ -19,8 +19,8 @@ Copy Auth Key to the example
const char insights_auth_key[] = "<ENTER YOUR AUTH KEY>"; const char insights_auth_key[] = "<ENTER YOUR AUTH KEY>";
``` ```
### Enter WiFi Credentials ### Enter Wi-Fi Credentials
Inside the example sketch, enter your WiFi credentials in `WIFI_SSID` and `WIFI_PASSPHRASE` macros. Inside the example sketch, enter your Wi-Fi credentials in `WIFI_SSID` and `WIFI_PASSPHRASE` macros.
### Get the Node ID ### Get the Node ID
- Start the Serial monitor - Start the Serial monitor

View File

@ -65,4 +65,4 @@ Deleting file: /test.txt
- file deleted - file deleted
Test complete Test complete
``` ```
- If you have a module with more than 4MB flash, you can uncomment **partitions_custom.csv** in **platformio.ini** and modify the csv file accordingly - If you have a module with more than 4 MB flash, you can uncomment **partitions_custom.csv** in **platformio.ini** and modify the csv file accordingly

View File

@ -113,14 +113,14 @@ Examples
#### NetworkClientInsecure #### NetworkClientInsecure
Demonstrates usage of insecure connection using `NetworkClientSecure::setInsecure()` Demonstrates usage of insecure connection using `NetworkClientSecure::setInsecure()`
#### NetworkClientPSK #### NetworkClientPSK
Wifi secure connection example for ESP32 using a pre-shared key (PSK) Wi-Fi secure connection example for ESP32 using a pre-shared key (PSK)
This is useful with MQTT servers instead of using a self-signed cert, tested with mosquitto. This is useful with MQTT servers instead of using a self-signed cert, tested with mosquitto.
Running on TLS 1.2 using mbedTLS Running on TLS 1.2 using mbedTLS
#### NetworkClientSecure #### NetworkClientSecure
Wifi secure connection example for ESP32 Wi-Fi secure connection example for ESP32
Running on TLS 1.2 using mbedTLS Running on TLS 1.2 using mbedTLS
#### NetworkClientSecureEnterprise #### NetworkClientSecureEnterprise
This example demonstrates a secure connection to a WiFi network using WPA/WPA2 Enterprise (for example eduroam), This example demonstrates a secure connection to a Wi-Fi network using WPA/WPA2 Enterprise (for example eduroam),
and establishing a secure HTTPS connection with an external server (for example arduino.php5.sk) using the defined anonymous identity, user identity, and password. and establishing a secure HTTPS connection with an external server (for example arduino.php5.sk) using the defined anonymous identity, user identity, and password.
.. note:: .. note::

View File

@ -1,9 +1,9 @@
# ESP32 Libraries # ESP32 Libraries
arduino-esp32 includes libraries for Arduino compatibility along with some object wrappers around hardware specific devices. Examples are included in the examples folder under each library folder. The ESP32 includes additional examples which need no special drivers. arduino-esp32 includes libraries for Arduino compatibility along with some object wrappers around hardware specific devices. Examples are included in the examples folder under each library folder. The ESP32 includes additional examples which need no special drivers.
### ArduinoOTA ### ArduinoOTA
Over The Air firmware update daemon. Use espota.py to upload to the device. Over The Air firmware update daemon. Use espota.py to upload to the device.
### AsyncUDP ### AsyncUDP
Asynchronous task driven UDP datagram client/server Asynchronous task driven UDP datagram client/server
@ -100,11 +100,13 @@ arduino-esp32 includes libraries for Arduino compatibility along with some objec
### WebServer ### WebServer
A simple HTTP daemon A simple HTTP daemon
<!-- vale off -->
### WiFi ### WiFi
Arduino compatible WiFi driver (includes Ethernet driver) <!-- vale on -->
Arduino compatible Wi-Fi driver
### NetworkClientSecure ### NetworkClientSecure
Arduino compatible WiFi client object using embedded encryption Arduino compatible Wi-Fi client object using embedded encryption
### Wire ### Wire
Arduino compatible I2C driver Arduino compatible I2C driver

View File

@ -41,7 +41,7 @@ NOTE : ESP RainMaker library is currently supported for ESP32 board only.
## ESP RainMaker Agent API ## ESP RainMaker Agent API
### RMaker.initNode() ### RMaker.initNode()
This initializes the ESP RainMaker agent, wifi and creates the node. This initializes the ESP RainMaker agent, Wi-Fi and creates the node.
``` ```
Node initNode(const char *name, const char *type); Node initNode(const char *name, const char *type);
``` ```
@ -67,7 +67,7 @@ esp_err_t start()
> NOTE : > NOTE :
> 1. ESP RainMaker agent should be initialized before this call. > 1. ESP RainMaker agent should be initialized before this call.
> 2. Once ESP RainMaker agent starts, compulsorily call WiFi.beginProvision() API. > 2. Once ESP RainMaker agent starts, compulsorily call `WiFi.beginProvision()` API.
### RMaker.stop() ### RMaker.stop()
It stops the ESP RainMaker agent which was started using `RMaker.start()`. It stops the ESP RainMaker agent which was started using `RMaker.start()`.

View File

@ -2,7 +2,7 @@
While building any examples for ESP RainMaker, take care of the following: While building any examples for ESP RainMaker, take care of the following:
1. Change the partition scheme that fits your flash size in Arduino IDE to "RainMaker 4MB", "RainMaker 4MB no OTA" or "RainMaker 8MB" (Tools -> Partition Scheme -> RainMaker). 1. Change the partition scheme that fits your flash size in Arduino IDE to `RainMaker 4MB`, `RainMaker 4MB no OTA` or `RainMaker 8MB` (Tools -> Partition Scheme -> RainMaker).
2. Once ESP RainMaker gets started, compulsorily call `WiFi.beginProvision()` which is responsible for user-node mapping. 2. Once ESP RainMaker gets started, compulsorily call `WiFi.beginProvision()` which is responsible for user-node mapping.
3. Use the appropriate provisioning scheme as per the board. 3. Use the appropriate provisioning scheme as per the board.
- ESP32 Board: BLE Provisioning - ESP32 Board: BLE Provisioning

View File

@ -37,7 +37,7 @@ Tip: If you are using a microSD card and have a spare adapter to full-sized SD,
**What is the difference between SD and SD_MMC libraries?** **What is the difference between SD and SD_MMC libraries?**
SD runs on SPI, and SD_MMC uses the SDMMC hardware bus on the ESP32. SD runs on SPI, and SD_MMC uses the SDMMC hardware bus on the ESP32.
The SPI uses 4 communication pins + 2 power connections and operates on up to 80MHz. The SPI option offers flexibility on pin connection because the data connections can be routed through GPIO matrix to any data pin. The SPI uses 4 communication pins + 2 power connections and operates on up to 80 MHz. The SPI option offers flexibility on pin connection because the data connections can be routed through GPIO matrix to any data pin.
SD-SPI speed is approximately half of the SD-MMC even when used on 1-bit line. SD-SPI speed is approximately half of the SD-MMC even when used on 1-bit line.
You can read more about SD SPI in the [documentation](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/sdspi_host.html) You can read more about SD SPI in the [documentation](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/sdspi_host.html)

View File

@ -102,7 +102,7 @@ Tip: If you are using a microSD card and have a spare adapter to full-sized SD,
#### What is the difference between SD and SD_MMC libraries? #### What is the difference between SD and SD_MMC libraries?
SD runs on SPI, and SD_MMC uses the SDMMC hardware bus on the ESP32. SD runs on SPI, and SD_MMC uses the SDMMC hardware bus on the ESP32.
The SPI uses 4 communication pins + 2 power connections and operates on up to 80MHz. The SPI option offers flexibility on pin connection because the data connections can be routed through GPIO matrix to any data pin. The SPI uses 4 communication pins + 2 power connections and operates on up to 80 MHz. The SPI option offers flexibility on pin connection because the data connections can be routed through GPIO matrix to any data pin.
SD-SPI speed is approximately half of the SD-MMC even when used on 1-bit line. SD-SPI speed is approximately half of the SD-MMC even when used on 1-bit line.
You can read more about SD SPI in the [documentation](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/sdspi_host.html) You can read more about SD SPI in the [documentation](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/sdspi_host.html)

View File

@ -2,7 +2,7 @@
This example tests support for multi-homed servers, i.e. a distinct web servers on distinct IP interface. This example tests support for multi-homed servers, i.e. a distinct web servers on distinct IP interface.
It only tests the case n=2 because on a basic ESP32 device, we only have two IP interfaces, namely the WiFi station interfaces and the WiFi soft AP interface. It only tests the case n=2 because on a basic ESP32 device, we only have two IP interfaces, namely the Wi-Fi station interfaces and the Wi-Fi soft AP interface.
For this to work, the WebServer and the NetworkServer classes must correctly handle the case where an IP address is passed to their relevant constructor. For this to work, the WebServer and the NetworkServer classes must correctly handle the case where an IP address is passed to their relevant constructor.
It also requires WebServer to work with multiple, simultaneous instances. It also requires WebServer to work with multiple, simultaneous instances.
@ -55,7 +55,7 @@ Currently, this example supports the following targets.
## How to Use Example ## How to Use Example
Change the SSID and password in the example to your WiFi and flash the example. Change the SSID and password in the example to your Wi-Fi and flash the example.
Open a serial terminal and the example will write the exact addresses with used IP addresses you can use to test the servers. Open a serial terminal and the example will write the exact addresses with used IP addresses you can use to test the servers.
* How to install the Arduino IDE: [Install Arduino IDE](https://github.com/espressif/arduino-esp32/tree/master/docs/arduino-ide). * How to install the Arduino IDE: [Install Arduino IDE](https://github.com/espressif/arduino-esp32/tree/master/docs/arduino-ide).

View File

@ -6,8 +6,8 @@ It is a small project in it's own and has some files to use on the web server to
This example requires some space for a filesystem and runs fine on supported SoCs with 4 MByte or more flash by selecting the proper partition table: This example requires some space for a filesystem and runs fine on supported SoCs with 4 MByte or more flash by selecting the proper partition table:
* For using SPIFFS(LittleFS): Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) * For using SPIFFS(LittleFS): `Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)`
* For using FATFS: Default 4MB with ffat (1.2MB APP/1.5MB FATFS) * For using FATFS: `Default 4MB with ffat (1.2MB APP/1.5MB FATFS)`
It features It features
@ -36,7 +36,7 @@ Currently, this example supports the following targets.
How to install the Arduino IDE: [Install Arduino IDE](https://github.com/espressif/arduino-esp32/tree/master/docs/arduino-ide). How to install the Arduino IDE: [Install Arduino IDE](https://github.com/espressif/arduino-esp32/tree/master/docs/arduino-ide).
* In the file `secrets.h` you can add the home WiFi network name ans password. * In the file `secrets.h` you can add the home Wi-Fi network name ans password.
* Compile and upload to the device. * Compile and upload to the device.
* Have a look into the monitoring output. * Have a look into the monitoring output.
* Open <http://webserver> or <http://(ip-address)> using a browser. * Open <http://webserver> or <http://(ip-address)> using a browser.
@ -56,9 +56,9 @@ It offers plug-in capabilities by registering specific functionalities that will
In the setup() function in the webserver.ino sketch file the following steps are implemented to make the webserver available on the local network. In the setup() function in the webserver.ino sketch file the following steps are implemented to make the webserver available on the local network.
* Create a webserver listening to port 80 for http requests. * Create a webserver listening to port 80 for HTTP requests.
* Initialize the access to the filesystem in the free flash memory. * Initialize the access to the filesystem in the free flash memory.
* Connect to the local WiFi network. Here is only a straight-forward implementation hard-coding network name and passphrase. You may consider to use something like the WiFiManager library in real applications. * Connect to the local Wi-Fi network. Here is only a straight-forward implementation hard-coding network name and passphrase. You may consider to use something like the WiFiManager library in real applications.
* Register the device in DNS using a known hostname. * Register the device in DNS using a known hostname.
* Registering several plug-ins (see below). * Registering several plug-ins (see below).
* Starting the web server. * Starting the web server.

View File

@ -4,7 +4,7 @@ This example demonstrates reading and writing data from and to a web service whi
# Supported Targets # Supported Targets
Currently, this example supports all SoC with WiFi. Currently, this example supports all SoC with Wi-Fi.
| Supported Targets | ESP32 | ESP32-S2 | ESP32-C3 | ESP32-S3 | | Supported Targets | ESP32 | ESP32-S2 | ESP32-C3 | ESP32-S3 |
@ -18,7 +18,7 @@ Please note that this public channel can be accessed by anyone and it is possibl
### Configure the Project ### Configure the Project
Change `SSID` and `password` to connect to your WiFi. Change `SSID` and `password` to connect to your Wi-Fi.
Default values will allow you to use this example without any changes. If you want to use your own channel and you don't have one already follow these steps: Default values will allow you to use this example without any changes. If you want to use your own channel and you don't have one already follow these steps:
* Create an account on [thingspeak.com](https://www.thingspeak.com). * Create an account on [thingspeak.com](https://www.thingspeak.com).
@ -79,7 +79,7 @@ load:0x403cc710,len:0x918
load:0x403ce710,len:0x24e4 load:0x403ce710,len:0x24e4
entry 0x403cc710 entry 0x403cc710
``` ```
Follows the setup output where connection to your WiFi happens: Follows the setup output where connection to your Wi-Fi happens:
``` ```
****************************************************** ******************************************************
Connecting to your-ssid Connecting to your-ssid
@ -139,7 +139,7 @@ After this the write+read log repeat every 10 seconds.
***Important: Make sure you are using a good quality USB cable and that you have a reliable power source*** ***Important: Make sure you are using a good quality USB cable and that you have a reliable power source***
* **WiFi not connected:** Check the SSID and password and also that the signal has sufficient strength. * **Wi-Fi not connected:** Check the SSID and password and also that the signal has sufficient strength.
* **400 Bad Request:** Check the writeApiKey. * **400 Bad Request:** Check the writeApiKey.
* **404 Not Found:** Check the channel ID. * **404 Not Found:** Check the channel ID.
* **No data on chart / reading NULL:** Data must be sent as an integer, without commas. * **No data on chart / reading NULL:** Data must be sent as an integer, without commas.

View File

@ -1,6 +1,6 @@
# NetworkClientConnect Example # NetworkClientConnect Example
This example demonstrates how to connect to the WiFi and manage the status and disconnection from STA. This example demonstrates how to connect to the Wi-Fi and manage the status and disconnection from STA.
# Supported Targets # Supported Targets

View File

@ -1,5 +1,5 @@
# ESP32-Eduroam # ESP32-Eduroam
* Eduroam wifi connection with university login identity * Eduroam Wi-Fi connection with university login identity
* Working under Eduroam networks worldwide * Working under Eduroam networks worldwide
* Methods: PEAP + MsCHAPv2 * Methods: PEAP + MsCHAPv2
@ -15,6 +15,7 @@
* Board will auto reconnect to Eduroam if it lost connection * Board will auto reconnect to Eduroam if it lost connection
# Tested locations # Tested locations
<!-- vale off -->
|University|Board|Method|Result| |University|Board|Method|Result|
|-------------|-------------| -----|------| |-------------|-------------| -----|------|
|Technical University in Košice (Slovakia)|ESP32 Devkit v1|PEAP + MsCHAPv2|Working| |Technical University in Košice (Slovakia)|ESP32 Devkit v1|PEAP + MsCHAPv2|Working|
@ -29,13 +30,14 @@
|Universidade Federal de Santa Catarina (Brazil)|xxx|EAP-TTLS + MsCHAPv2|Working| |Universidade Federal de Santa Catarina (Brazil)|xxx|EAP-TTLS + MsCHAPv2|Working|
|University of Central Florida (Orlando, Florida)|ESP32 Built-in OLED Heltec WiFi Kit 32|PEAP + MsCHAPv2|Working| |University of Central Florida (Orlando, Florida)|ESP32 Built-in OLED Heltec WiFi Kit 32|PEAP + MsCHAPv2|Working|
|Université de Montpellier (France)|NodeMCU-32S|PEAP + MsCHAPv2|Working| |Université de Montpellier (France)|NodeMCU-32S|PEAP + MsCHAPv2|Working|
<!-- vale on -->
# Common errors - Switch to Debug mode for Serial monitor prints # Common errors - Switch to Debug mode for Serial monitor prints
|Error|Appearance|Solution| |Error|Appearance|Solution|
|-------------|-------------|-------------| |-------------|-------------|-------------|
|wifi: Set status to INIT|Frequent|Hold EN button for few seconds| |Wi-Fi: Set status to INIT|Frequent|Hold EN button for few seconds|
|HANDSHAKE_TIMEOUT|Rare|Bug was found under Zeroshell RADIUS authentization - Unsuccessful connection| |HANDSHAKE_TIMEOUT|Rare|Bug was found under Zeroshell RADIUS authentization - Unsuccessful connection|
|AUTH_EXPIRE|Common|In the case of weak wifi network signal, this error is quite common, bring your device closer to AP| |AUTH_EXPIRE|Common|In the case of weak Wi-Fi network signal, this error is quite common, bring your device closer to AP|
|ASSOC_EXPIRE|Rare|-| |ASSOC_EXPIRE|Rare|-|
# Successful connection example # Successful connection example
![alt text](https://i.nahraj.to/f/24Kc.png) ![alt text](https://i.nahraj.to/f/24Kc.png)

View File

@ -1,6 +1,6 @@
# WiFiScan Example # WiFiScan Example
This example demonstrates how to use the WiFi library to scan available WiFi networks and print the results. This example demonstrates how to use the Wi-Fi library to scan available Wi-Fi networks and print the results.
## Supported Targets ## Supported Targets

View File

@ -1,6 +1,6 @@
# WiFiScanAsync Example # WiFiScanAsync Example
This example demonstrates how to use the WiFi library to scan available WiFi networks in asynchronous mode and print the results. This example demonstrates how to use the Wi-Fi library to scan available Wi-Fi networks in asynchronous mode and print the results.
## Supported Targets ## Supported Targets

View File

@ -1,6 +1,6 @@
# WiFiScan Example # WiFiScan Example
This example demonstrates how to use the WiFi library to scan available WiFi networks and print the results. This example demonstrates how to use the Wi-Fi library to scan available Wi-Fi networks and print the results.
This example shows the basic functionality of the dual antenna capability. This example shows the basic functionality of the dual antenna capability.

View File

@ -1,6 +1,6 @@
# WiFiScanTime Example # WiFiScanTime Example
This example demonstrates how to use the WiFi library to scan available WiFi networks with custom scan timing and print the results. This example demonstrates how to use the Wi-Fi library to scan available Wi-Fi networks with custom scan timing and print the results.
## Supported Targets ## Supported Targets

View File

@ -8,12 +8,16 @@ This example allows Arduino users to choose either BLE or SOFTAP as the mode of
## APIs introduced for provisioning ## APIs introduced for provisioning
<!-- vale off -->
### WiFi.onEvent() ### WiFi.onEvent()
<!-- vale on -->
This API can be used to register a function to be called from another This API can be used to register a function to be called from another
thread for WiFi Events and Provisioning Events. thread for Wi-Fi Events and Provisioning Events.
<!-- vale off -->
### WiFi.beginProvision() ### WiFi.beginProvision()
<!-- vale on -->
``` ```
WiFi.beginProvision(void (*scheme_cb)(), wifi_prov_scheme_event_handler_t scheme_event_handler, wifi_prov_security_t security, char *pop, char *service_name, char *service_key, uint8_t *uuid); WiFi.beginProvision(void (*scheme_cb)(), wifi_prov_scheme_event_handler_t scheme_event_handler, wifi_prov_security_t security, char *pop, char *service_name, char *service_key, uint8_t *uuid);
@ -50,7 +54,7 @@ WiFi.beginProvision(void (*scheme_cb)(), wifi_prov_scheme_event_handler_t scheme
{ 0xb4, 0xdf, 0x5a, 0x1c, 0x3f, 0x6b, 0xf4, 0xbf, 0xea, 0x4a, 0x82, 0x03, 0x04, 0x90, 0x1a, 0x02 } { 0xb4, 0xdf, 0x5a, 0x1c, 0x3f, 0x6b, 0xf4, 0xbf, 0xea, 0x4a, 0x82, 0x03, 0x04, 0x90, 0x1a, 0x02 }
``` ```
- `reset_provisioned`: Resets previously provisioned data before initializing. Using this prevents problem when the device automatically connects to previously connected WiFi and therefore cannot be found. - `reset_provisioned`: Resets previously provisioned data before initializing. Using this prevents problem when the device automatically connects to previously connected Wi-Fi and therefore cannot be found.
**NOTE:** If none of the parameters are specified in `beginProvision`, default provisioning takes place using SoftAP with the following settings: **NOTE:** If none of the parameters are specified in `beginProvision`, default provisioning takes place using SoftAP with the following settings:
- `scheme = WIFI_PROV_SCHEME_SOFTAP` - `scheme = WIFI_PROV_SCHEME_SOFTAP`
@ -65,7 +69,7 @@ WiFi.beginProvision(void (*scheme_cb)(), wifi_prov_scheme_event_handler_t scheme
## Flashing ## Flashing
This sketch takes up a lot of space for the app and may not be able to flash with default setting on some chips. This sketch takes up a lot of space for the app and may not be able to flash with default setting on some chips.
If you see Error like this: "Sketch too big" If you see Error like this: "Sketch too big"
In Arduino IDE go to: Tools > Partition scheme > chose anything that has more than 1.4MB APP for example `No OTA (2MB APP/2MB SPIFFS)` In Arduino IDE go to: Tools > Partition scheme > chose anything that has more than 1.4 MB APP for example `No OTA (2MB APP/2MB SPIFFS)`
## Log Output ## Log Output
- To enable debugging: Go to Tools -> Core Debug Level -> Info. - To enable debugging: Go to Tools -> Core Debug Level -> Info.