Simple Arduino sketch to test Broadcom's APDS9253 RGBiR light sensor. The I2C sensor has a wide dynamic range, has four dedicated channels for R, G, B, and IR, has a mode where only the ambient light (green) and IR channels are active to save power, and has an interrupt for light threshold or light variation detection. The interrupt would have been more useful if it included a data ready function as well as separate interrupt bits for crossing the high and low thresholds. But this is a pretty useful sensor that makes for a poor man's 4-channel spectrometer (FWHM ~ 100 nm) as well an ambient light sensor.
I used the STM32L432 (Ladybug) development board to test but the sketch should be easy to adapt foralmost any MCU.
The breakout board design is available on the OSH Park shared space.