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

Only read positive voltages in adc.c #180

Merged
merged 1 commit into from
Feb 14, 2024
Merged

Only read positive voltages in adc.c #180

merged 1 commit into from
Feb 14, 2024

Conversation

jhbruhn
Copy link
Contributor

@jhbruhn jhbruhn commented Feb 14, 2024

The ADC sometimes responds with negative voltages read on the ADC input due to noise. This can lead to very high illuminance readings at night (4095 << 4 to be exact due to two's complement :) ). This commit caps ADC readings at 0.

The ADC sometimes responds with negative voltages read on the ADC input due to noise. This can lead to very high illuminance readings at night (4095 << 4 to be exact due to two's complement :) ).
This commit caps ADC readings at 0.
@rbaron rbaron merged commit c7aaf5b into rbaron:main Feb 14, 2024
9 of 14 checks passed
@rbaron
Copy link
Owner

rbaron commented Feb 14, 2024

Thanks once again @jhbruhn.

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

Successfully merging this pull request may close these issues.

2 participants