1
0
mirror of https://github.com/dantudose/MAX44009.git synced 2025-07-31 13:24:20 +03:00
Files
MAX44009/examples/Luxmeter/Luxmeter.ino
2018-11-21 12:20:48 +02:00

26 lines
350 B
C++

#include <Wire.h>
#include <MAX44009.h>
MAX44009 light;
void setup()
{
Serial.begin(9600);
Wire.begin();
delay(500);
if(light.begin())
{
Serial.println("Could not find a valid MAX44009 sensor, check wiring!");
while(1);
}
}
void loop()
{
Serial.print("Light (lux): ");
Serial.println(light.get_lux());
delay(1000);
}