diff --git a/docs/source/Plugin/P015_Setup_TSL2561_1.png b/docs/source/Plugin/P015_Setup_TSL2561_1.png new file mode 100644 index 000000000..bc2bbc04d Binary files /dev/null and b/docs/source/Plugin/P015_Setup_TSL2561_1.png differ diff --git a/docs/source/Plugin/P015_TSL2561.rst b/docs/source/Plugin/P015_TSL2561.rst new file mode 100644 index 000000000..2c370ef50 --- /dev/null +++ b/docs/source/Plugin/P015_TSL2561.rst @@ -0,0 +1,129 @@ +.. include:: ../Plugin/_plugin_substitutions_p01x.repl +.. _P015_TSL2561_page: + +TSL2561 +======= + +|P015_typename| +|P015_status| + +.. image:: P015_TSL2561_1.jpg + +Introduction +------------ +The TSL2561 are light-to-digital converters that transform light intensity to a digital +signal output. First targeted to accompany LCD and OLED displays in order to dim them +if the ambient light is lower, making the battery life better for the unit its a part of. +The unit can also be found in illuminated keyboards and digital cameras. + +The TSL2561 sensor is a luminosity sensor. It's spectral sensitivity approximately meets +the human eye sensitivity. The gain of the sensor can be set to a 16x gain mode with the settings. +It is connected to the ESP via I²C so connecting even with several sensors and a display is easy to do. + +Specifications: + * Output: 0.1 - 40 000+ Lux + * Temperature (-30 to +70C but best readings between +5 to +50C) + * Humidity (0 - 60 % rel. humidity) + + +Wiring +------ + +.. image:: P015_TSL2561_2.jpg + +.. code-block:: html + + ESP TSL2561 + GPIO (5) <--> SCL + GPIO (4) <--> SDA + ADDR (not used = 0x39) + + Power + 3.3V <--> VCC + GND <--> GND + +The ADDR pin can be used if you have an i2c address conflict, to change the address. + +Connect it to GND to set the address to 0x29. + +Connect it to VCC (3.3V) to set the address to 0x49. + +Leave it floating (unconnected) to use address 0x39. + +Some boards have soldering pads or jumper selectors for the ADDR. + +.. image:: P015_TSL2561_wiring_1.jpg + +Setup +----- + +.. image:: P015_Setup_TSL2561_1.png + +Task settings +~~~~~~~~~~~~~ + +* **Device**: Name of plugin +* **Name**: Name of the task (example name **Light**) +* **Enable**: Should the task be enabled or not + +Sensor +^^^^^^ + +* **I2C Address**: Default 0x39 is used. +* **Integration time**: 13 msec is the default, works in normal lit areas. Increase the integration time for low light areas, it will collect light longer if set to longer time. +* **Send sensor to sleep**: Have it checked in order to save the unit from wear, especially good if you do measurements with long intervals in between. +* **Enable 16x Gain**: Have it checked in order to get higher readings in low light areas. + +Data acquisition +^^^^^^^^^^^^^^^^ + +* **Send to controller** 1..3: Check which controller (if any) you want to publish to. All or no controller can be used. +* **Interval**: How often should the task publish its value (5..15 seconds is normal). + +Indicators (recommended settings) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. csv-table:: + :header: "Indicator", "Value Name", "Interval", "Decimals", "Extra information" + :widths: 8, 5, 5, 5, 40 + + "Visible light", "VI_Lux", "10", "0", "In normal lit areas you probably don't need a decimal." + "Infrared light", "IR_Lux", "10", "0", "Light not visible to humans but felt in some cases, used in dry saunas and patio heating etc." + "Broadband light", "BR_Lux", "10", "0", "Visible or near visible light that is felt, used in skin treatments etc." + +Rules examples +-------------- + +.. code-block:: html + + on Light#VI_Lux do + if Light#VI_Lux>100 + Publish,%sysname%/light,Is on + else + Publish,%sysname%/light,Is off + endif + endon + +.. Commands available +.. ~~~~~~~~~~~~~~~~~~ + +.. .. include:: P015_commands.repl + +Where to buy +------------ + +.. csv-table:: + :header: "Store", "Link" + :widths: 5, 40 + + "AliExpress","`Link 1 ($) `_" + "Banggood","`Link 2 ($) `_" + "eBay","`Link 3 ($) `_" + +|affiliate| + + +.. More pictures +.. ------------- + +.. .. image:: P015_TSL2561_X.jpg diff --git a/docs/source/Plugin/P015_TSL2561_1.jpg b/docs/source/Plugin/P015_TSL2561_1.jpg new file mode 100644 index 000000000..483c3a49c Binary files /dev/null and b/docs/source/Plugin/P015_TSL2561_1.jpg differ diff --git a/docs/source/Plugin/P015_TSL2561_2.jpg b/docs/source/Plugin/P015_TSL2561_2.jpg new file mode 100644 index 000000000..e4d0fda46 Binary files /dev/null and b/docs/source/Plugin/P015_TSL2561_2.jpg differ diff --git a/docs/source/Plugin/P015_TSL2561_wiring_1.jpg b/docs/source/Plugin/P015_TSL2561_wiring_1.jpg new file mode 100644 index 000000000..cc14de711 Binary files /dev/null and b/docs/source/Plugin/P015_TSL2561_wiring_1.jpg differ diff --git a/docs/source/Plugin/P082_Neo-7M.rst b/docs/source/Plugin/P082_Neo-7M.rst index 66ec62ed5..c4112d8e8 100644 --- a/docs/source/Plugin/P082_Neo-7M.rst +++ b/docs/source/Plugin/P082_Neo-7M.rst @@ -67,8 +67,8 @@ Sensor * **GPIO <-- TX**: Used to communicate with the GPS unit. * **GPIO --> RX**: Not used (optional), to push commands back into the GPS unit. * **GPIO --> PPS**: Experimental (optional), used to let the GPS unit update the time of the ESP. -* **Dropdown**: ``SoftwareSerial`` lets you select any GPIO pin, ``HW Serial0`` is the preferred (most stable), ``HW Serial0 swapped`` is similar to Serial0, ``HW Serial1`` is only able -to receive data from the GPS unit. +* **Dropdown**: ``SoftwareSerial`` lets you select any GPIO pin, ``HW Serial0`` is the preferred (most stable), + ``HW Serial0 swapped`` is similar to Serial0, ``HW Serial1`` is only able to receive data from the GPS unit. .. warning:: It's highly recommended you use either the ``HW Serial1`` or ``HW Serial0`` for stable reading of the GPS unit. But also remember to disable the serial in the advanced settings page, if not the ESP will interfere with the GPS unit. diff --git a/docs/source/Plugin/P082_Neo-M8n.rst b/docs/source/Plugin/P082_Neo-M8n.rst index ae9b519d1..a8ba0a72d 100644 --- a/docs/source/Plugin/P082_Neo-M8n.rst +++ b/docs/source/Plugin/P082_Neo-M8n.rst @@ -69,8 +69,8 @@ Sensor * **GPIO <-- TX**: Used to communicate with the GPS unit. * **GPIO --> RX**: Not used (optional), to push commands back into the GPS unit. * **GPIO --> PPS**: Experimental (optional), used to let the GPS unit update the time of the ESP. -* **Dropdown**: ``SoftwareSerial`` lets you select any GPIO pin, ``HW Serial0`` is the preferred (most stable), ``HW Serial0 swapped`` is similar to Serial0, ``HW Serial1`` is only able -to receive data from the GPS unit. +* **Dropdown**: ``SoftwareSerial`` lets you select any GPIO pin, ``HW Serial0`` is the preferred (most stable), + ``HW Serial0 swapped`` is similar to Serial0, ``HW Serial1`` is only able to receive data from the GPS unit. .. warning:: It's highly recommended you use either the ``HW Serial1`` or ``HW Serial0`` for stable reading of the GPS unit. But also remember to disable the serial in the advanced settings page, if not the ESP will interfere with the GPS unit. @@ -127,7 +127,7 @@ Where to buy "AliExpress","`Link 1 ($) `_" "Banggood","`Link 2 ($) `_ `Link 3 ($) `_" - "eBay","`Link 3 ($) `_" + "eBay","`Link 4 ($) `_" |affiliate| diff --git a/docs/source/Plugin/_Plugin.rst b/docs/source/Plugin/_Plugin.rst index b9d0eebe0..639a429a2 100644 --- a/docs/source/Plugin/_Plugin.rst +++ b/docs/source/Plugin/_Plugin.rst @@ -204,6 +204,8 @@ Light/Lux Plugins: |Plugin_Light_Lux| +Hardware: |P015_usedby| + Motor ----- diff --git a/docs/source/Plugin/_plugin_substitutions_p01x.repl b/docs/source/Plugin/_plugin_substitutions_p01x.repl index 2cd4bc10b..58b19c288 100644 --- a/docs/source/Plugin/_plugin_substitutions_p01x.repl +++ b/docs/source/Plugin/_plugin_substitutions_p01x.repl @@ -64,8 +64,8 @@ .. |P015_status| replace:: :green:`NORMAL` .. |P015_github| replace:: P015_TSL2561.ino .. _P015_github: https://github.com/letscontrolit/ESPEasy/blob/mega/src/_P015_TSL2561.ino -.. |P015_usedby| replace:: `.` -.. |P015_shortinfo| replace:: `.` +.. |P015_usedby| replace:: :ref:`P015_TSL2561_page` +.. |P015_shortinfo| replace:: Light measuring unit (visible and IR light) .. |P015_maintainer| replace:: `.` .. |P015_compileinfo| replace:: `.` .. |P015_usedlibraries| replace:: `.`