SDI-12 is a common single-wire data protocol in environmental sensors. The details of the communication are managed by the Arduino SDI-12 library. In short, data is transferred between a master and a slave on a single wire at 1200 baud. The number of possible SDI-12 commands is fairly limited, focused only on taking measurements and collecting data. The voltage range for the data communication and the sensors wake and sleep timings are also limited by the protocol.
The SDI-12 protocol specifies that all new devices should come from the manufacturer with a pre-programmed address of "0". For Meter brand sensors, you must change the sensor address before you can begin to use it. For other sensors, the address may be left at 0 if you are only using a single sensor. If you want to use more than one SDI-12 sensor, you must ensure that each sensor has a different address. To find or change the SDI-12 address of your sensor, load and run the sdi12_
Keep in mind that SDI12 is a slow communication protocol (only 1200 baud) and ALL interrupts are turned off during communication. This means that if you have any interrupt driven sensors (like a tipping bucket) attached with an SDI12 sensor, no interrupts (or tips) will be registered during SDI12 communication.
- Instructs all SDI-12 sensors to take non-concurrent measurements
- After starting a measurement on an SDI-12 sensor, the processor will stop everything, waiting for that measurement to complete before moving on to the next sensor.
- This may be necessary if your sensor uses a version of the SDI-12 protocol prior to 1.2 or if your sensor is not properly compliant with the protocol.