nanoFramework.Iot.Device.Bh1750fvi 1.0.258

Install-Package nanoFramework.Iot.Device.Bh1750fvi -Version 1.0.258
dotnet add package nanoFramework.Iot.Device.Bh1750fvi --version 1.0.258
<PackageReference Include="nanoFramework.Iot.Device.Bh1750fvi" Version="1.0.258" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add nanoFramework.Iot.Device.Bh1750fvi --version 1.0.258
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: nanoFramework.Iot.Device.Bh1750fvi, 1.0.258"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install nanoFramework.Iot.Device.Bh1750fvi as a Cake Addin
#addin nuget:?package=nanoFramework.Iot.Device.Bh1750fvi&version=1.0.258

// Install nanoFramework.Iot.Device.Bh1750fvi as a Cake Tool
#tool nuget:?package=nanoFramework.Iot.Device.Bh1750fvi&version=1.0.258
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

BH1750FVI - Ambient Light Sensor

BH1750FVI is an digital Ambient Light Sensor IC for I2C bus interface. This IC is the most suitable to obtain the ambient light data for adjusting LCD and Keypad backlight power of Mobile phone. It is possible to detect wide range at High resolution.

Documentation

Product datasheet can be found here

Sensor Image

sensor

Usage

Important: make sure you properly setup the I2C pins especially for ESP32 before creating the I2cDevice, make sure you install the nanoFramework.Hardware.ESP32 nuget:

//////////////////////////////////////////////////////////////////////
// when connecting to an ESP32 device, need to configure the I2C GPIOs
// used for the bus
Configuration.SetPinFunction(21, DeviceFunction.I2C1_DATA);
Configuration.SetPinFunction(22, DeviceFunction.I2C1_CLOCK);

For other devices like STM32, please make sure you're using the preset pins for the I2C bus you want to use.

I2cConnectionSettings settings = new I2cConnectionSettings(busId: 1, (int)I2cAddress.AddPinLow);
I2cDevice device = I2cDevice.Create(settings);

using (Bh1750fvi sensor = new Bh1750fvi(device))
{
    // read illuminance(Lux)
    double illuminance = sensor.Illuminance;
}

Circuit

circuit

  • SCL - SCL
  • SDA - SDA
  • VCC - 5V
  • GND - GND
  • ADDR - GND

Result of the sample:

running result

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.258 0 12/7/2021
1.0.209 105 10/12/2021
1.0.157 71 9/4/2021
1.0.155 73 8/31/2021
1.0.153 68 8/14/2021
1.0.151 81 8/6/2021
1.0.146 73 7/22/2021
1.0.136 138 7/17/2021
1.0.134 52 7/15/2021
1.0.133 37 7/14/2021
1.0.130 39 7/6/2021
1.0.129 44 7/6/2021
1.0.127 55 7/5/2021
1.0.125 77 7/5/2021
1.0.122 66 6/30/2021
1.0.121 59 6/29/2021
1.0.120 51 6/29/2021
1.0.119 91 6/28/2021
1.0.111 58 6/14/2021
1.0.105 137 5/29/2021
1.0.104 119 5/29/2021
1.0.97 57 5/28/2021
1.0.31 59 5/24/2021