RobTillaart / ADS1X15

Arduino library for ADS1015 = I2C 12 bit ADC and ADS1115 = I2C 16 bit ADC
MIT License
155 stars 29 forks source link

Not working with Nano Every #36

Closed 80stech closed 2 years ago

80stech commented 2 years ago

Hi, this looks like a really good library :) but I can't get anything to compile for the Nano Every. AVR dude seems to have problems with the get clock (what you have listed as a prototype) and set clock functions and a few other things I think related to setting clocks for the I2C bus. I tried to copy the error messages but I not able to. Is there maybe something I can change in the header file to get it working? Thanks! :) Rainer S.

RobTillaart commented 2 years ago

Thanks for reporting the issue. I am not familiar with the Nano Every. The getClock is indeed experimental as it is not a standard implement feature on all boards. Tomorrow I will do a first investigation (here it is 3.30 AM now) if time permits. Otherwise it will be Saturday. Do you have a link to the board?

RobTillaart commented 2 years ago

Found the board, so link is not needed.

80stech commented 2 years ago

OK, Thanks for looking into this! :)

Cheers, Rainer S.

On Thu, 20 Jan 2022 18:36:51 -0800, Rob Tillaart @.***> wrote:    

Found the board, so link is not needed.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>

RobTillaart commented 2 years ago

1) TWBR => this is an Arduino UNO low level I2C register. I understand this issue, 2) _wire->requestFrom(address, (uint8_t) 2); error => casting error, also understood

Both seems easy fixable however I do not want to introduce a problem for the existing platforms. I will create a develop branch in which this I try to solve the issue. Can you do some testing with the real hardware?

RobTillaart commented 2 years ago

Problem 1 is related to this issue - https://github.com/arduino/Arduino/issues/11457

relevant defines: -DARDUINO_ARCH_MEGAAVR -DAVR_NANO_4809_328MODE ? (latter is specific for the NANO EVERY I assume)

RobTillaart commented 2 years ago

Please verify if develop branch works for you - https://github.com/RobTillaart/ADS1X15/tree/develop

It compiles and I did not found regression of other platforms.

80stech commented 2 years ago

Sorry I just woke up and I have a dentist appointment this morning, but I'll try this out ASAP! :)  

On Fri, 21 Jan 2022 05:43:48 -0800, Rob Tillaart @.***> wrote:    

Please verify if develop branch works for you - https://github.com/RobTillaart/ADS1X15/tree/develop

It compiles and I did not found regression of other platforms.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>

RobTillaart commented 2 years ago

No problem, take your time Good luck at the dentist.

80stech commented 2 years ago

I tested both minimum and performance sketches with ADS1015 and Nano Every and all is good! :) Thank-you very much :) Cheers, Rainer S.

RobTillaart commented 2 years ago

Good to hear, I will merge and create a new release

RobTillaart commented 2 years ago

Released 0.3.5 !