Closed Zangetsu71 closed 2 years ago
Try changing how you are creating the sensor instance. Don't #def it:
#define Si7021_sensor Adafruit_Si7021()
Use the syntax from the library example instead:
Adafruit_Si7021 sensor = Adafruit_Si7021();
Using above fix, fixes the RAM problem. ty for the fast response.
Arduino board: Arduino Mega
Arduino IDE version (found in Arduino -> About Arduino menu): 1.8.19
List the steps to reproduce the problem below (if possible attach a sketch or a_serre_logger.zip
copy the sketch code in too): LIST REPRO STEPS BELOW [Wire@1.0] [SPI@1.0] [EEPROM@2.0]
[Adafruit_Si7021_Library@1.4.0] / [Adafruit_Si7021_Library@1.5.1]
all other libraries are in the zip file.
Polling the sensor(humidity or temperature) eats 8 bytes of RAM each poll that doesn't get released each loop. This will cause the program to crash in a few minutes (out of RAM)
Using Adafruit version (of the Si7021) 1.4.0 fixes the RAM leak problem, the problem exist with version 1.5.0 and 1.5.1.
code also in zip, as it is unreadable as text here ( brackets don't seem to work very well with my code?)