Last active
October 26, 2016 08:28
-
-
Save zjuhasz/5e00e1fc19ac7f7e99a013c42a51eb03 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def count_to_volts(count, gain, scale=5): | |
ratio = count / 8388607 | |
gain_divisor = 1 / gain | |
return ratio * gain_divisor * scale |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.