I have a small ESP32 module, that has some in-built features, like a TFT, and has few available pins for general use.
It has some input only pins (GPIO36 to 39) that are used by buttons soldered in the pcb, and they are all pulled high by 4.7k resistors, in the schematics below:
I won't use these pins as buttons (and I won't press them), and I need to connect the analog output (0-3.3V) of one sensor in one of these inputs and use analogRead() to get the results.
Is is possible to use a pulled high pin to read an analog voltage from a sensor? It just inverts the readings of the output voltages? When the sensor outputs 3.3V the pin will read 0V and when the sensor outputs 0V the pin will read 3.3V?
It's just a matter of inverting the values read in the code? Or anything else?