Changes between Version 96 and Version 97 of WikiStart
- Timestamp:
- 2013-11-05 00:09:21 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiStart
v96 v97 73 73 [[RelayActuator|Relay Actuator]] 74 74 75 Relay sketch that can be controlled from Vera using a regular binary light switch device in Vera. 75 Relay example sketch that can be controlled from Vera using a regular binary light switch device in Vera. 76 77 [[RelayNode|Relaying Sensor Node]] 78 79 This is an example of a relaying node. It can be used to extend distance between gateway and your sensors far out in the radio network. Messages can travel multiple relay nodes if necessary. Relay nodes can also be used as an ordinary sensor with its own child devices. 76 80 77 81 [[TimeExample|Fetch Time]] … … 98 102 99 103 // Create a Sensor library instance 100 Sensor sensors(9,10);104 Sensor gw(9,10); 101 105 102 106 void setup() … … 110 114 // deviceType Which (vera) device type to use for this sensor. See Vera.h for all options available. 111 115 // In this example we use a motion sensor 112 vera.sendSensorPresentation(0, S_MOTION);116 gw.sendSensorPresentation(0, S_MOTION); 113 117 } 114 118 … … 116 120 { 117 121 // Send a variable change to vera. In this case for childId 0 set the Tripped value to "1". 118 vera.sendVariable(0, V_TRIPPED, "1");122 gw.sendVariable(0, V_TRIPPED, "1"); 119 123 delay(10000); // Delay 10 seconds 120 124 }