#!/usr/bin/env python # -*- coding: utf-8 -*- # Test program to illustrate ADS1115 class usage import ads1115 if __name__ == "__main__": # Connecting to ADS1115 in Debug mode chip = ads1115.ads1115(debug=True) # Read single ended on port 0 (FSR=6144, SPS=860) chip.ReadSingleEnded() # Read single ended on port 1 (FSR=4096, SPS=128) chip.ReadSingleEnded(port=1, fsr=4096, sps=128) # Read differential between ports 0 and 1 chip.ReadDifferential() # Read differential between ports 0 and 1 (FSR=4096, SPS=64) chip.ReadDifferential(ports='0-1', fsr=4096, sps=64)