pycom / pycom-micropython-sigfox

A fork of MicroPython with the ESP32 port customized to run on Pycom's IoT multi-network modules.
MIT License
197 stars 167 forks source link

RGB LED fails on fast calls #510

Closed robert-hh closed 2 years ago

robert-hh commented 3 years ago

When the RGB led is set using e.g. the method pycom.rgbled() twice or more with a time less than ~100µs between calls, all but the first call may be ignored. Looking at the timing diagram of one LoPy4 unit here, the RGB LED needs at least 150µs low level on Din between calls to work reliably. Assuming that the LED is of type WS2812B, a scan through various samples of the data sheet reveals a reset time of 50 to 280 µs. The more recent datasheets show 280µs. As a suitable fix, PR #509 ensures a reset (guard) time of at least 280µs.