SEN0211 and esp32
Question for your SEN0211 I am looking at usign it with a esp32, looking at you example code other than changing your “// For Arduino Zero, Due, MKR Family, ESP32, etc. 3V3 controllers, change VREF to 3.3” is there anything else that would need to be changed.. Many thanks in advance….
Richard
Since the on-board ADC of the ESP32 is 12bit, while the most of Arduino has the 10bit ADC.
So you need to change the 1024(2^10) into the 4096(2^12) to use the SEN0211 on the ESP32
Please take a look at following picture to modify the code:
After all, SEN0211 is an analog output sensor, but the onboard ADC of ESP32 has a large offset.
So if you encounter a situation where the reading is quite different from the actual reading, it is recommended that you use an external ADC.
external ADC: https://www.dfrobot.com/product-1730.html
Yeez_B