![]() ![]() Initialize the I2C bus (BH1750 library doesn't do this automatically) This example initialises the BH1750 object using the default high resolution continuous mode and then makes a light level reading every second. It is the example code from the library called BH1750test (you can access it in File > Examples > BH1750 > BH1750test /*Įxample of BH1750 library usage. This code simply reads ambient light in lux and displays the values on the Serial Monitor. ![]() ApplicationsĬode – Reading BH1750 Ambient Light SensorĬopy the following code to your Arduino IDE. ![]() In one-time measurement mode, the sensor measures the ambient light value once, and then it goes to power down mode. In continuous measurement mode, the sensor continuously measures ambient light values. Each mode supports three different resolution modes. The sensor supports two different measurement modes: continuous measurement mode, and one-time measurement mode. The influence of infrared is very small.It is possible to select 2 different I2 C slave-addresses.50Hz / 60Hz Light noise reject-function.Spectral responsibility is approximately human eye response.For more information consult the BH1750 sensor datasheet. Here’s a list of the BH1750 sensor features. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |