Created Wemos D1 Mini and TSL2561 Luminosity Sensor (markdown)

Raymond Mouthaan 2018-05-21 15:08:33 +02:00
parent c50f88f5eb
commit 6a0329b6c1
1 changed files with 35 additions and 0 deletions

@ -0,0 +1,35 @@
## TSL2561 Luminosity Sensor (I2C)
<img src="https://github.com/arendst/arendst.github.io/blob/master/media/wemos/tsl2561-adafruit-lux-sensor.jpg" align=right width=225>
<img src="https://github.com/arendst/arendst.github.io/blob/master/media/wemos/tsl2561-lux-sensor-front.jpeg" align=right width=225>
<img src="https://github.com/arendst/arendst.github.io/blob/master/media/wemos/tsl2561-lux-sensor-back.jpg" align=right width=225>
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 |
|---|---|
|GND |GND |
|3.3V |VCC |
|D2 (gpio04) |SDA |
|D1 (gpio05) |SCL |
### Tasmota Configuration
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**
<img src="https://github.com/arendst/arendst.github.io/blob/master/media/wemos/wemos_tsl2561_config_marked.jpg" width=300>
### Tasmota Main
After reboot of the device the displays the TSL2561 Illuminance.
<img src="https://github.com/arendst/arendst.github.io/blob/master/media/wemos/wemos_tsl2561_main_marked.jpg" width=300>