BayEOSArduino Library
Functions
Data Line States

Functions for maintaining the proper data line state. More...

Functions

void SDI12::forceHold ()
 Set line state to SDI12_HOLDING. More...
 
void SDI12::forceListen ()
 Set line state to SDI12_LISTENING. More...
 

Detailed Description

Functions for maintaining the proper data line state.

The Arduino is responsible for managing communication with the sensors. Since all the data transfer happens on the same line, the state of the data line is very important.

Per the SDI-12 specification, the voltage ranges for SDI-12 are:

Summarized in a table:

State Interrupts Pin Mode Pin Level
SDI12_DISABLED Pin Disable INPUT
SDI12_ENABLED Pin Disable INPUT
SDI12_HOLDING Pin Disable OUTPUT LOW
SDI12_TRANSMITTING All/Pin Disable OUTPUT VARYING
SDI12_LISTENING All Enable INPUT

Sequencing

Generally, this is acceptable. HOLDING --> TRANSMITTING --> LISTENING --> TRANSMITTING --> LISTENING -->

If you have interference, you should force a hold, using forceHold(); HOLDING --> TRANSMITTING --> LISTENING --> done reading, forceHold(); HOLDING

See also
For a detailed explanation of interrupts see interrupts_page

Function Documentation

◆ forceHold()

void SDI12::forceHold ( )

Set line state to SDI12_HOLDING.

A public function which forces the line into a "holding" state. This is generally unneeded, but for deployments where interference is an issue, it should be used after all expected bytes have been returned from the sensor.

◆ forceListen()

void SDI12::forceListen ( )

Set line state to SDI12_LISTENING.

A public function which forces the line into a "listening" state. This may be needed for implementing a slave-side device, which should relinquish control of the data line when not transmitting.