nRF24 / RF24Mesh

OSI Layer 7 Mesh Networking for RF24Network & nrf24L01+ & nrf52x devices
http://nrf24.github.io/RF24Mesh
GNU General Public License v2.0
422 stars 154 forks source link

Conflict with Adafruit SHT31 D #151

Closed shinn5112 closed 5 years ago

shinn5112 commented 5 years ago

I am having an issue with using the API in conjunction with the Adafuit SHT31-D temperature and humidity sensor (https://www.adafruit.com/product/2857)(API: https://github.com/jacobstim/Adafruit_SHT31D). Whenever a call to read the humidity from the sensor is made, it prevents the node making that call from relaying any information from any other node, effectively breaking the mesh. That node is, however, able to still talk to its parent node, the issue only impacts relaying messages from its children. I am not much of a hardware guy, but I tried switching the I2C address of the sensor. This had no effect. The sensor has the ability to get both temperature and humidity data, only the humidity data call causes this issue. Any ideas as to what I can do to fix this or will I just have to replace the sensor?

shinn5112 commented 5 years ago

I forgot to mention my other hardware, I am running this on an Arduino Uno. I am using two ultrasonic sensors as well.

TMRh20 commented 5 years ago

Sounds like a weird issue. I don't really have any suggestions.

Avamander commented 5 years ago

How much space is used by the sketch in RAM and ROM?

shinn5112 commented 5 years ago

Sketch uses 18518 bytes (57%) of program storage space. Maximum is 32256 bytes. Global variables use 1207 bytes (58%) of dynamic memory, leaving 841 bytes for local variables. Maximum is 2048 bytes.

Avamander commented 5 years ago

This could be some weird out-of-bounds write messing up RF24Mesh's data structures. I'd try some other library to read the sensor. Also possibly try to reimplement the humidy reading function using only the wire (i^2c) library.

shinn5112 commented 5 years ago

Okay, I'll look into your suggestions. Thank you!!

igormp commented 5 years ago

After skimming through the library's code, I've found some uses of the delay() function (as seen here and here. This could probably be blocking further code execution since it basically brings the µC to a halt. You could try to modify that and see if it helps in any way.