pbolduc / WLED

Control WS2812B and many more types of digital RGB LEDs with an ESP8266 or ESP32 over WiFi!
MIT License
1 stars 0 forks source link

LEDs flash colors when performing a read of the temperature sensor #1

Open pbolduc opened 3 years ago

pbolduc commented 3 years ago

Describe the bug When the temperature sensor is being read, the leds flash random colours.

To Reproduce

  1. Set to solid color
  2. Wait for temperature to be read, default at 20 seconds past each minute 0:20, 1:20, 2:20, etc

Expected behavior Usermod should not impact colors

WLED version

pbolduc commented 3 years ago

Using logic analyzer, it seems when the 1 one sensor is being read, it is messing up the sending of the data. Example below the lights are on blue but when sensor is being read, the WLED colors are being interfered with

image

The static color is color 000038, but when presence signal is being read, it changes to color 380000, color 300038, ...

andyshinn commented 3 years ago

Was the flashing happening on every read for you? I just disabled the temperature usermod and haven't noticed any flickers. But mine were only happening every 5-10 minutes.

pbolduc commented 3 years ago

yes on every reading, like clock work.

pbolduc commented 3 years ago

Demonstration of the problem. https://www.youtube.com/watch?v=F4fBYrZCXz8

pbolduc commented 3 years ago

Feedback from Michael Miller - https://gitter.im/Makuna/NeoPixelBus

@pbolduc More than likely they are not using the bitbang. On ESP (8266 or 32) bitbang just isn't going to work if you use many of the system features, like PWM, WiFi, Bluetooth. It is not a recommended method as mentioned in the Wiki. @pbolduc Further, is the the one wire implementation interrupt based or is it also bitbang? On ESP32 the default method is the RMT (channel 6 or 3) which is mostly async.

strip.CanShow() will return true when it is finished.