diff --git a/adafruit_ads1x15/ads1x15.py b/adafruit_ads1x15/ads1x15.py index 80f8f0b..7f7ea11 100644 --- a/adafruit_ads1x15/ads1x15.py +++ b/adafruit_ads1x15/ads1x15.py @@ -25,7 +25,10 @@ from busio import I2C from microcontroller import Pin except ImportError: - pass + # define Pin to avoid the error: + # def read(self, pin: Pin, is_differential: bool = False) -> int: + # NameError: name 'Pin' is not defined + Pin = None _ADS1X15_DEFAULT_ADDRESS = const(0x48) _ADS1X15_POINTER_CONVERSION = const(0x00)