I added a pm25 module to the stemma QT i2c interface and get the following error (below). Any ideas how to fix this?
# Create library object, use 'slow' 100KHz frequency!
i2c = busio.I2C(board.SCL, board.SDA, frequency=100000)
# Connect to a PM2.5 sensor over I2C
pm25 = PM25_I2C(i2c, reset_pin)
print("Found PM2.5 sensor, reading data...")
====
code.py output:
Traceback (most recent call last):
File "code.py", line 25, in <module>
ValueError: SCL in use
Funhouse problem with PM25 module.
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- davidb21
- Posts: 49
- Joined: Mon Mar 24, 2014 9:13 am
Re: Funhouse problem with PM25 module.
I was able to get the default pm25 code working, but would like an example that uses the funhouse temp and humidity. I used double sided tape to mount the pm25 module.
- tannewt
- Posts: 3298
- Joined: Thu Oct 06, 2016 8:48 pm
Re: Funhouse problem with PM25 module.
Try using `board.I2C()` instead of a separate `busio.I2C`. The board version is a singleton which means it's created once and then shared with anything else that tries to make it. That's not how `busio.I2C` works.
Please be positive and constructive with your questions and comments.