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

Possibly Incorrect ADC Resolution #22

Closed
wagenet opened this issue Nov 16, 2017 · 3 comments
Closed

Possibly Incorrect ADC Resolution #22

wagenet opened this issue Nov 16, 2017 · 3 comments

Comments

@wagenet
Copy link

wagenet commented Nov 16, 2017

I'm walking through the J5IK guides and on the pentiometer one, I found that scaleTo is too small by a factor of 4. Poking around with logging, I discovered that this is because the raw value is 0-1023, but the sensor resolution is listed as 4096. This means that when we scale, we're only a quarter of what we should be. The resolution comes from the board's RESOLUTION.ADC which is 4096 in this code. Is that an error? or is the bug elsewhere?

@wagenet
Copy link
Author

wagenet commented Nov 16, 2017

To confirm, things work as expected when I change RESOLUTION.ADC:

class FixedTessel extends Tessel {
  get RESOLUTION() {
    return {
      ADC: 1024
    };
  }
}

@rwaldron
Copy link
Owner

Excellent bug!

@rwaldron
Copy link
Owner

tessel-io@1.1.0

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

2 participants