{
  "format": "evn-blocks",
  "version": 3,
  "title": "Gesture sensor: minimal",
  "needs": "the gesture sensor on I2C port 1, and a hand to swipe a few cm above it",
  "description": "Waits for a hand to swipe over the sensor and says which way it went: 'up', 'down', 'left' or 'right' (None when no swipe comes within 5 s). Runs for ever; stop it with the stop button.",
  "workspace": {
    "blocks": {
      "languageVersion": 0,
      "blocks": [
        {
          "type": "evn_setup_start",
          "x": 30,
          "y": 30,
          "next": {
            "block": {
              "type": "evn_gesture_setup",
              "fields": {
                "PORT": "1"
              }
            }
          }
        },
        {
          "type": "evn_program_start",
          "x": 30,
          "y": 115,
          "next": {
            "block": {
              "type": "evn_forever",
              "inputs": {
                "DO": {
                  "block": {
                    "type": "text_print",
                    "inputs": {
                      "TEXT": {
                        "block": {
                          "type": "evn_gesture_wait",
                          "fields": {
                            "PORT": "1"
                          },
                          "inputs": {
                            "TIMEOUT": {
                              "shadow": {
                                "type": "math_number",
                                "fields": {
                                  "NUM": 5000
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      ]
    }
  }
}
