{
  "format": "evn-blocks",
  "version": 3,
  "title": "Touch pads: minimal",
  "needs": "the touch pads (MPR121) on I2C port 1",
  "description": "Says \"touched!\" each time a finger touches any of the 12 pads, 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_touch_setup",
              "fields": {
                "PORT": "1"
              }
            }
          }
        },
        {
          "type": "evn_program_start",
          "x": 30,
          "y": 115,
          "next": {
            "block": {
              "type": "evn_forever",
              "inputs": {
                "DO": {
                  "block": {
                    "type": "evn_wait_until",
                    "inputs": {
                      "COND": {
                        "block": {
                          "type": "evn_touch_any",
                          "fields": {
                            "PORT": "1"
                          }
                        }
                      }
                    },
                    "next": {
                      "block": {
                        "type": "text_print",
                        "inputs": {
                          "TEXT": {
                            "shadow": {
                              "type": "text",
                              "fields": {
                                "TEXT": "touched!"
                              }
                            }
                          }
                        },
                        "next": {
                          "block": {
                            "type": "controls_whileUntil",
                            "fields": {
                              "MODE": "WHILE"
                            },
                            "inputs": {
                              "BOOL": {
                                "block": {
                                  "type": "evn_touch_any",
                                  "fields": {
                                    "PORT": "1"
                                  }
                                }
                              },
                              "DO": {
                                "block": {
                                  "type": "evn_wait",
                                  "inputs": {
                                    "TIME": {
                                      "shadow": {
                                        "type": "math_number",
                                        "fields": {
                                          "NUM": 10
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      ]
    }
  }
}
