adafruit-circuitpython

(Adafruit_Python_DHT - Raspberry Pi) in get_platform RuntimeError: Unknown platform

一个人想着一个人 提交于 2021-02-11 12:44:35
问题 I have a Raspberry Pi 4 connected with a DHT22 sensor, and I want to read data from my sensor. So I installed the library Adafruit_DHT sudo pip3 install Adafruit_DHT then, I navigate to the directory Adafruit_Python_DHT/examples/ , and then, since I have a DHT 22 sensor connected to GPIO pi n° 4 , I run python AdafruitDHT.py 22 4 and I get (lab_app) root@Raspberry100:/var/www/lab_app/Adafruit_Python_DHT/examples# python AdafruitDHT.py 2302 4 Traceback (most recent call last): File

How to pass I2C addresses to Adafruit CircuitPython code? (Running ADS1115)

梦想的初衷 提交于 2021-01-28 11:42:42
问题 I'm trying to run two Adafruit ADS1115s off of one Raspberry Pi, using two I2C addresses (0x48, 0x49). The address for each device can be set by tying the ADDR pin high (0x49) or leaving it floating (default, 0x48). I've confirmed that each board works when the address is set to 0x48, and running "i2cdetect 1" confirms that both boards are connected at the correct addresses. I can successfully run this sample code My question is this: How do I get the code to read from I2C address 0x49