sawaiz / nau7802

Nuvoton NAU7802 Arduino Library
MIT License
10 stars 5 forks source link

Example code should be fixed for adc.begin #2

Closed woodencase01 closed 7 years ago

woodencase01 commented 7 years ago

First, many thanks for this great library!

I'm not a experienced arduino user, but it seems like the example code doesn't work: adc.begin(2,0); Should be replaced with: adc.begin();

it requires 3 arguments in order to work with SDA and SCL, the chip address should be provided.

sawaiz commented 7 years ago

This was because of a hack I was doing in order to make it work with both a software serial library, the esp wire library, as well as the default wire library.

I fixed the hack I did a while ago, so now it handles the begin function properly depending on what board Arduino is compiling for, and updated the readme appropriately.

Also added more functions in the functions list. Thanks!

smthyderabad commented 5 years ago

Sir, Please send me nau7802 source code header file

sawaiz commented 5 years ago

It's available with the source, here is the link for the current master branch. https://github.com/Sawaiz/nau7802/blob/master/NAU7802.h