m5stack / M5StickC

M5StickC Arduino Library
MIT License
477 stars 222 forks source link

Is it possible to read the IR transmitter (or LED) to detect ambient light? #100

Closed PaulMcGuinness closed 3 years ago

PaulMcGuinness commented 4 years ago

I've seen various hacks on Hackaday.com to use LED's as sensors.

Does anyone think this could be leveraged within the M5StickC?

dcremonini commented 4 years ago

Looking at the datasheet I can see the IR should be readable. But IR (infrared) are not in the field of visible so I guess the most you might dewtect is the presence of some IR rays and not of light.

PaulMcGuinness commented 4 years ago

Agreed, but there is a lot more IR in daylight that at night, so ergo you could correlate a value I would have thought?

dcremonini commented 4 years ago

I don't know and I received the device a few days ago. I will keep in mind your question and I hope to having the change to have a look.

Zontex commented 3 years ago

not possible, for this you have other type of sensor such as photo-resistor or photo-diode that convert light into electrical energy, IR can be used as proximity sensors (read the light hit on object and bounce back time) but not as photo-sensors. also, consider asking such questions at forum.m5stack.com you'd probably get more answers from the rest of the community members, this git is more of M5Stick related issues :)