code : /* This is a simple code to test BH1750FVI Light senosr communicate using I2C Protocol this library enable 2 slave device address Main address 0x23 secondary address 0x5C connect this sensor as following : VCC > 3.3V SDA > A4 SCL > A5 addr > A3 Gnd >Gnd Written By : Mohannad Rawashdeh */ // First define the library : #include // Sensor Library #include // I2C Library BH1750FVI LightSensor void setup() This Video For it First program : Read the Lux value via serial Port. You can Open the sketch comes with this library. You can downLoad the library from Github, Unzip the attachment and put it in Libraries folder in arduino Path, then restart the arduino IDE. If ADDR = LOW, The address will be 0x23 If ADDR = HIGH, The address will be 0x5C 2)Power down mode, you can put your sensor in power save mode so it's consume 0.01uA. I prepared a library for it, Tried to solve some issue such like : 1) multi device connecting, You can connect 2 devices of BH1750 WIth different addresses, Depend on ADDR Pin status. I prepared a library for this sensor, You can download it from Here First Many thanks for Claws , He created a library for BH1750, You can check it Out.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |