BH1750FVI - i2c light sensor?

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

Post Reply
viktor_au
Posts: 210
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Contact:

BH1750FVI - i2c light sensor?

Post by viktor_au »

Has anybody have had an experience with this i2c device?

User avatar
Benj
Matrix Staff
Posts: 15147
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: BH1750FVI - i2c light sensor?

Post by Benj »

Hello,

I've had a quick look and it looks fairly straightforward. You need to pay attention to the DVI pin when initialising, this needs to be pulled low for at least 1us before pulling it high to startup the device.

Page 10 of the datasheet shows how to write a command op code and how to read a measurement using I2C commands.

Let us know how your getting on.

viktor_au
Posts: 210
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Contact:

Re: BH1750FVI - i2c light sensor?

Post by viktor_au »

Thank you Ben.
I didn't expect you to write... thanks.
I thought someone might used this sensor in the project.
I have ordered one module and will try to use it in a few weeks.
The reason I posted a question about it - that I have an interest in in using this sensor behind the rear window of a motor-home. Sensor does allow to change the MTreg ( measurement time regisiter ) value, to change the sensitivity as well. I read somewhere on Arduino forum about possibilty to adjust sensor to work behind the glass (create some kind of a compensation?)
I thought someone might did it.
Thanks again.
Will keep reading the datasheet.

User avatar
Benj
Matrix Staff
Posts: 15147
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: BH1750FVI - i2c light sensor?

Post by Benj »

I've written a v9 component for it now and can port it to v8 if it would be useful but there's not much code there so should be doable with the I2C master component.

Let me know how you're getting on and if your finding it tough then I'll see what I can do for you.

viktor_au
Posts: 210
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Contact:

Re: BH1750FVI - i2c light sensor?

Post by viktor_au »

Understood Ben.
Good news for V9 FC users: more components!

Post Reply