I'm making an LED dimmer using an ESP8266. The intent is to control brightness with PWM that is adjusted by sending UDP strings to it. I noticed something strange when using analogWrite to a pin. The LED only gets brighter on odd numbers. Going from 0 to 1 makes the led come on very dim. An analogWrite 2 makes no difference. 3 makes the led a bit brighter. 4 makes no difference etc. It doesn't matter what I set the analogWriterange to. 1023 or 255, same affect. I've tried a few different 8266s so its not a defective device.
I'm using arduino 1.81. Is this a known bug?