Issue with sensor readings

Hi,

I'm facing few issues in reading and sending sensors data (BME680) thru LoRa. I tested the sensor and it's working well with same config (pins setup) but as soon as I try to read sensor data to send them to my lora server, it shows only zeros.
Appreciate any help on what's wrong with the code.
I'm using Arduino Nano and RFM95W with BME680 IAQ sensor.

Thank you in advance.

DataOutput.txt (816 Bytes)

LoRaWAN_TTN_Env_BME680Node-v1.ino (17.4 KB)

I'm not good at code but troubleshooting for me is different.

When I have a similar issue, I would:

  1. Debug out the sensor raw values to see if the sensor is actually being read.

  2. Force constant values for the sensor, to test if you can send what would have been the sensed value thru the LowRa.

Thx but I tested the sensor alone and it's working well.
Looks like there's some conflicts between the LoRa code and the sensor code but can't detect it :frowning:

Have you anything to test sending any data over LoRa to check it gets through.

Before combining two bits of functionality test each individually. Way easier to get complex systems
working that way.

Please post code in code tags so we can see it easily.

Thx Mark.
The LoRa RFM95W is working fine and sends data but the sensor readings are all zeros :frowning:
I'm suspecting a power issue since the RFM95W and the BME680 modules are connected to the same Nano 3.3V (I'll try to power separately the BME680).
Here attached the code (can't insert it here as >9000 char :slight_smile:

DataOutput.txt (816 Bytes)

LoRaWAN_TTN_Env_BME680Node-v1.ino (15.9 KB)

Finally, I figured out the issue :slight_smile:
I also worked on optimizing the code and it's working fine now :smiley: