Interface Conventions

By convention, there are two special interfaces that may be optionally included in a driver.

If either or both are included, they must follow the specifications described in this document.


The port interface describes the physical interface that a driver uses on its board to connect to the peripheral it is managing. This interface uses a string type and must have a default value. The value should correspond to the way the port is referenced in software in your driver.

For example, for a GrovePi driver, if the default port to connect to is A0, the default value for the port interface would be GrovePi::A0


The delay interface controls the delay between taking a reading on a given sensor. This interface uses a json type. If it is not defined, then by default the sensor readings will take place once a second for every read only and read/write interface. If it is defined, it must have a default value. This default value is a json string where the keys are the names of each interface in the driver that is a read only or read/write interface and the values are the length of time of the delay between readings. These values should be floats. 1.0, 15.3, etc.

{"range": 16.2, "temperature": 600.0}
Mac Dougherty