adafruit / Adafruit_ADS1X15

Driver for TI's ADS1015: 12-bit Differential or Single-Ended ADC with PGA and Comparator
Other
298 stars 307 forks source link

Update Adafruit_ADS1X15.cpp #71

Closed tioraulv closed 3 years ago

tioraulv commented 3 years ago

Added parentheses since version 1.1 cause a memory pointer error on esp8266. Adding the parentheses in the way I propose solves the error.

caternuson commented 3 years ago

Is 1.1 the version of the library you are using? The current release is 2.2.0. Make sure you're using the latest version.

Are you getting the error running one of the example sketches from the library? https://github.com/adafruit/Adafruit_ADS1X15/tree/master/examples

tioraulv commented 3 years ago

Yes, effectively using the singleended example you can reproduce the error.

Attached I send two screenshots of the terminal with the error messages. One is the message that is output at 115200 and the other at 9600baud.

If the parenthesis is changed in the way that I propose, the error will no longer appear as it can be seen in the last two screenshots that I attach.

WhatsApp Image 2021-10-27 at 16 47 40 WhatsApp Image 2021-10-27 at 16 46 31 WhatsApp Image 2021-10-27 at 16 42 49 WhatsApp Image 2021-10-27 at 16 39 57

caternuson commented 3 years ago

Just tested the singleended.ino example on a Feather ESP8266 and can not recreate this issue. Runs as expected:

Screenshot from 2021-10-27 14-10-33

Your output looks normal except for a WDT reset. Make sure all your libraries and board support packages are updated to latest.

caternuson commented 3 years ago

Closing for now. If this continues to be an issue, please open a new issue (not a pull request) first so we can try and work on recreating the issue locally.