This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Bug in the 16-bit PWM implementation in dimming examples

Hi,

Experimental dimming examples contain a 16 bit PWM implementation. I added the Enocean switch functionality to the dimming server example to control the LED on the board with the app as well as with the switch. I was using the 16-bit PWM function to dim the lights by Enocean switch. 

I found a weird bug when I was displaying the light levels while dimming as you can see below:

As you can see, while looping through all the values for light levels, the debugger shows the jump in the values frequently. 

When I tried adding a delay close to 1ms between each value, it is looping through all the values.

Because of these jumps, limits of dimming can't be properly defined. 

Do you guys have any idea on this weird behavior and any solution because adding delay of 1ms while looping through 32000 values I like a lot?

Thank you.

Related