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

Analog read is coded as digitalRead() #6

Closed
jpagliaccio opened this issue Jan 10, 2023 · 1 comment · Fixed by #7
Closed

Analog read is coded as digitalRead() #6

jpagliaccio opened this issue Jan 10, 2023 · 1 comment · Fixed by #7

Comments

@jpagliaccio
Copy link
Contributor

Nathan, Nice work.

So question, line number 397 in Camino.cpp was this:
int value = digitalRead(dataArray[0]);
and I was getting only 1 byte values.

I changed it to analogRead:

int value = analogRead(dataArray[0]);
and now I am getting 0-65535 for 0-5V.
That's what you intended right?

I am on a Mega2560.
Thanks. Again, nice work.

@n-wach
Copy link
Owner

n-wach commented Jan 10, 2023

Oops, yeah that's definitely wrong. Thanks for reporting it :)

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 a pull request may close this issue.

2 participants