deskwizard / Arduino_DAC_ADC_libraries

MIT License
8 stars 5 forks source link

Newb Confusion - Is the example call of "init()" supposed to be "init(EXT) #2

Open ctc911ctc opened 4 years ago

ctc911ctc commented 4 years ago

In the example below, should the External Voltage initialization be init(EXT)?

Function list init(INT) Initialize the ADC and the I2C bus with internal voltage reference. ( Use one or the other) init(????) Initialize the ADC and the I2C bus with external voltage reference. ( Use one or the other) read(channel, SD|DF) Read the specified ADC channel (0-7) in either single ended (SD) or differential (DF) mode. Reading a channel will return a value between 0-4095

deskwizard commented 4 years ago

Hi, Both would work as the default value for the reference is external, so calling init() leaves it as-is (Set to external).

You can of course use init(EXT) for clarity.

Happy to see that library being used, thanks! We've all been newbs at some point :)