BH1750FVI - i2c light sensor?
Moderator: Benj
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: BH1750FVI - i2c light sensor?
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 343
- Joined: Fri Jan 26, 2018 12:30 pm
- Location: South Australia
- Has thanked: 44 times
- Been thanked: 60 times
- Contact:
Re: BH1750FVI - i2c light sensor?
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.
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.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: BH1750FVI - i2c light sensor?
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.
Let me know how you're getting on and if your finding it tough then I'll see what I can do for you.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel