Skip to content

endail/BH1750

Repository files navigation

BH1750

Build on Raspberry Pi cppcheck

Example

#include "BH1750.h"
#include <iostream>

int main() {
  
  BH1750::BH1750 sensor;
  sensor.connect();
  
  std::cout << sensor.lux() << std::endl;
  
  return 0;

}

Use

After writing your own code (eg. main.cpp), compile and link with the lgpio library as follows:

pi@raspberrypi:~ $ g++ -Wall -o prog main.cpp -llgpio

About

BH1750 light sensor API for Raspberry Pi

Topics

Resources

License

Stars

Watchers

Forks