pyupm_dfrorp module¶
-
class
pyupm_dfrorp.
DFRORP
(apin, a_ref=5.0)[source]¶ Bases:
object
API for the DFRobot ORP (Oxidation/Reduction Potential) Sensor.
ID: dfrorp
Name: Analog Oxidation Reduction Potential (ORP) Sensor
Category: liquid
Manufacturer: dfrobot
Connection: ainput
Link:http://www.dfrobot.com/index.php?route=product/product&path=36&product_id=1071#.V8Wywt9ytNJ This library was tested with the DFRobot ORP (Oxidation/Reduction Potential) Sensor.
To calibrate:
Disconnect the sensor probe (but leave the sensor interface board connected). Then run one of the examples while holding down the ‘calibrate’ button on the device. Read the ORP value reported (it should be fairly small).
This value is what you should supply to setCalibrationOffset(). Then reconnect the probe to the interface board and you should be ready to go.
DO NOT press the calibrate button on the interface board while the probe is attached or you can permanently damage the probe.
C++ includes: dfrorp.hpp
-
getNormalized
()[source]¶ float getNormalized()
Get the normalized ADC value from the sensor. update() must have been called prior to calling this function.
The normalized ADC value.
-
getORP
()[source]¶ float getORP()
Get computed ORP (in millivolts) value from the sensor. update() must have been called prior to calling this function.
ORP value in millivolts
-
getVolts
()[source]¶ float getVolts()
Get the measured volts from the sensor. update() must have been called prior to calling this function.
The voltage measurement.
-
setCalibrationOffset
(offset)[source]¶ void setCalibrationOffset(float offset)
Set the calibration offset for the device. This is determined by disconnecting the sensor probe (but leaving the sensor interface board connected). Then run one of the examples while holding down the ‘calibrate’ button on the device. Read the ORP value reported.
This (low) ORP value is what you should supply to this function. Then reconnect the probe to the interface board and you should be ready to go.
DO NOT press the calibrate button on the interface board while the probe is attached or you can permanently damage the probe.
offset: The ORP offset obtained during calibration.
-
setOffset
(offset)[source]¶ void setOffset(float offset)
Set sensor offset. This offset is applied to the return ORP value before scaling. Default is 0.0.
offset: The offset to apply.
-