58 Serial.println(
"Failed to find CM32181 - check your wiring!");
64 Serial.println(
"Init CM32181 Sensor success!");
67 Serial.print(
"CM32181 ID = "); Serial.println(
id);
92 Serial.print(
" RAW:"); Serial.print(raw);
93 Serial.print(
" Lux:"); Serial.println(lux);
bool begin(SensorCommCustom::CustomCallback callback, uint8_t addr)
Initialize the sensor using custom callback interface.
High Sensitivity I2C Ambient Light Sensor (CM32181) driver.
void setSampling(Sampling sampling=SAMPLING_X1, IntegrationTime int_time=INTEGRATION_TIME_200MS)
Configure ALS sensitivity and integration time.
void powerOn()
Power on sensor (REG_ALS_CONF bit0 = 0).
float getLux()
Convert raw ALS to lux (approximate).
uint16_t getRaw()
Read raw ALS data (16-bit).
int getChipID()
Read chip ID.
@ SAMPLING_X2
ALS Sensitivity x2.