diff --git a/_static/custom.css b/_static/custom.css index ef28810f1..07a8f1eea 100644 --- a/_static/custom.css +++ b/_static/custom.css @@ -1,7 +1,7 @@ .row-odd { background-color: #f3f6f6; } -table:not(.no-center) tr.row-even > td { +.table-center tr.row-even > td { text-align: center; } diff --git a/components/display/max7219.rst b/components/display/max7219.rst index c4817c519..13de14fd8 100644 --- a/components/display/max7219.rst +++ b/components/display/max7219.rst @@ -113,112 +113,109 @@ Please see :ref:`display-printf` for a quick introduction into the ``printf`` fo All 7-Segment Characters ------------------------ -.. table:: - :class: no-center - - ============================== ============================== - **MAX7219 Representation** **Character** - ------------------------------ ------------------------------ - |max721900| *(space)* - ------------------------------ ------------------------------ - |max721980| ``.`` - ------------------------------ ------------------------------ - |max7219B0| ``!`` - ------------------------------ ------------------------------ - |max72197E| ``0``, ``O`` - ------------------------------ ------------------------------ - |max721930| ``1``, ``I`` - ------------------------------ ------------------------------ - |max72196D| ``2``, ``Z`` - ------------------------------ ------------------------------ - |max721979| ``3`` - ------------------------------ ------------------------------ - |max721933| ``4`` - ------------------------------ ------------------------------ - |max72195B| ``5``, ``S``, ``s`` - ------------------------------ ------------------------------ - |max72195F| ``6`` - ------------------------------ ------------------------------ - |max721970| ``7`` - ------------------------------ ------------------------------ - |max72197F| ``8`` - ------------------------------ ------------------------------ - |max721973| ``9`` - ------------------------------ ------------------------------ - |max721937| ``H`` - ------------------------------ ------------------------------ - |max72194E| ``(``, ``[``, ``C`` - ------------------------------ ------------------------------ - |max721931| ``{`` - ------------------------------ ------------------------------ - |max721978| ``)``, ``]`` - ------------------------------ ------------------------------ - |max721907| ``}``, ``T``, ``t`` - ------------------------------ ------------------------------ - |max721920| ``\``` - ------------------------------ ------------------------------ - |max721902| ``'`` - ------------------------------ ------------------------------ - |max721922| ``"`` - ------------------------------ ------------------------------ - |max72196F| ``@`` - ------------------------------ ------------------------------ - |max721965| ``?`` - ------------------------------ ------------------------------ - |max721910| ``,``, ``i`` - ------------------------------ ------------------------------ - |max721949| ``%`` - ------------------------------ ------------------------------ - |max721940| ``*`` - ------------------------------ ------------------------------ - |max721948| ``:`` - ------------------------------ ------------------------------ - |max721958| ``;`` - ------------------------------ ------------------------------ - |max721977| ``A``, ``a`` - ------------------------------ ------------------------------ - |max72191F| ``B``, ``b`` - ------------------------------ ------------------------------ - |max72193D| ``D``, ``d`` - ------------------------------ ------------------------------ - |max72194F| ``E``, ``e`` - ------------------------------ ------------------------------ - |max721947| ``F``, ``f`` - ------------------------------ ------------------------------ - |max72195E| ``G``, ``g`` - ------------------------------ ------------------------------ - |max72193C| ``J``, ``j`` - ------------------------------ ------------------------------ - |max72190E| ``L``, ``l`` - ------------------------------ ------------------------------ - |max721915| ``N``, ``n`` - ------------------------------ ------------------------------ - |max721967| ``P``, ``p`` - ------------------------------ ------------------------------ - |max7219FE| ``Q`` - ------------------------------ ------------------------------ - |max721905| ``R``, ``r`` - ------------------------------ ------------------------------ - |max72193E| ``U``, ``V`` - ------------------------------ ------------------------------ - |max72193F| ``W`` - ------------------------------ ------------------------------ - |max721927| ``Y``, ``y`` - ------------------------------ ------------------------------ - |max721901| ``-`` - ------------------------------ ------------------------------ - |max721908| ``_`` - ------------------------------ ------------------------------ - |max721906| ``|`` - ------------------------------ ------------------------------ - |max72190D| ``c`` - ------------------------------ ------------------------------ - |max721917| ``h`` - ------------------------------ ------------------------------ - |max72191D| ``o`` - ------------------------------ ------------------------------ - |max72191C| ``u``, ``v`` - ============================== ============================== +============================== ============================== +**MAX7219 Representation** **Character** +------------------------------ ------------------------------ +|max721900| *(space)* +------------------------------ ------------------------------ +|max721980| ``.`` +------------------------------ ------------------------------ +|max7219B0| ``!`` +------------------------------ ------------------------------ +|max72197E| ``0``, ``O`` +------------------------------ ------------------------------ +|max721930| ``1``, ``I`` +------------------------------ ------------------------------ +|max72196D| ``2``, ``Z`` +------------------------------ ------------------------------ +|max721979| ``3`` +------------------------------ ------------------------------ +|max721933| ``4`` +------------------------------ ------------------------------ +|max72195B| ``5``, ``S``, ``s`` +------------------------------ ------------------------------ +|max72195F| ``6`` +------------------------------ ------------------------------ +|max721970| ``7`` +------------------------------ ------------------------------ +|max72197F| ``8`` +------------------------------ ------------------------------ +|max721973| ``9`` +------------------------------ ------------------------------ +|max721937| ``H`` +------------------------------ ------------------------------ +|max72194E| ``(``, ``[``, ``C`` +------------------------------ ------------------------------ +|max721931| ``{`` +------------------------------ ------------------------------ +|max721978| ``)``, ``]`` +------------------------------ ------------------------------ +|max721907| ``}``, ``T``, ``t`` +------------------------------ ------------------------------ +|max721920| ``\``` +------------------------------ ------------------------------ +|max721902| ``'`` +------------------------------ ------------------------------ +|max721922| ``"`` +------------------------------ ------------------------------ +|max72196F| ``@`` +------------------------------ ------------------------------ +|max721965| ``?`` +------------------------------ ------------------------------ +|max721910| ``,``, ``i`` +------------------------------ ------------------------------ +|max721949| ``%`` +------------------------------ ------------------------------ +|max721940| ``*`` +------------------------------ ------------------------------ +|max721948| ``:`` +------------------------------ ------------------------------ +|max721958| ``;`` +------------------------------ ------------------------------ +|max721977| ``A``, ``a`` +------------------------------ ------------------------------ +|max72191F| ``B``, ``b`` +------------------------------ ------------------------------ +|max72193D| ``D``, ``d`` +------------------------------ ------------------------------ +|max72194F| ``E``, ``e`` +------------------------------ ------------------------------ +|max721947| ``F``, ``f`` +------------------------------ ------------------------------ +|max72195E| ``G``, ``g`` +------------------------------ ------------------------------ +|max72193C| ``J``, ``j`` +------------------------------ ------------------------------ +|max72190E| ``L``, ``l`` +------------------------------ ------------------------------ +|max721915| ``N``, ``n`` +------------------------------ ------------------------------ +|max721967| ``P``, ``p`` +------------------------------ ------------------------------ +|max7219FE| ``Q`` +------------------------------ ------------------------------ +|max721905| ``R``, ``r`` +------------------------------ ------------------------------ +|max72193E| ``U``, ``V`` +------------------------------ ------------------------------ +|max72193F| ``W`` +------------------------------ ------------------------------ +|max721927| ``Y``, ``y`` +------------------------------ ------------------------------ +|max721901| ``-`` +------------------------------ ------------------------------ +|max721908| ``_`` +------------------------------ ------------------------------ +|max721906| ``|`` +------------------------------ ------------------------------ +|max72190D| ``c`` +------------------------------ ------------------------------ +|max721917| ``h`` +------------------------------ ------------------------------ +|max72191D| ``o`` +------------------------------ ------------------------------ +|max72191C| ``u``, ``v`` +============================== ============================== .. |max721900| image:: images/max7219/seg00.svg :class: component-image diff --git a/components/display/waveshare_epaper.rst b/components/display/waveshare_epaper.rst index c9c6372bf..6953befba 100644 --- a/components/display/waveshare_epaper.rst +++ b/components/display/waveshare_epaper.rst @@ -20,28 +20,25 @@ The communication esphomelib has chosen to use for this integration is 4-wire :r and high-speed. So you need to make sure your board is set to the 4-wire SPI mode and have an ``spi:`` section in your configuration. -.. table:: - :class: no-center - - ==================== ===================== ===================== - **E-Paper Pin** **ESP Pin** **esphomelib Option** - -------------------- --------------------- --------------------- - ``VCC`` ``3.3V`` N/A - -------------------- --------------------- --------------------- - ``GND`` ``GND`` N/A - -------------------- --------------------- --------------------- - ``CLK`` Any GPIO ``spi.clk_pin`` - -------------------- --------------------- --------------------- - ``DIN`` Any GPIO ``spi.mosi_pin`` - -------------------- --------------------- --------------------- - ``CS`` Any GPIO ``cs_pin`` - -------------------- --------------------- --------------------- - ``DC`` Any GPIO ``dc_pin`` - -------------------- --------------------- --------------------- - ``BUSY`` (Optional) Any GPIO ``busy_pin`` - -------------------- --------------------- --------------------- - ``RESET`` (Optional) Any GPIO ``reset_pin`` - ==================== ===================== ===================== +==================== ===================== ===================== +**E-Paper Pin** **ESP Pin** **esphomelib Option** +-------------------- --------------------- --------------------- +``VCC`` ``3.3V`` N/A +-------------------- --------------------- --------------------- +``GND`` ``GND`` N/A +-------------------- --------------------- --------------------- +``CLK`` Any GPIO ``spi.clk_pin`` +-------------------- --------------------- --------------------- +``DIN`` Any GPIO ``spi.mosi_pin`` +-------------------- --------------------- --------------------- +``CS`` Any GPIO ``cs_pin`` +-------------------- --------------------- --------------------- +``DC`` Any GPIO ``dc_pin`` +-------------------- --------------------- --------------------- +``BUSY`` (Optional) Any GPIO ``busy_pin`` +-------------------- --------------------- --------------------- +``RESET`` (Optional) Any GPIO ``reset_pin`` +==================== ===================== ===================== .. figure:: images/waveshare_epaper-pins.jpg :align: center diff --git a/components/time.rst b/components/time.rst index f28b96c20..2cb092e58 100644 --- a/components/time.rst +++ b/components/time.rst @@ -74,38 +74,35 @@ Alternatively, you can use ``.utcnow()`` to get the current UTC time. The returned object can either be used directly to get the current minute, hour, ... as numbers or a string can be created based on a given format. If you want to get the current time attributes, you have these fields -.. table:: - :class: no-center - - ==================== ======================================== ======================================== ==================== - **Name** **Meaning** **Range (inclusive)** **Example** - -------------------- ---------------------------------------- ---------------------------------------- -------------------- - ``.second`` Seconds after the minute [0-60] (generally [0-59], 42 - extra range is to accommodate leap - seconds.) - -------------------- ---------------------------------------- ---------------------------------------- -------------------- - ``.minute`` Minutes after the hour [0-59] 31 - -------------------- ---------------------------------------- ---------------------------------------- -------------------- - ``.hour`` Hours since midnight [0-23] 16 - -------------------- ---------------------------------------- ---------------------------------------- -------------------- - ``.day_of_week`` Day of the week, sunday=1 [1-7] 7 (saturday) - -------------------- ---------------------------------------- ---------------------------------------- -------------------- - ``.day_of_month`` Day of the month [1-31] 18 - -------------------- ---------------------------------------- ---------------------------------------- -------------------- - ``.day_of_year`` Day of the year [1-366] 231 - -------------------- ---------------------------------------- ---------------------------------------- -------------------- - ``.month`` Month, january=1 [1-12] 8 (august) - -------------------- ---------------------------------------- ---------------------------------------- -------------------- - ``.year`` Year since 0 A.C. [1970-∞[ 2018 - -------------------- ---------------------------------------- ---------------------------------------- -------------------- - ``.is_dst`` Is daylight savings time false, true true - -------------------- ---------------------------------------- ---------------------------------------- -------------------- - ``.time`` Unix epoch time (seconds since UTC [-2147483648 - 2147483647] (negative 1534606002 - Midnight January 1, 1970) values for time past January 19th 2038) - -------------------- ---------------------------------------- ---------------------------------------- -------------------- - ``.is_valid()`` Basic check if the time is valid false, true true - (i.e. not January 1st 1970) - ==================== ======================================== ======================================== ==================== +==================== ======================================== ======================================== ==================== +**Name** **Meaning** **Range (inclusive)** **Example** +-------------------- ---------------------------------------- ---------------------------------------- -------------------- +``.second`` Seconds after the minute [0-60] (generally [0-59], 42 + extra range is to accommodate leap + seconds.) +-------------------- ---------------------------------------- ---------------------------------------- -------------------- +``.minute`` Minutes after the hour [0-59] 31 +-------------------- ---------------------------------------- ---------------------------------------- -------------------- +``.hour`` Hours since midnight [0-23] 16 +-------------------- ---------------------------------------- ---------------------------------------- -------------------- +``.day_of_week`` Day of the week, sunday=1 [1-7] 7 (saturday) +-------------------- ---------------------------------------- ---------------------------------------- -------------------- +``.day_of_month`` Day of the month [1-31] 18 +-------------------- ---------------------------------------- ---------------------------------------- -------------------- +``.day_of_year`` Day of the year [1-366] 231 +-------------------- ---------------------------------------- ---------------------------------------- -------------------- +``.month`` Month, january=1 [1-12] 8 (august) +-------------------- ---------------------------------------- ---------------------------------------- -------------------- +``.year`` Year since 0 A.C. [1970-∞[ 2018 +-------------------- ---------------------------------------- ---------------------------------------- -------------------- +``.is_dst`` Is daylight savings time false, true true +-------------------- ---------------------------------------- ---------------------------------------- -------------------- +``.time`` Unix epoch time (seconds since UTC [-2147483648 - 2147483647] (negative 1534606002 + Midnight January 1, 1970) values for time past January 19th 2038) +-------------------- ---------------------------------------- ---------------------------------------- -------------------- +``.is_valid()`` Basic check if the time is valid false, true true + (i.e. not January 1st 1970) +==================== ======================================== ======================================== ==================== .. note:: @@ -131,59 +128,56 @@ The strftime will parse the format string (here ``"%Y-%m-%d %H:%M"``) and match a percent sign ``%`` and a letter corresponding to one of the below formatting options and replace it with the current time representation of that format option. -.. table:: - :class: no-center - - ============= ============================================================== ========================= - **Directive** **Meaning** **Example** - ------------- -------------------------------------------------------------- ------------------------- - ``%a`` Abbreviated **weekday** name Sat - ------------- -------------------------------------------------------------- ------------------------- - ``%A`` Full **weekday** name Saturday - ------------- -------------------------------------------------------------- ------------------------- - ``%w`` **Weekday** as decimal number, where 0 is Sunday and 6 6 - is Saturday - ------------- -------------------------------------------------------------- ------------------------- - ``%d`` **Day of month** as zero-padded decimal number 01, 02, ..., 31 - ------------- -------------------------------------------------------------- ------------------------- - ``%b`` Abbreviated **month** name Aug - ------------- -------------------------------------------------------------- ------------------------- - ``%B`` Full **month** name August - ------------- -------------------------------------------------------------- ------------------------- - ``%m`` **Month** as zero-padded decimal number 01, 02, ..., 12 - ------------- -------------------------------------------------------------- ------------------------- - ``%y`` **Year** without century as a zero-padded decimal number 00, 01, ..., 99 - ------------- -------------------------------------------------------------- ------------------------- - ``%Y`` **Year** with century as a decimal number 2018 - ------------- -------------------------------------------------------------- ------------------------- - ``%H`` **Hour** (24-hour clock) as a zero-padded decimal number 00, 01, ..., 23 - ------------- -------------------------------------------------------------- ------------------------- - ``%I`` **Hour** (12-hour clock) as a zero-padded decimal number 00, 01, ..., 12 - ------------- -------------------------------------------------------------- ------------------------- - ``%p`` **AM or PM** designation AM, PM - ------------- -------------------------------------------------------------- ------------------------- - ``%M`` **Minute** as a zero-padded decimal number 00, 01, ..., 59 - ------------- -------------------------------------------------------------- ------------------------- - ``%S`` **Second** as a zero-padded decimal number 00, 01, ..., 59 - ------------- -------------------------------------------------------------- ------------------------- - ``%j`` **Day of year** as a zero-padded decimal number 001, 002, ..., 366 - ------------- -------------------------------------------------------------- ------------------------- - ``%U`` **Week number of year** (Sunday as the first day of the week) 00, 01, ..., 53 - as a zero-padded decimal number. All days in a new year - preceding the first Sunday are considered to be in week 0. - ------------- -------------------------------------------------------------- ------------------------- - ``%W`` **Week number of year** (Monday as the first day of the week) 00, 01, ..., 53 - as a zero-padded decimal number. All days in a new year - preceding the first Monday are considered to be in week 0. - ------------- -------------------------------------------------------------- ------------------------- - ``%c`` **Date and time** representation Sat Aug 18 16:31:42 2018 - ------------- -------------------------------------------------------------- ------------------------- - ``%x`` **Date** representation 08/18/18 - ------------- -------------------------------------------------------------- ------------------------- - ``%X`` **Time** representation 16:31:42 - ------------- -------------------------------------------------------------- ------------------------- - ``%%`` A literal ``%`` character % - ============= ============================================================== ========================= +============= ============================================================== ========================= +**Directive** **Meaning** **Example** +------------- -------------------------------------------------------------- ------------------------- +``%a`` Abbreviated **weekday** name Sat +------------- -------------------------------------------------------------- ------------------------- +``%A`` Full **weekday** name Saturday +------------- -------------------------------------------------------------- ------------------------- +``%w`` **Weekday** as decimal number, where 0 is Sunday and 6 6 + is Saturday +------------- -------------------------------------------------------------- ------------------------- +``%d`` **Day of month** as zero-padded decimal number 01, 02, ..., 31 +------------- -------------------------------------------------------------- ------------------------- +``%b`` Abbreviated **month** name Aug +------------- -------------------------------------------------------------- ------------------------- +``%B`` Full **month** name August +------------- -------------------------------------------------------------- ------------------------- +``%m`` **Month** as zero-padded decimal number 01, 02, ..., 12 +------------- -------------------------------------------------------------- ------------------------- +``%y`` **Year** without century as a zero-padded decimal number 00, 01, ..., 99 +------------- -------------------------------------------------------------- ------------------------- +``%Y`` **Year** with century as a decimal number 2018 +------------- -------------------------------------------------------------- ------------------------- +``%H`` **Hour** (24-hour clock) as a zero-padded decimal number 00, 01, ..., 23 +------------- -------------------------------------------------------------- ------------------------- +``%I`` **Hour** (12-hour clock) as a zero-padded decimal number 00, 01, ..., 12 +------------- -------------------------------------------------------------- ------------------------- +``%p`` **AM or PM** designation AM, PM +------------- -------------------------------------------------------------- ------------------------- +``%M`` **Minute** as a zero-padded decimal number 00, 01, ..., 59 +------------- -------------------------------------------------------------- ------------------------- +``%S`` **Second** as a zero-padded decimal number 00, 01, ..., 59 +------------- -------------------------------------------------------------- ------------------------- +``%j`` **Day of year** as a zero-padded decimal number 001, 002, ..., 366 +------------- -------------------------------------------------------------- ------------------------- +``%U`` **Week number of year** (Sunday as the first day of the week) 00, 01, ..., 53 + as a zero-padded decimal number. All days in a new year + preceding the first Sunday are considered to be in week 0. +------------- -------------------------------------------------------------- ------------------------- +``%W`` **Week number of year** (Monday as the first day of the week) 00, 01, ..., 53 + as a zero-padded decimal number. All days in a new year + preceding the first Monday are considered to be in week 0. +------------- -------------------------------------------------------------- ------------------------- +``%c`` **Date and time** representation Sat Aug 18 16:31:42 2018 +------------- -------------------------------------------------------------- ------------------------- +``%x`` **Date** representation 08/18/18 +------------- -------------------------------------------------------------- ------------------------- +``%X`` **Time** representation 16:31:42 +------------- -------------------------------------------------------------- ------------------------- +``%%`` A literal ``%`` character % +============= ============================================================== ========================= .. _time-on_time: diff --git a/devices/esp8266.rst b/devices/esp8266.rst index 9c2b9f23b..f98cdbea7 100644 --- a/devices/esp8266.rst +++ b/devices/esp8266.rst @@ -51,75 +51,69 @@ Some notes on the pins: Special Pins ------------ -.. table:: - :class: no-center - - =================== ============================================= - ``GPIO0`` Controls Boot Mode - ------------------- --------------------------------------------- - ``GPIO1`` UART TX pin - ------------------- --------------------------------------------- - ``GPIO2`` Controls Boot Mode - ------------------- --------------------------------------------- - ``GPIO3`` UART RX pin - ------------------- --------------------------------------------- - ``GPIO6`` SDIO/Flash CLK pin - ------------------- --------------------------------------------- - ``GPIO7`` SDIO/Flash Data 0 pin - ------------------- --------------------------------------------- - ``GPIO8`` SDIO/Flash Data 1 pin - ------------------- --------------------------------------------- - ``GPIO9`` SDIO/Flash Data 2 pin (qio/qout only) - ------------------- --------------------------------------------- - ``GPIO10`` SDIO/Flash Data 3 pin (qio/qout only) - ------------------- --------------------------------------------- - ``GPIO11`` SDIO/Flash CMD pin - ------------------- --------------------------------------------- - ``GPIO12`` Attached to Hardware SPI controller MISO - ------------------- --------------------------------------------- - ``GPIO13`` Attached to Hardware SPI controller MOSI - ------------------- --------------------------------------------- - ``GPIO14`` Attached to Hardware SPI controller CLK - ------------------- --------------------------------------------- - ``GPIO15`` Controls Boot Mode; Attached to Hardware SPI - controller CS - ------------------- --------------------------------------------- - ``GPIO16`` Special pin that can be accessed from RTC, - and is Deep-Sleep wakeup pin - ------------------- --------------------------------------------- - TOUT aka ``GPIO17`` ADC pin for measuring voltages, can only be - used as analog input pin - =================== ============================================= +=================== ============================================= +``GPIO0`` Controls Boot Mode +------------------- --------------------------------------------- +``GPIO1`` UART TX pin +------------------- --------------------------------------------- +``GPIO2`` Controls Boot Mode +------------------- --------------------------------------------- +``GPIO3`` UART RX pin +------------------- --------------------------------------------- +``GPIO6`` SDIO/Flash CLK pin +------------------- --------------------------------------------- +``GPIO7`` SDIO/Flash Data 0 pin +------------------- --------------------------------------------- +``GPIO8`` SDIO/Flash Data 1 pin +------------------- --------------------------------------------- +``GPIO9`` SDIO/Flash Data 2 pin (qio/qout only) +------------------- --------------------------------------------- +``GPIO10`` SDIO/Flash Data 3 pin (qio/qout only) +------------------- --------------------------------------------- +``GPIO11`` SDIO/Flash CMD pin +------------------- --------------------------------------------- +``GPIO12`` Attached to Hardware SPI controller MISO +------------------- --------------------------------------------- +``GPIO13`` Attached to Hardware SPI controller MOSI +------------------- --------------------------------------------- +``GPIO14`` Attached to Hardware SPI controller CLK +------------------- --------------------------------------------- +``GPIO15`` Controls Boot Mode; Attached to Hardware SPI + controller CS +------------------- --------------------------------------------- +``GPIO16`` Special pin that can be accessed from RTC, + and is Deep-Sleep wakeup pin +------------------- --------------------------------------------- +TOUT aka ``GPIO17`` ADC pin for measuring voltages, can only be + used as analog input pin +=================== ============================================= This means effectively only the following pins can be used as general purpose GPIO: -.. table:: - :class: no-center - - ========== ============================== ============================== - **Pin** **Restrictions** **State after Reset** - ---------- ------------------------------ ------------------------------ - ``GPIO0`` If HIGH on boot Weak Pull Up - ---------- ------------------------------ ------------------------------ - ``GPIO2`` If HIGH on boot Weak Pull Up - ---------- ------------------------------ ------------------------------ - ``GPIO4`` High Impedance - ---------- ------------------------------ ------------------------------ - ``GPIO5`` High Impedance - ---------- ------------------------------ ------------------------------ - ``GPIO6`` Weak Pull Up - ---------- ------------------------------ ------------------------------ - ``GPIO12`` Weak Pull Up - ---------- ------------------------------ ------------------------------ - ``GPIO13`` Weak Pull Up - ---------- ------------------------------ ------------------------------ - ``GPIO14`` Weak Pull Up - ---------- ------------------------------ ------------------------------ - ``GPIO15`` If LOW on boot Weak Pull Up - ---------- ------------------------------ ------------------------------ - ``GPIO16`` Has pull-down (but no pull-up Weak Pull Down - resistor - ========== ============================== ============================== +========== ============================== ============================== +**Pin** **Restrictions** **State after Reset** +---------- ------------------------------ ------------------------------ +``GPIO0`` If HIGH on boot Weak Pull Up +---------- ------------------------------ ------------------------------ +``GPIO2`` If HIGH on boot Weak Pull Up +---------- ------------------------------ ------------------------------ +``GPIO4`` High Impedance +---------- ------------------------------ ------------------------------ +``GPIO5`` High Impedance +---------- ------------------------------ ------------------------------ +``GPIO6`` Weak Pull Up +---------- ------------------------------ ------------------------------ +``GPIO12`` Weak Pull Up +---------- ------------------------------ ------------------------------ +``GPIO13`` Weak Pull Up +---------- ------------------------------ ------------------------------ +``GPIO14`` Weak Pull Up +---------- ------------------------------ ------------------------------ +``GPIO15`` If LOW on boot Weak Pull Up +---------- ------------------------------ ------------------------------ +``GPIO16`` Has pull-down (but no pull-up Weak Pull Down + resistor +========== ============================== ============================== Boot Modes ---------- @@ -127,18 +121,15 @@ Boot Modes On each boot, the ESP8266 will check three pins to determine in which boot mode to enter. There are three boot modes: -.. table:: - :class: no-center - - ========================= ========= ========= ========== ============== - **Mode** ``GPIO0`` ``GPIO2`` ``GPIO15`` ``boot mode:`` - ------------------------- --------- --------- ---------- -------------- - Boot from Flash (normal) HIGH HIGH LOW 3 - ------------------------- --------- --------- ---------- -------------- - Download Code from UART LOW HIGH LOW 1 - ------------------------- --------- --------- ---------- -------------- - Boot from SD-Card ANY ANY HIGH 4-7 - ========================= ========= ========= ========== ============== +========================= ========= ========= ========== ============== +**Mode** ``GPIO0`` ``GPIO2`` ``GPIO15`` ``boot mode:`` +------------------------- --------- --------- ---------- -------------- +Boot from Flash (normal) HIGH HIGH LOW 3 +------------------------- --------- --------- ---------- -------------- +Download Code from UART LOW HIGH LOW 1 +------------------------- --------- --------- ---------- -------------- +Boot from SD-Card ANY ANY HIGH 4-7 +========================= ========= ========= ========== ============== You can identify these on boot-up by looking at the UART output, the first number in the ``boot mode:`` line tells you what mode was selected @@ -156,48 +147,42 @@ Reset Causes Additionally, the first line also contains the **reset cause**. These reset causes `are documented `__: -.. table:: - :class: no-center - - == =================================== - 0 Undefined - -- ----------------------------------- - 1 Power On Reboot - -- ----------------------------------- - 2 External reset or deep-sleep wakeup - -- ----------------------------------- - 4 Hardware WDT reset - == =================================== +== =================================== +0 Undefined +-- ----------------------------------- +1 Power On Reboot +-- ----------------------------------- +2 External reset or deep-sleep wakeup +-- ----------------------------------- +4 Hardware WDT reset +== =================================== After a software reset, the reset cause will not change. Electrical Characteristics -------------------------- -.. table:: - :class: no-center - - =========================================================== =========== =========== =========== =========== - **Parameter** **Min.** **Typical** **Max.** **Unit** - ----------------------------------------------------------- ----------- ----------- ----------- ----------- - Operating Temperature -40 125 °C - ----------------------------------------------------------- ----------- ----------- ----------- ----------- - Working Voltage ``V_IO`` 2.5 3.3 3.6 V - ----------------------------------------------------------- ----------- ----------- ----------- ----------- - ``V_IL`` - INPUT voltage level to be considered LOW -0.3 0.25*V_IO V - ----------------------------------------------------------- ----------- ----------- ----------- ----------- - ``V_IH`` - INPUT voltage level to be considered HIGH 0.75*V_IO 3.6 V - ----------------------------------------------------------- ----------- ----------- ----------- ----------- - ``V_OL`` - OUTPUT voltage level for LOW 0.1*V_IO V - ----------------------------------------------------------- ----------- ----------- ----------- ----------- - ``V_OH`` - OUTPUT voltage level for HIGH 0.8*V_IO V - ----------------------------------------------------------- ----------- ----------- ----------- ----------- - ``I_MAX`` - Maximum current for GPIO 12 mA - ----------------------------------------------------------- ----------- ----------- ----------- ----------- - Power Consumption in Deep Sleep 20 µA - ----------------------------------------------------------- ----------- ----------- ----------- ----------- - Power Consumption in Active Mode 120 mA - =========================================================== =========== =========== =========== =========== +=========================================================== =========== =========== =========== =========== +**Parameter** **Min.** **Typical** **Max.** **Unit** +----------------------------------------------------------- ----------- ----------- ----------- ----------- +Operating Temperature -40 125 °C +----------------------------------------------------------- ----------- ----------- ----------- ----------- +Working Voltage ``V_IO`` 2.5 3.3 3.6 V +----------------------------------------------------------- ----------- ----------- ----------- ----------- +``V_IL`` - INPUT voltage level to be considered LOW -0.3 0.25*V_IO V +----------------------------------------------------------- ----------- ----------- ----------- ----------- +``V_IH`` - INPUT voltage level to be considered HIGH 0.75*V_IO 3.6 V +----------------------------------------------------------- ----------- ----------- ----------- ----------- +``V_OL`` - OUTPUT voltage level for LOW 0.1*V_IO V +----------------------------------------------------------- ----------- ----------- ----------- ----------- +``V_OH`` - OUTPUT voltage level for HIGH 0.8*V_IO V +----------------------------------------------------------- ----------- ----------- ----------- ----------- +``I_MAX`` - Maximum current for GPIO 12 mA +----------------------------------------------------------- ----------- ----------- ----------- ----------- +Power Consumption in Deep Sleep 20 µA +----------------------------------------------------------- ----------- ----------- ----------- ----------- +Power Consumption in Active Mode 120 mA +=========================================================== =========== =========== =========== =========== Source: `ESP8266EX datasheet `__ diff --git a/devices/sonoff_4ch.rst b/devices/sonoff_4ch.rst index 1fe451676..fcbdd159d 100644 --- a/devices/sonoff_4ch.rst +++ b/devices/sonoff_4ch.rst @@ -202,32 +202,29 @@ Now we would like the 4CH to actually do something, not just connect to WiFi and Below you will find a table of all usable GPIO pins of the Sonoff 4CH and a configuration file that exposes all of the basic functions. -.. table:: - :class: no-center - - ======================================== ========================================= - ``GPIO0`` Button #1 (inverted) - ---------------------------------------- ----------------------------------------- - ``GPIO9`` Button #2 (inverted) - ---------------------------------------- ----------------------------------------- - ``GPIO10`` Button #3 (inverted) - ---------------------------------------- ----------------------------------------- - ``GPIO14`` Button #4 (inverted) - ---------------------------------------- ----------------------------------------- - ``GPIO12`` Relay #1 and red LED - ---------------------------------------- ----------------------------------------- - ``GPIO5`` Relay #2 and red LED - ---------------------------------------- ----------------------------------------- - ``GPIO4`` Relay #3 and red LED - ---------------------------------------- ----------------------------------------- - ``GPIO15`` Relay #4 and red LED - ---------------------------------------- ----------------------------------------- - ``GPIO13`` Blue LED (inverted) - ---------------------------------------- ----------------------------------------- - ``GPIO1`` ``RX`` pin (for external sensors) - ---------------------------------------- ----------------------------------------- - ``GPIO3`` ``TX`` pin (for external sensors) - ======================================== ========================================= +======================================== ========================================= +``GPIO0`` Button #1 (inverted) +---------------------------------------- ----------------------------------------- +``GPIO9`` Button #2 (inverted) +---------------------------------------- ----------------------------------------- +``GPIO10`` Button #3 (inverted) +---------------------------------------- ----------------------------------------- +``GPIO14`` Button #4 (inverted) +---------------------------------------- ----------------------------------------- +``GPIO12`` Relay #1 and red LED +---------------------------------------- ----------------------------------------- +``GPIO5`` Relay #2 and red LED +---------------------------------------- ----------------------------------------- +``GPIO4`` Relay #3 and red LED +---------------------------------------- ----------------------------------------- +``GPIO15`` Relay #4 and red LED +---------------------------------------- ----------------------------------------- +``GPIO13`` Blue LED (inverted) +---------------------------------------- ----------------------------------------- +``GPIO1`` ``RX`` pin (for external sensors) +---------------------------------------- ----------------------------------------- +``GPIO3`` ``TX`` pin (for external sensors) +======================================== ========================================= .. code-block:: yaml diff --git a/devices/sonoff_basic.rst b/devices/sonoff_basic.rst index c5a56e5ef..67652beb9 100644 --- a/devices/sonoff_basic.rst +++ b/devices/sonoff_basic.rst @@ -40,22 +40,19 @@ said that other flash modes can brick the device, it's always good to specify it Below you will find a table of all usable GPIO pins of the Sonoff Basic and a configuration file that exposes all of the basic functions. -.. table:: - :class: no-center - - ================================================== ================================================== - ``GPIO0`` Button (inverted) - -------------------------------------------------- -------------------------------------------------- - ``GPIO1`` ``RX`` pin (C1 Pin 2) - -------------------------------------------------- -------------------------------------------------- - ``GPIO3`` ``TX`` pin (C1 Pin 3) - -------------------------------------------------- -------------------------------------------------- - ``GPIO12`` Relay - -------------------------------------------------- -------------------------------------------------- - ``GPIO13`` Green LED (inverted) - -------------------------------------------------- -------------------------------------------------- - ``GPIO14`` Optional Sensor (C1 Pin 5) - ================================================== ================================================== +================================================== ================================================== +``GPIO0`` Button (inverted) +-------------------------------------------------- -------------------------------------------------- +``GPIO1`` ``RX`` pin (C1 Pin 2) +-------------------------------------------------- -------------------------------------------------- +``GPIO3`` ``TX`` pin (C1 Pin 3) +-------------------------------------------------- -------------------------------------------------- +``GPIO12`` Relay +-------------------------------------------------- -------------------------------------------------- +``GPIO13`` Green LED (inverted) +-------------------------------------------------- -------------------------------------------------- +``GPIO14`` Optional Sensor (C1 Pin 5) +================================================== ================================================== .. code-block:: yaml diff --git a/devices/sonoff_s20.rst b/devices/sonoff_s20.rst index ccdd373b5..4a336f5fa 100644 --- a/devices/sonoff_s20.rst +++ b/devices/sonoff_s20.rst @@ -198,20 +198,17 @@ Now we would like the S20 to actually do something, not just connect to WiFi and Below you will find a table of all usable GPIO pins of the S20 and a configuration file that exposes all of the basic functions. -.. table:: - :class: no-center - - ======================================== ======================================== - ``GPIO0`` Push Button (HIGH = off, LOW = on) - ---------------------------------------- ---------------------------------------- - ``GPIO12`` Relay and its status LED - ---------------------------------------- ---------------------------------------- - ``GPIO13`` Green LED (HIGH = off, LOW = on) - ---------------------------------------- ---------------------------------------- - ``GPIO1`` ``RX`` pin (for external sensors) - ---------------------------------------- ---------------------------------------- - ``GPIO3`` ``TX`` pin (for external sensors) - ======================================== ======================================== +======================================== ======================================== +``GPIO0`` Push Button (HIGH = off, LOW = on) +---------------------------------------- ---------------------------------------- +``GPIO12`` Relay and its status LED +---------------------------------------- ---------------------------------------- +``GPIO13`` Green LED (HIGH = off, LOW = on) +---------------------------------------- ---------------------------------------- +``GPIO1`` ``RX`` pin (for external sensors) +---------------------------------------- ---------------------------------------- +``GPIO3`` ``TX`` pin (for external sensors) +======================================== ======================================== .. code-block:: yaml diff --git a/github.py b/github.py index 42afa91ab..7a1f5415e 100644 --- a/github.py +++ b/github.py @@ -91,6 +91,7 @@ class ImageTableDirective(Table): col_widths = self.get_column_widths(3) title, messages = self.make_title() table = nodes.table() + table['classes'].append('table-center') # Set up column specifications based on widths tgroup = nodes.tgroup(cols=3) @@ -141,7 +142,6 @@ class ImageTableDirective(Table): rows.append(trow) tbody.extend(rows) - table['classes'] += [] self.add_name(table) if title: table.insert(0, title) @@ -207,7 +207,6 @@ class PinTableDirective(Table): trow += entry tbody += trow - table['classes'] += ['no-center'] self.add_name(table) if title: table.insert(0, title) diff --git a/guides/faq.rst b/guides/faq.rst index f192797f1..10eb71a1f 100644 --- a/guides/faq.rst +++ b/guides/faq.rst @@ -315,14 +315,14 @@ This will result in really small firmware data which has a high chance of fittin Donations --------- -I invest lots of time into this project, so if you like esphomelib and want to support the project, donations -are very welcome. +I invest a lot of time into this project, so if you like ESPHome and want to +support the project, donations are very welcome :) -Before donating here though, please consider donating to charity (for example the red cross, UNICEF, greenpeace, ...). -They can use the money much better than I can. Also, I don't want donations for feature requests as I cannot -_guarantee_ that I can get a specific feature to work reliably. +You can donate to me via PayPal. Other donation options are being +explored. https://www.paypal.me/ottowinter -Donations are currently only possible via PayPal: https://www.paypal.me/ottowinter +(Please do not donate for specific features as I cannot guarantee I will +be able to implement a feature because of complexity or other problems.) See Also -------- diff --git a/images/index.rst b/images/index.rst new file mode 100644 index 000000000..1153ece16 --- /dev/null +++ b/images/index.rst @@ -0,0 +1,17 @@ +Images +====== + +This is a dummy file to include images in the sphinx output +that will only be used in raw HTML and thus not auto-included. + +.. image:: shield-discord.svg +.. image:: shield-github.svg +.. image:: shield-donate.svg +.. image:: shield-twitter.svg +.. image:: logo.svg +.. image:: logo-core.svg +.. image:: logo-docs.svg +.. image:: logo-flasher.svg +.. image:: logo-release.svg +.. image:: logo-text.svg + diff --git a/images/logo-docs.svg b/images/logo-docs.svg index 548210a21..cdc054497 100644 --- a/images/logo-docs.svg +++ b/images/logo-docs.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/images/shield-discord.svg b/images/shield-discord.svg new file mode 100644 index 000000000..a6732870f --- /dev/null +++ b/images/shield-discord.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/shield-donate.svg b/images/shield-donate.svg new file mode 100644 index 000000000..86e56b817 --- /dev/null +++ b/images/shield-donate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/shield-github.svg b/images/shield-github.svg new file mode 100644 index 000000000..459de0bff --- /dev/null +++ b/images/shield-github.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/shield-twitter.svg b/images/shield-twitter.svg new file mode 100644 index 000000000..736028428 --- /dev/null +++ b/images/shield-twitter.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/index.rst b/index.rst index f012e249d..15aaaa962 100644 --- a/index.rst +++ b/index.rst @@ -12,9 +12,10 @@ ESPHome .. raw:: html - GitHub stars - Release - Discord Chat + GitHub + Discord + Twitter + Donate .. _guides: @@ -312,3 +313,4 @@ documentation for others to copy. See :doc:`Contributing ` guides/index changelog/index custom/index + images/index diff --git a/svg2png/logo-flasher.png b/svg2png/logo-flasher.png new file mode 100644 index 000000000..7ec23f04d Binary files /dev/null and b/svg2png/logo-flasher.png differ diff --git a/svg2png/logo-release.png b/svg2png/logo-release.png new file mode 100644 index 000000000..8d3e8a8b2 Binary files /dev/null and b/svg2png/logo-release.png differ diff --git a/svg2png/shield-discord.png b/svg2png/shield-discord.png new file mode 100644 index 000000000..a5c548a82 Binary files /dev/null and b/svg2png/shield-discord.png differ diff --git a/svg2png/shield-donate.png b/svg2png/shield-donate.png new file mode 100644 index 000000000..ca74fd96b Binary files /dev/null and b/svg2png/shield-donate.png differ diff --git a/svg2png/shield-github.png b/svg2png/shield-github.png new file mode 100644 index 000000000..bb7d63875 Binary files /dev/null and b/svg2png/shield-github.png differ diff --git a/svg2png/shield-twitter.png b/svg2png/shield-twitter.png new file mode 100644 index 000000000..418bfe26a Binary files /dev/null and b/svg2png/shield-twitter.png differ