Hi @Kerry! I'm tinkering with rev 2.1 of digital attenuator board here and last available controller code from 2017. I'm using 100k pot here, and readings from pot are very strange. At full travel it only reads about 3.3V and is reading only last 10% of pot travel. When you go below 90% of travel analogread returns 0. Pot is OK, I've tested it another sketch with bare code for pot readings and it reads just fine whole pot travel:
Analog Reading: 0, Voltage =0.00v, Resistance=0.00 ohms, Percentage: 0%
Analog Reading: 1, Voltage =0.00v, Resistance=97.75 ohms, Percentage: 0%
Analog Reading: 13, Voltage =0.06v, Resistance=1270.77 ohms, Percentage: 1%
Analog Reading: 56, Voltage =0.27v, Resistance=5474.10 ohms, Percentage: 5%
Analog Reading: 194, Voltage =0.95v, Resistance=18963.83 ohms, Percentage: 18%
Analog Reading: 295, Voltage =1.44v, Resistance=28836.76 ohms, Percentage: 28%
Analog Reading: 624, Voltage =3.05v, Resistance=60997.07 ohms, Percentage: 60%
Analog Reading: 775, Voltage =3.79v, Resistance=75757.58 ohms, Percentage: 75%
Analog Reading: 979, Voltage =4.78v, Resistance=95698.93 ohms, Percentage: 95%
Analog Reading: 1019, Voltage =4.98v, Resistance=99609.00 ohms, Percentage: 99%
Analog Reading: 1023, Voltage =5.00v, Resistance=100000.00 ohms, Percentage: 100%
Analog Reading: 1023, Voltage =5.00v, Resistance=100000.00 ohms, Percentage: 100%
Can you post updated code please? Or give me a hint where to look for this catch?
Thank you very much!
Kind regards,
Milan