I am trying to use your libraries to make a similar project work, but I am having some difficulties. I have quite some experience in python, but this is the first time I am working with sensors and micropython, so maybe you can help (even though this is not an actual Issue in your code on github).
I have an Adafruit HUZZAH32 - ESP32 Feather Board to which I installed micropython (following https://www.rototron.info/raspberry-pi-esp32-micropython-tutorial/ and actually I already made this work with a DHT22 sensor on another ESP32, so I know that this part should be all right, and I have also made use of the MQTT protocol there before, so that part works too), to which I have wired a BME680 using the default scl/22 and sda/23 pins.
which results in an error: "OSError: [Errno 19] ENODEV" on line "sensor = bme680.BME680(i2c_device=i2c_dev)"
One more thing I tried is to see if this setting sees the connected sensor, by
i2c_dev.scan()
[119]
So I think that should be fine, but I have no idea how to progress from here...
I had no issues make this setup work with the DHT22 sensor, but I am pretty stuck with the BME680. I would appreciate any kind of suggestions, as based on my quite extensive google search, there are not many people who have experimented with this setup (or at least nobody have documented it online besides you).
Hi @papics
you will see that I am using a fork of the i2c library by @gkluoe, which was required to get the BME680 working. You can see the discussion here. I recommend reaching out to one of the experts on that thread if you're not able to resolve this issue. Let me know how you get on.
Cheers
Dear Robin,
First of all, nice setup!
I am trying to use your libraries to make a similar project work, but I am having some difficulties. I have quite some experience in python, but this is the first time I am working with sensors and micropython, so maybe you can help (even though this is not an actual Issue in your code on github).
I have an Adafruit HUZZAH32 - ESP32 Feather Board to which I installed micropython (following https://www.rototron.info/raspberry-pi-esp32-micropython-tutorial/ and actually I already made this work with a DHT22 sensor on another ESP32, so I know that this part should be all right, and I have also made use of the MQTT protocol there before, so that part works too), to which I have wired a BME680 using the default scl/22 and sda/23 pins.
Using only
... import bme680 from i2c import I2CAdapter ...
... i2c_dev = I2CAdapter() sensor = bme680.BME680(i2c_device=i2c_dev) ...
my code gives an error: "TypeError: 'scl' argument required" on line "i2c_dev = I2CAdapter()"
So I tried with my basic understanding getting to the bottom of this, and I can get to the next line in the code at least if I do:
i2c_dev = I2CAdapter(scl=machine.Pin(22),sda=machine.Pin(23))
which results in an error: "OSError: [Errno 19] ENODEV" on line "sensor = bme680.BME680(i2c_device=i2c_dev)"
One more thing I tried is to see if this setting sees the connected sensor, by
So I think that should be fine, but I have no idea how to progress from here... I had no issues make this setup work with the DHT22 sensor, but I am pretty stuck with the BME680. I would appreciate any kind of suggestions, as based on my quite extensive google search, there are not many people who have experimented with this setup (or at least nobody have documented it online besides you).
Best regards, Peter