changeset 2:76f179137378

Different deafult address for ads1115
author Radomir Dopieralski <sheep-devel@sheep.art.pl>
date Mon, 22 Aug 2016 13:15:58 +0200
parents f8eb9303a761
children 74f71bc80641
files ads1x15.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ads1x15.py	Mon Aug 22 10:36:02 2016 +0200
+++ b/ads1x15.py	Mon Aug 22 13:15:58 2016 +0200
@@ -80,7 +80,7 @@
 
 
 class ADS1115:
-    def __init__(self, i2c, address=0x48):
+    def __init__(self, i2c, address=0x49):
         self.i2c = i2c
         self.address = address
         self.gain = 0 # 2/3 6.144V
@@ -124,6 +124,9 @@
 
 
 class ADS1015(ADS1115):
+    def __init__(self, i2c, address=0x48):
+        return super().__init__(i2c, address)
+
     def read(self, channel):
         return super().read(channel) >> 4