Unfortunately for me i need once again your help.
I tried connecting two potentiometers to the ESP32 board ad wrote a simple code to try to read them and print the values.
The problem is that the output displayed is not what i expect... in fact one of the values is always stuck on the highest value.
I tried swapping the potentiometers and nothing new happens. I also tried to reverse the order of the readings and it works but just for the first reading i do, the other one is stuck as well.
What should i do to solve my problem?
Thanks for your kind attention and sorry for my low english knowledge.
ps. i will attach the code down here.
Code: Select all
from machine import Pin
from machine import ADC
pot1 = ADC(Pin(35))
pot1.atten(ADC.ATTN_11DB)
print(pot1.read())
pot2 = ADC(Pin(32))
pot2.atten(ADC.ATTN_11DB)
print(pot2.read())
"""
OUTPUT:
371 #ok
4095 #not ok
"""