![]() Instance bme280_0 before each function to address the first sensor. We are basically using threeįunctions to read values for temperature (function readTempC), humidity ( readHumidity) and pressure ( readPressure). ![]() First of all, we start with the tcaselect(0) function. So it first communicates through pins SD0 and SC0, then through pins SD1 and SC1, all the way up to pins ![]() Through this function, we can tell the multiplexer to toggle between its eight channels and use the I2C protocol to communicate to any deviceĬonnected to it. ![]() Your Arduino will be seeing only this address on the I2C bus. If the pins A0, A1 and A2 from the multiplexerīoard are left unconnected, then we are using the 0x70 address. Now we define the I2C address for the multiplexer using the variable TCAADDR. The importance of these instances will be clear down below.īlueDot_BME280 bme280_0 BlueDot_BME280 bme280_1 BlueDot_BME280 bme280_2 BlueDot_BME280 bme280_3 In this case we are connecting four BME280 sensors, so we create four different instances ( bme280_0, bme280_1,īme280_2 and bme280_3). At the very beginning of our sketch, we include the Wire library to use the I2C protocol and the BlueDot BME280 library.
0 Comments
Leave a Reply. |