anchor.diff:      }
     }
   }
  -String getState (int num)
  -{
  -  var states = ["start","update","stop"];
  -  
  -  return states[num-1];
  +String getState(int num) {
  +  var states = ["start", "update", "stop"];
  +  //print(states[num - 1]);
  +  return states[num - 1];
   }
   
  -String getDirection (Vector3 vector)
  -{
  +String getDirection(Vector3 vector) {
     var direction = "none";
     var isHorizontal = vector.x.abs() > vector.y.abs();
     //Classify as right-left or up-down
  -  if(isHorizontal){
  -      if(vector.x > 0){
  -        direction = "right";
  -      } else {
  -        direction = "left";
  -      }
  +  if (isHorizontal) {
  +    if (vector.x > 0) {
  +      direction = "right";
  +    } else {
  +      direction = "left";
  +    }
     } else { //vertical
  -      if(vector.y > 0){
  -        direction = "up";
  -      } else {
  -        direction = "down";
  -      }                  
  +    if (vector.y > 0) {
  +      direction = "up";
  +    } else {
  +      direction = "down";
  +    }
     }
  -  
  +
     return direction;
   }
   
  -DSNode rootNode;
  -var hands;
  -var gestures;
   
  +DSLink link;
   main() {
  -  var link = new DSLink("leapmotion", host: "rnd.iot-dsa.org");
  -  rootNode = link.createRootNode("Leap Motion");
  -  
  -  hands = rootNode.createChild("hands");
  -  hands.createChild("count", value: 0);
  -  
  -  gestures = rootNode.createChild("gestures");
  -  var swipe = gestures.createChild("swipe");
  -  swipe.createChild("state", value: "none");
  -  swipe.createChild("direction", value: "none");
  -  
  -  
  +  link = new DSLink("leapmotion2", host: "rnd.iot-dsa.org", sendInterval: 1000);
  +
  +
  +  //link.loadNodes();
  +
  +
     //print(rootNode.children);
  -  
  +
     link.connect().then((_) {
       print("Connected.");
       Sample sample = new Sample();
  
positive.code:       }
  
        // Get the hand's sphere radius and palm position
        //print("Hand sphere radius:" + hand.sphereRadius.toString() + " mm, palm position:" + hand.palmPosition.toString());
  
        // Get the hand's normal vector and direction
  
negative.code:     Frame frame = event.frame;
  
      //print("Frame id:" + frame.id.toString() + ", timestamp:" + frame.timestamp.toString() + ", hands:" + frame.hands.length.toString() + ", fingers:" + frame.fingers.length.toString() + ", tools:" + frame.tools.length.toString() + ", gestures:" + frame.gestures().length.toString());
  
      link["/hands/count"].value = Value.of(frame.hands.length);
  
      for (int i = 0; i < frame.hands.length; i++){
        // Get the first hand
        Hand hand = frame.hands[i];
        String handPath = "/hands/hand"+(i+1).toString();
        // Check if the hand has any fingers
        FingerList fingers = hand.fingerList;
        if (fingers.length > 0) {
  