Changes between Version 96 and Version 97 of WikiStart


Ignore:
Timestamp:
2013-11-05 00:09:21 (10 years ago)
Author:
hek
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiStart

    v96 v97  
    7373[[RelayActuator|Relay Actuator]]   
    7474 
    75 Relay sketch that can be controlled from Vera using a regular binary light switch device in Vera.  
     75Relay example sketch that can be controlled from Vera using a regular binary light switch device in Vera.   
     76 
     77[[RelayNode|Relaying Sensor Node]]   
     78 
     79This 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. 
    7680 
    7781[[TimeExample|Fetch Time]]   
     
    98102 
    99103// Create a Sensor library instance 
    100 Sensor sensors(9,10);  
     104Sensor gw(9,10);  
    101105 
    102106void setup()   
     
    110114  // deviceType   Which (vera) device type to use for this sensor. See Vera.h for all options available.  
    111115  //              In this example we use a motion sensor 
    112   vera.sendSensorPresentation(0, S_MOTION);  
     116  gw.sendSensorPresentation(0, S_MOTION);  
    113117} 
    114118 
     
    116120{      
    117121   // 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"); 
    119123   delay(10000); // Delay 10 seconds 
    120124}