Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reading in differential mode gives absurd -ve values #9

Open
Varun-Dhankhar opened this issue Jul 4, 2022 · 0 comments
Open

Reading in differential mode gives absurd -ve values #9

Varun-Dhankhar opened this issue Jul 4, 2022 · 0 comments

Comments

@Varun-Dhankhar
Copy link

Varun-Dhankhar commented Jul 4, 2022

Hi,
I am trying to read the values in differential mode using the code and library provided by you. But using adc.SetChannel(2,3) for differential values gives me some absurd negative values(like: -175, -291 and sometimes it gives nan). Also when using your adc.readCurrentChannel() gives values as:
16:14:13.076 -> Current Channel: 0 MUX: 1000 ADC Value: inf
16:14:13.076 -> Current Channel: 1 MUX: 11000 ADC Value: inf
16:14:13.076 -> Current Channel: 2 MUX: 101000 ADC Value: inf
16:14:13.123 -> Current Channel: 3 MUX: 111000 ADC Value: inf
16:14:13.123 -> Current Channel: 4 MUX: 1001000 ADC Value: inf
16:14:13.123 -> Current Channel: 5 MUX: 1011000 ADC Value: inf
16:14:13.123 -> Current Channel: 6 MUX: 1101000 ADC Value: inf
16:14:13.123 -> Current Channel: 7 MUX: 1111000 ADC Value: inf
when using single-ended mode, while with adc.readCurrentChannelRaw() and manually converting this i am getting correct values. So can you tell me why I am getting voltage as infinite in single and differential ended using adc.readCurrentChannel() ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant