BREAKING - analogWriteRange 8-bit default by earlephilhower · Pull Request #7456 · esp8266/Arduino

@earlephilhower

Matching standard Arduino cores, make the default analogWrite() take
values from 0...255.  Users can always use the analogWriteRange() call
to change to a different setup.

Fixes esp8266#2895

@earlephilhower added this to the 3.0.0 milestone

Jul 14, 2020

@earlephilhower

@d-a-v

devyte

@earlephilhower

Add a `analogWriteResolution` which takes a number of bits and sets
the range from 0...(1<<bits)-1

Remove the PWMRANGE define.  It's non-standard and not generally valid
(i.e. it's fixed at 1024 of 256, but the real range varies depending on
what you last set).

@earlephilhower

Also add note about the change and how to fix pre 3.0 applications.

@earlephilhower

@mcspr mcspr mentioned this pull request

Mar 22, 2022

@TD-er TD-er mentioned this pull request

Sep 22, 2023