Skip to content

Commit b80ad66

Browse files
committed
Update Zigbee_Illuminance_Sensor.ino
1 parent c17ddf6 commit b80ad66

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: libraries/Zigbee/examples/Zigbee_Illuminance_Sensor/Zigbee_Illuminance_Sensor.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ static void illuminance_sensor_value_update(void *arg) {
4747

4848
// conversion into zigbee raw illuminance value (typically between 0 in darkness and 50000 in direct sunlight)
4949
// depends on the value range of the raw analog sensor values and will need calibration for correct lux values
50-
int lsens_illuminance_raw =
51-
map(lsens_analog_raw, 0, 4095, 0, 50000); // to demonstate map the 12-bit ADC value (0-4095) to Zigbee illuminance range (0-50000)
50+
// for demonstration purpose map the 12-bit ADC value (0-4095) to Zigbee illuminance range (0-50000)
51+
int lsens_illuminance_raw = map(lsens_analog_raw, 0, 4095, 0, 50000);
5252
Serial.printf("[Illuminance Sensor] raw illuminance value: %d\r\n", lsens_illuminance_raw);
5353

5454
// according to zigbee documentation the formular 10^(lsens_illuminance_raw/10000)-1 can be used to calculate lux value from raw illuminance value

0 commit comments

Comments
 (0)