BH1750 (community library)

Summary

Name Value
Name BH1750
Version 1.0.0
Installs
License GNU
Author Alik aliktab@gmail.com
URL https://github.com/aliktab/Particle_BH1750
Repository https://github.com/aliktab/Particle_BH1750.git
Download .tar.gz

BH1750 library for Particle BH1750 library for Particle.

Example Build Testing

Device OS Version:

This table is generated from an automated build. Success only indicates that the code compiled successfully.

Library Read Me

This content is provided by the library maintainer and has not been validated or approved.

BH1750

Particle Library for the BH1750 chip

Particle library to control BH1750 chip, supports connection via any hardware I2C.

Usage

Connect any BH1750 hardware, add the BH1750 library to your project and follow this simple example:

BH1750 sensor(0x23, Wire);

void setup()
{
sensor.begin();

sensor.set_sensor_mode(BH1750::forced_mode_high_res2);

Serial.begin();
}

void loop()
{
sensor.make_forced_measurement();

Serial.println(String::format("%f", sensor.get_light_level()));

delay(1000);
}

See the examples folder for more details.

Contributing

Here's how you can make changes to this library and eventually contribute those changes back.

To get started, clone the library from GitHub to your local machine.

Change the name of the library in library.properties to something different. You can add your name at then end.

Modify the sources in and with the new behavior.

To compile an example, use particle compile examples/usage command in Particle CLI or use our Desktop IDE.

After your changes are done you can upload them with particle library upload or Upload command in the IDE. This will create a private (only visible by you) library that you can use in other projects. Do particle library add NeoRingDsp_myname to add the library to a project on your machine or add the NeoRingDsp_myname library to a project on the Web IDE or Desktop IDE.

At this point, you can create a GitHub pull request with your changes to the original library.

If you wish to make your library public, use particle library publish or Publish command.

LICENSE

Copyright (C) 2014 Alik aliktab@gmail.com All rights reserved.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Browse Library Files