Replies: 4 comments
-
I thought it was something specifically built in by/for @MichaelDvP. Not sure if anyone else uses it at all. |
Beta Was this translation helpful? Give feedback.
-
I've tested a bit with raw reads and attentuation. It gave horrible results, large differences in measured value for the different settings. Seems that adc, reference and attentuator have series spread. Chips from 2018 on have a calibration field, using this it's much better. (see here). I think only changing Making a port selection also is not really needed, the led/dallas settings were to adapt to different boards with builtin led and avoid conflicts with eth, since board-profiles the individual settings are rarly needed. The analog ports are unused and the default pins are free. To have more options maybe we can add other inputs added to sensor values, like reading a digital input, hallsensor, counter or rotary encoder. (if adding hall we need to move adc to io37, since hall uses adc1_0(io36) and adc1_3(io39) internally.) |
Beta Was this translation helpful? Give feedback.
-
Ok, this is good info to keep in this issue for future reference. I suggest keep the latest change and we can close this issue, and pick it up later if needed. I was just curious after reading about the ESP32 latest libs experiencing issues when reading the voltages (espressif/arduino-esp32#5041) |
Beta Was this translation helpful? Give feedback.
-
I did not know the arduino issue, but luckily tested with |
Beta Was this translation helpful? Give feedback.
-
Currently, ADC is either enabled/disabled and hardcoded to GPIO36 (ADC1 CH0) in the code. Should we make this a little nicer, and have the pin become an option for a channel (0 to 7) like with with the LED, Dallas, Button etc..?
Also how about adding some more refinement like setting the attenuation 0, 2.5, 6 or 11 dB.
I don't use this function so can't determine if it's useful for others.
I was looking at esphome and how they did this? https://github.com/esphome/esphome/pull/2024/files
@MichaelDvP ?
Beta Was this translation helpful? Give feedback.
All reactions