-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adapt for ADC resolution on ESP32 #15
Comments
Good catch, thank goodness I found your post (and your simple solution) in time! Now the Adafruit touchscreen works like a charm on my ESP32! |
@lukasfischer83 @Ryan-obl Hey! I wonder what pins do you use on ESP32 for Xp, Xm, Yp and Ym? It doesn't seem to work for me. |
This edit works, I would refrain from using inputonly pins for xxyy measurements. This led to unusable results in my tests. |
Hey @LeonidKokhnovich , I would use any pins that has any of the ESP32's ADCs on it, which naturally would depend on which board your ESP32 is on. For instance, I'm using the ESP32 DevKitC v4, whose pinout can be found at: Cheers, Ryan |
This was so much helpful. |
I just filed a pull-request to solve that problem |
Arduino board: ESP32
Hi, I just noticed a small bug on ESP32, which has 12bit ADC resolution. The driver works as expected if
analogReadResolution(10);
is called before usinggetPoint()
. Otherwhise, as expected, it does not ;).So maybe you could implement a check on the resolution and change the calculations (1023 is hardcoded in some lines) or simply right-shift the adc results by two if ESP32 is defined.
Cheers, Lukas
The text was updated successfully, but these errors were encountered: