From 99b027852b145e27b93a7f7fdd3f933d95d01c22 Mon Sep 17 00:00:00 2001 From: Colin Kuebler Date: Fri, 1 Feb 2019 17:33:21 -0500 Subject: [PATCH] Fixed first color command failing; need to wait for chip to power up --- sonoff/xdrv_04_light.ino | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sonoff/xdrv_04_light.ino b/sonoff/xdrv_04_light.ino index 4a6c21389..ba12ac3db 100644 --- a/sonoff/xdrv_04_light.ino +++ b/sonoff/xdrv_04_light.ino @@ -408,7 +408,9 @@ void SM16716_Update(uint8_t duty_r, uint8_t duty_g, uint8_t duty_b) #endif // D_LOG_SM16716 sm16716_enabled = 1; digitalWrite(sm16716_pin_sel, HIGH); - //delayMicroseconds(20); + // in testing I found it takes a minimum of ~380us to wake up the chip + // tested on a Merkury RGBW with an SM726EB + delayMicroseconds(400); SM16716_Init(); } else if (sm16716_enabled && !sm16716_should_enable) {