--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/zTS1a2GxEYs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/57178CCD.9030907%40steinkuehler.net.
For more options, visit https://groups.google.com/d/optout.
| def adc2r_cramps(pin): | |
| V_adc = pin.rawValue | |
| # V_T = 0.0 # Voltage across the thermistor | |
| # R_PU = 2000.0 #Pull-up resistence | |
| # I_PU = 0.0 # Current flowing through the pull-up resistor | |
| # R_T = 0.0 # Resistance of the thermistor | |
| # V_T = V_adc | |
| # No dividing by zero or negative voltages despite what the ADC says! | |
| # Clip to a small positive value | |
| # I_PU = max((1.8 - V_T ) / R_PU, 0.000001) | |
| # R_T = V_T / I_PU | |
| return V_adc |
| def adc2Temp(pin): | |
| if(args.cape_board == 'BeBoPr'): | |
| R = adc2r_bebopr(pin) | |
| elif (args.cape_board == 'CRAMPS'): | |
| R = adc2r_cramps(pin) | |
| else: | |
| print("Invalid -b cape name: %s" % args.cape_board) | |
| print("Valid names are: BeBoPr, CRAMPS") | |
| sys.exit(1) | |
| return round(R) |
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/zTS1a2GxEYs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/57179661.1040607%40steinkuehler.net.