-
I am currently writing code to interface a joystick to my ESP32S3. I am using the method read_uv(), since this method has a better accuracy/linearity and therefore using the joystick is somehow smoother. The disadvantage of this method is that the maximal value that an ADC-channel may deliver varies. I assume that the value is written during calibration. And as far as i tested pins on the same channel deliver the same maximal value.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
This may not work for your ESP32-S3, but there is a library for ESP32 that reads the efuse value: matthias-bs/MicroPython-ADC_Cal: MicroPython ESP32 library for calibrated on-chip ADC conversion. The efuse register base/offset is likely different for the ESP32-S3. For example, a random ESP32 board I found returned a Vref value of 1128 for one channel. Note sure if this is any form of useful value, though. espefuse.py adc_info may have more useful output. (As it's been a long time since a game has asked me to calibrate an analogue joystick, I guess there's an accepted way to handle this. The old way was to ask the user to move the stick to min/max values and collect the output.) |
Beta Was this translation helpful? Give feedback.
-
Thanks for three information. At least it looks promising. I will try it out with my S3 and the respective documentation. All least I have now a starting point. |
Beta Was this translation helpful? Give feedback.
This may not work for your ESP32-S3, but there is a library for ESP32 that reads the efuse value: matthias-bs/MicroPython-ADC_Cal: MicroPython ESP32 library for calibrated on-chip ADC conversion. The efuse register base/offset is likely different for the ESP32-S3.
For example, a random ESP32 board I found returned a Vref value of 1128 for one channel. Note sure if this is any form of useful value, though. espefuse.py adc_info may have more useful output.
(As it's been a long time since a game has asked me to calibrate an analogue joystick, I guess there's an accepted way to handle this. The old way was to ask the user to move the stick to min/max values and collect the output.)