Closed shalomberm closed 2 years ago
The question is why would you? It's set with an ifdef
macro, so I don't see the point in reducing the ESP32's analog resolution, to save three lines of code.
Throwing away those two bits lowers the ESP's resolution by a whopping 75%... ..and there's really not a good reason to do that.
There is a difference between resolution and accuracy. Unfortunately the ADC is not very accurate on the esp32 in any case. The benefit is that it makes it standard and the user doesn't have to set it in the UI, which admittedly aren't really big deals, but its very trivial to implement so I thought it was worth a shot
The user.. doesn't have to set it. The compiler sets it according to the board type. It add zero complexity for the end user and negligible additional complexity to the codebase
The UI/Driver is designed to be used with other firmwares and softwares other than lucidgloves, that max analog option is unlikely to go away for the foreseeable future.
Oh ok. Makes sense
Why do we have different analog resolutions on the esp and nano? It would be simpler to just set them both to 10 bits with
analogReadResolution(10);
in setup