Skip to content

Instantly share code, notes, and snippets.

@zjuhasz
Last active October 26, 2016 08:28
Show Gist options
  • Save zjuhasz/5e00e1fc19ac7f7e99a013c42a51eb03 to your computer and use it in GitHub Desktop.
Save zjuhasz/5e00e1fc19ac7f7e99a013c42a51eb03 to your computer and use it in GitHub Desktop.
def count_to_volts(count, gain, scale=5):
ratio = count / 8388607
gain_divisor = 1 / gain
return ratio * gain_divisor * scale
@zjuhasz
Copy link
Author

zjuhasz commented Oct 26, 2016

This will return a voltage in volts. The count is the value sent over telnet. The scale is set by the plastic jumper on the board (either 5 or 400), more info in the manual.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment