Sensor nodes can now report their sketch name and version to the gateway for informational purposes. Added class methods sendSketchName(), sendSketchVersion() and sendSketchInfo() that invokes the aforementioned as a convenience method. Sensor nodes report their sketch information to the gateway by calling sendSketchInfo(const char *name, const char *version) in the Arduino sketch setup() method after initializing the radio by invoking the Sensor::begin() method.
This commit is contained in:
@@ -22,6 +22,9 @@ void setup()
|
||||
gw.begin();
|
||||
dht.setup(HUMIDITY_SENSOR_DIGITAL_PIN);
|
||||
|
||||
// Send the Sketch Version Information to the Gateway
|
||||
gw.sendSketchInfo("Humidity", "1.0")
|
||||
|
||||
// Register all sensors to gw (they will be created as child devices)
|
||||
gw.sendSensorPresentation(CHILD_ID_HUM, S_HUM);
|
||||
gw.sendSensorPresentation(CHILD_ID_TEMP, S_TEMP);
|
||||
|
||||
Reference in New Issue
Block a user