filters:
# The values after multiplied by 1000000 are 0, 20, 100, 320
# and correspond to LED being off, low, med, high intensity.
# The "pulse_width" sensor sometimes reads non-0 (e.g 221) when
# the LED is off which is why 0 (off state) is returned in the
default case.
- multiply: 1000000
corrected code
filters:
# The values after multiplied by 1000000 are 0, 20, 100, 320
# and correspond to LED being off, low, med, high intensity.
# The "pulse_width" sensor sometimes reads non-0 (e.g 221) when
# the LED is off which is why 0 (off state) is returned in the
# default case.
- multiply: 1000000
noticed a typo in the sample code
current code:
corrected code