From 08785a0c849dad9135be568c551c24222d170f2c Mon Sep 17 00:00:00 2001 From: Raymond Mouthaan Date: Fri, 23 Mar 2018 17:47:42 +0100 Subject: [PATCH] TSL2561 added --- Wemos-D1-Mini.md | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/Wemos-D1-Mini.md b/Wemos-D1-Mini.md index bc9e9127..dd4b88d4 100644 --- a/Wemos-D1-Mini.md +++ b/Wemos-D1-Mini.md @@ -95,8 +95,13 @@ After reboot of the device the temperature and humidity are displayed. ## Motion Sensor PIR (HC-SR501) - - + + + + +PIR sensors allow you to sense motion, almost always used to detect whether a human has moved in or out of the sensors range. +See [PIR Motion Sensor](https://learn.adafruit.com/pir-passive-infrared-proximity-motion-sensor/overview) for more information. + Connecting the PIR to a Wemos Mini D1. @@ -106,25 +111,31 @@ Connecting the PIR to a Wemos Mini D1. |5V |POWER (VCC) | |D5 (gpio14) |OUTPUT | - - In the Configuration -> Configure Module page, select the following: 1. **Module Type : 18 Generic** 2. **D5 GPIO14 Sensor : 09 Switch1** 3. **D6 GPIO12 Relay1 : 17 Relay1** + + After reboot of the device the displays the status of relay1 aka switch1. ## TSL2561 luminosity Sensor - - +The TSL2561 luminosity sensor is an advanced digital light sensor, ideal for use in a wide range of light situations. See [TSL2561 luminosity sensor](https://learn.adafruit.com/tsl2561/overview) for more information. + +_Note: before the TSL2561 can be used with Tasmota, make sure it's enabled. To enable it, remove the forward slashes before this line before you compile and upload tasmota to your Wemos device._ + +``` +#define USE_TSL2561 // Add I2C code for TSL2561 sensor using library Joba_Tsl2561 (+2k3 code) +``` + Connecting the TSL2561 to a Wemos Mini D1. | Wemos | TSL2561 | @@ -134,13 +145,14 @@ Connecting the TSL2561 to a Wemos Mini D1. |D2 (gpio04) |SDA | |D1 (gpio05) |SCL | - In the Configuration -> Configure Module page, select the following: 1. **Module Type : 18 Generic** 2. **D2 GPIO04 : 06 I2C SDA** 3. **D1 GPIO05 : 05 I2C SCL** + + After reboot of the device the displays the TSL2561 Illuminance. \ No newline at end of file