BayEOSArduino Library
|
Functions needed for multiple instances of the SDI12 class. More...
Functions | |
bool | SDI12::setActive () |
Set this instance as the active SDI-12 instance. More... | |
bool | SDI12::isActive () |
Check if this instance is active. More... | |
Functions needed for multiple instances of the SDI12 class.
This library is allows for multiple instances of itself running on the same or different pins. SDI-12 can support up to 62 sensors on a single pin/bus, so it is not necessary to use an instance for each sensor.
Because we are using pin change interrupts there can only be one active object at a time (since this is the only reliable way to determine which pin the interrupt occurred on). The active object is the only object that will respond properly to interrupts. However promoting another instance to Active status does not automatically remove the interrupts on the other pin. For proper behavior it is recommended to use this pattern:
SDI12_HOLDING
.bool SDI12::isActive | ( | ) |
Check if this instance is active.
isActive() is a method for checking if the object is the active object. Returns true if the object is currently the active object, false otherwise.
bool SDI12::setActive | ( | ) |
Set this instance as the active SDI-12 instance.
A method for setting the current object as the active object; returns TRUE if the object was not formerly the active object and now is.