# My node - GY-302 BH1750 Light Sensor I2C

**URL:** <https://forum.xod.io/t/my-node-gy-302-bh1750-light-sensor-i2c/2124>\
**Category:** Look What I’ve Done\
**Created:** [April 11, 2019, 8:49pm UTC](https://forum.xod.io/t/my-node-gy-302-bh1750-light-sensor-i2c/2124 "2019-04-11T20:49:36Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![vitaliysh](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/vitaliysh/32/1428_2.png) [@vitaliysh](https://forum.xod.io/u/vitaliysh)\
**Post date:** [April 11, 2019, 8:49pm UTC](https://forum.xod.io/t/my-node-gy-302-bh1750-light-sensor-i2c/2124/1 "2019-04-11T20:49:36Z")

</div>

My node - GY-302 BH1750 Light Sensor I2C [https://xod.io/libs/vitaliysh/bh1750/](https://xod.io/libs/vitaliysh/bh1750/)  
It is necessary to start reading the readout no more than 0.15 seconds, otherwise the sensor stops showing data.  
How to insert this delay into the node itself? Or just leave as is?

An example of the sensor. My room.

![bh1750](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/2X/9/9d35f72c753291445f47e7482af5c6f054abef1d.jpeg)

---

<div class="post-metadata">

**Author:** ![cesars](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cesars](https://forum.xod.io/u/cesars)\
**Post date:** [April 11, 2019, 10:11pm UTC](https://forum.xod.io/t/my-node-gy-302-bh1750-light-sensor-i2c/2124/2 "2019-04-11T22:11:50Z")

</div>

> [@vitaliysh](#):
>
> How to insert this delay into the node itself?

Hi, try this

![image](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/2X/3/34fdbd7b1324859718191da957e693832e0eb15a.png)

---

<div class="post-metadata">

**Author:** ![vitaliysh](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/vitaliysh/32/1428_2.png) [@vitaliysh](https://forum.xod.io/u/vitaliysh)\
**Post date:** [April 12, 2019, 6:40pm UTC](https://forum.xod.io/t/my-node-gy-302-bh1750-light-sensor-i2c/2124/3 "2019-04-12T18:40:36Z")

</div>

Thank you. Node works. )

---

<div class="post-metadata">

**Author:** ![uther2017](https://avatars.discourse-cdn.com/v4/letter/u/e19adc/32.png) [@uther2017](https://forum.xod.io/u/uther2017)\
**Post date:** [September 29, 2019, 10:26pm UTC](https://forum.xod.io/t/my-node-gy-302-bh1750-light-sensor-i2c/2124/4 "2019-09-29T22:26:37Z")

</div>

How do I get this sensor to work? I placed the bh1750 node down into the xod ide and added a watch node to the Llx. I left the everything else the same on it and did an upload and debug to my Arduino nano and im getting a reading of 0.00 and it doesn’t change. I hooked the vcc on the sensor to 3.3v. Ground to ground. SDA to A4 and SCL to A5. I did not attach the address pin from the sensor to the board. Don’t really know what that pin is for. Did I need to do something with the address pin on the sensor?

---

<div class="post-metadata">

**Author:** ![cesars](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cesars](https://forum.xod.io/u/cesars)\
**Post date:** [September 29, 2019, 11:19pm UTC](https://forum.xod.io/t/my-node-gy-302-bh1750-light-sensor-i2c/2124/5 "2019-09-29T23:19:19Z")

</div>

the sensor has a 5v to 3v regulator, it may not work for that, if you use 3v you should connect past the regulator

---

<div class="post-metadata">

**Author:** ![uther2017](https://avatars.discourse-cdn.com/v4/letter/u/e19adc/32.png) [@uther2017](https://forum.xod.io/u/uther2017)\
**Post date:** [September 29, 2019, 11:54pm UTC](https://forum.xod.io/t/my-node-gy-302-bh1750-light-sensor-i2c/2124/6 "2019-09-29T23:54:47Z")

</div>

I switched the sensor to 5 volts on the board and it didn’t fix the problem. Does the node work for you?

---

<div class="post-metadata">

**Author:** ![cesars](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cesars](https://forum.xod.io/u/cesars)\
**Post date:** [September 30, 2019, 1:16am UTC](https://forum.xod.io/t/my-node-gy-302-bh1750-light-sensor-i2c/2124/7 "2019-09-30T01:16:13Z")

</div>

I don’t have that model, but I think there is a problem reading in i2c in version 0.30.1

---

<div class="post-metadata">

**Author:** ![vitaliysh](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/vitaliysh/32/1428_2.png) [@vitaliysh](https://forum.xod.io/u/vitaliysh)\
**Post date:** [September 30, 2019, 7:08pm UTC](https://forum.xod.io/t/my-node-gy-302-bh1750-light-sensor-i2c/2124/8 "2019-09-30T19:08:57Z")

</div>

I just redid it for the new version of the program. My node is working.

---

<div class="post-metadata">

**Author:** ![kebelethoi](https://avatars.discourse-cdn.com/v4/letter/k/a9a28c/32.png) [@kebelethoi](https://forum.xod.io/u/kebelethoi)\
**Post date:** [December 4, 2019, 3:50pm UTC](https://forum.xod.io/t/my-node-gy-302-bh1750-light-sensor-i2c/2124/9 "2019-12-04T15:50:34Z")

</div>

Hi  
I have used the bh1750 program with arduino mega2560 and lcd i2c.  
But the display system is lcd 0.00

BH1750 SCL —\> 20 arduino mega2560  
DSA —\> 21  
Help me.
