Example LoRaWan OnBoard Air530 with I2C-Sensor (broken I2C))

Hello,

i want to read the temperature from I2C-Sensor STS35.

In a “normal” arduino-loop i can read continuisly the temperature, here the code:

Wire.begin();

  • Wire.beginTransmission(STS35_I2C_ADDRESS);*
  • Wire.write(0x24); *
  • Wire.write(0x00); *
  • Wire.endTransmission(true); // send cmd*

i=0;

  • Wire.requestFrom(STS35_I2C_ADDRESS, 3,true); // get temperature *

*while (Wire.available()) { *

  • buf[i++]= Wire.read(); // receive a byte*
  • }*

When i put the code in the example LoRaWan OnBoard Air530 in the function: prepareTxFrame( uint8_t port )

the first call returns a valid value!

After the first call always the same value appears as if the same values are always read out from the I2C buffer! (possible caused by lorawan sleep?)

Reset of I2C-ship and power down and power on the chip between two calls doesnt work!

Can i reset the intern I2C-hardware of the board?

greeting

E_T

After several attempts, i found the problem. If all OLED commands are commented out in the functionprepareTxFrame( uint8_t port ), then the I2C sensor works.

Is there mutual influence between the oled-display and the I2C-communication?

Greetings

E_T