first off I’d like to thank everybody that made balena sense possible.
Its a great tool and saved me a lot of time. <3
I’m using a Raspberry Pi Zero 2 with a SparkFun Qwiic HAT to which I added three Adafruit Sensirion SHTC3. I know these are not supported, so I have three Adafruit BME280 on my shopping list. I already set up everything, and it works fine, except of the sensors of course.
Im using this setup to monitor the temperature and humidity in a cigar cabinet.
How can I make three BME280s work, regarding their L2C addresses?
I know two can work if you leave out one of the sensor cables from the second BME280, causing it to change the address to 0x76, but what about a third sensor?
I found a forum post on here from may 21 stating this could be changed in sensors.py, but after the update to V2 this is no longer the case, right?
And regarding the previous question: Is it possible to add the driver for the Adafruit SHTC3?
As far as I understand, the drivers hostet on GitHub should make it possible. But how do I add them?
I haven’t used balenaSense yet, so I can’t comment (yet) on how to specify which drivers/devices can be used.
Regarding the I2C addressing: the device uses a 7-bit address, 6 of these are fixed and one bit is controlled by a pin. As a single bit can only be set to 0 or 1, you cannot setup a third board with a unique address.
You might however be able to get these boards to work with the SPI interface instead of I2C.
In that case, you won’t be using the I2C addresses anymore, but every board will get its own Chip Select line. Only the board with an active Chip Select will be reading and writing from/to the SPI interface.
There’s nothing really stopping you from using 20 wires to use 20 boards this way.
Looking at the schematic of one of those boards, Qwiic only forwards SDA (serial data), SCL (serial clock) and Power (+3.3V, GND).
So the daisy-chaining is purely for the I2C bus and power.
Addresses are configured separately from the Qwiic connector, in this example through a jumper (JP2) or the other (6-pin) connector J3.
I will look into Balena Sense this weekend to see if I can find out more, but it sounds like you’re out of luck when it comes to using more than 2 of these specific modules per I2C bus.
The only way to get more, would be to add another I2C bus, for example by using a bitbang driver with GPIO pins.
Regarding the Multiplexer, you can hook up a I2C bus to the input (SDA/SCL) and up to 8 to the output (SC0-7/SD0-7).
You can then select which output to connect to your input, by setting the inputs A0-2 (000 connects SC0/SD0, 111 connects SC7/SD7).
Note that the sensor block will simply scan and use the single input bus, so you would need to make some pretty hefty changes for it to work with this.
Hello, just jumping in here - without modifying the sensor block, you can only connect two BME280 sensors at one time. The easiest way to add a third sensor would be to add a supported one that uses a different address such as the HTU21 or the (untested) HDC1000. Another option would be to use an additional Pi Zero/Zero 2 and feed its data into your balenaSense instance via MQTT. Since the sensor block uses sensor drivers built into the kernel, adding new sensors is not straightforward.
Regarding the SparkFun 20x4 SerLCD, it would not work natively with Grafana. You could write a small amount of python code to display values directly from the sensor block, but graphing on the LCD would be very complex.