-
1Run a Program#include #include
int BH1750address = 0x23;
byte buff[2];
LiquidCrystal lcd (7,6,5,4,3,2); //RS, E, D4, D5, D6, D7
void setup()
{
Wire.begin();
//Serial.begin(9600);
lcd.begin(16,2);
lcd.print(" BH1750 Light ");
lcd.setCursor(0,1);
lcd.print("Intensity Sensor");
delay(2000);
}
void loop()
{
int i;
uint16_t value=0;
BH1750_Init(BH1750address);
delay(200);
if(2==BH1750_Read(BH1750address))
{
value=((buff[0]<
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.