Ultra-Thin Ambient Light Sensor Arduino Micro Programming

Hi,

I have to turn ON/OFF an LED-based on the outer environment light. For example, if there is sunlight then turn OFF LED and if there is night then turn ON LED. I need a simple basic program to set up the OPT3007 sensor for this task. I am a bit new with this sensor so I am confused about how to start it>

Any help or suggestions are much appreciated.

Thanks

[/Ultra-Thin Ambient Light Sensor[/https://www.sparkfun.com/products/15498]

It doesn’t look like there’s any code for this sensor, you’d need to consult the data sheet and create a library to use this part.

Might be easier for you to use something like a [photocell if you’re just sensing day/night, they are cheaper and a lot easier to work with.](Mini Photocell - SEN-09088 - SparkFun Electronics)

YellowDog:
It doesn’t look like there’s any code for this sensor, you’d need to consult the data sheet and create a library to use this part.

Might be easier for you to use something like a [photocell if you’re just sensing day/night, they are cheaper and a lot easier to work with.
[/quote]

I thought so too. There’s no code for this sensor.](Mini Photocell - SEN-09088 - SparkFun Electronics)