Raspberry Pi practice problem · I²C, SPI, UART & 1-Wire
Sixteen bits
EasyBudget $11Python · gpiozero
The ADS1115 is a precise 16-bit ADC on the I²C bus (address 0x48 with its ADDR pin to GND).
Build: a potentiometer between 3V3 and GND with its wiper on A0 of an ADS1115. The ADS1115 is powered from 3V3, on the I²C pins, ADDR to GND.
Program: every 0.5 s print the voltage on A0 with three decimals:
A0: 0.825 V
The test sets the knob to 25 % (0.825 V), then 60 % (1.980 V) at 2 s.
Tip: the Adafruit driver is installed: ADS1115(board.I2C()) and AnalogIn(ads, ads1x15.Pin.A0).voltage.