You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
trying to get 6 sensors on 3 buses ( BME280 allows two addresses on I2C bus)
/code minimized to show problem /
code below not compiled with linker error:
ltrans0.ltrans.o:(.rodata+0x1a): undefined reference to BME280I2C::WriteRegister(unsigned char, unsigned char)' ltrans0.ltrans.o:(.rodata+0x1c): undefined reference to BME280I2C::ReadRegister(unsigned char, unsigned char*, unsigned char)'
collect2.exe: error: ld returned 1 exit status
commenting out any of lines :
SoftwareWire BusI2cX(a, b);
and both Arduino and PIO finishes fompilation flawlessly
Only two instances allowed ? why ?
trying to get 6 sensors on 3 buses ( BME280 allows two addresses on I2C bus)
/code minimized to show problem /
code below not compiled with linker error:
ltrans0.ltrans.o:(.rodata+0x1a): undefined reference to
BME280I2C::WriteRegister(unsigned char, unsigned char)' ltrans0.ltrans.o:(.rodata+0x1c): undefined reference to
BME280I2C::ReadRegister(unsigned char, unsigned char*, unsigned char)'collect2.exe: error: ld returned 1 exit status
commenting out any of lines :
SoftwareWire BusI2cX(a, b);
and both Arduino and PIO finishes fompilation flawlessly
Only two instances allowed ? why ?
/* BME280_I2C_SoftwareWire_Test.ino
https://github.com/finitespace/BME280/branches */
#include <Arduino.h>
#include <BME280I2CSoftwareWire.h>
#include <SoftwareWire.h>
// SoftwareWire softwareWire(SDA, SCK); - define three buses
SoftwareWire BusI2cA(22, 23);
SoftwareWire BusI2cB(24, 25);
SoftwareWire BusI2cC(26, 27);
//BME280I2CSoftwareWire bme(softwareWire); // Default : forced mode, standby time = 1000 ms
// define three instances
BME280I2CSoftwareWire bme1(BusI2cA);
BME280I2CSoftwareWire bme2(BusI2cB);
BME280I2CSoftwareWire bme3(BusI2cC);
//////////////////////////////////////////////////////////////////
void setup() { }
void loop() { delay(500); }
The text was updated successfully, but these errors were encountered: