|
Post by Clay Jackson on Jul 6, 2017 21:11:40 GMT -8
Trying to read the Air Quality sensor using the python code - SDA/SCL and 3V/Ground connected from Pi 3 through I2C hub to ADC, LED on ADC is lit, then ADC connected via Grove cable to sensor. When I run testAirQualitySensor.py, I get: Traceback (most recent call last): File "testAirQualitySensor.py", line 22, in <module> ads1115 = ADS1x15(ic=ADS1115) File "/root/SDL_Pi_AirQualitySensor/MADS1x15.py", line 137, in __init__ self.i2c = Adafruit_I2C(address) File "/root/SDL_Pi_AirQualitySensor/Adafruit_I2C.py", line 43, in __init__ self.bus = smbus.SMBus(busnum if busnum >= 0 else Adafruit_I2C.getPiI2CBusNumber()) IOError: [Errno 2] No such file or directory What am I missing? Thanks! Clay Jackson [email protected]
|
|
n7qnm
Junior Member

Posts: 80
|
Post by n7qnm on Jul 7, 2017 11:49:55 GMT -8
Solved my own problem :-)
Just needed to "turn on" I2C and SPI using raspi-config
D'oh!
|
|
|
Post by SDL on Jul 7, 2017 11:55:09 GMT -8
Always the simplest answer is best!
BP
|
|