ENVIRONMENT TO USE THE NIR SENSOR AS7263

It is understood that using the NIR sensor in an environment exposed to ambient light can cause interference. I plan to use an enclosure to isolate the sensor from such interference. However, when I use the NIR sensor in a dark enclosure relying only on its integrated LED, the sensor returns zero or null values.

What recommendations could you give me?

Ensure the LED is actually being activated when in-use; you can also try providing a separate known-spec light source if needed

I’d recommend running through our guide as well AS726X NIR/VIS Spectral Sensor Hookup Guide - SparkFun Learn