{
  "format": "evn-blocks",
  "version": 3,
  "title": "Compass: minimal",
  "needs": "an EVN compass module on I2C port 2, away from the motors",
  "description": "Prints the compass heading five times a second for ten seconds: turn the robot and watch it change. The calibration stored on the board for the port is used by itself.",
  "workspace": {
    "blocks": {
      "languageVersion": 0,
      "blocks": [
        {
          "type": "evn_setup_start",
          "x": 30,
          "y": 30,
          "next": {
            "block": {
              "type": "evn_compass_setup",
              "fields": {
                "PORT": "2"
              }
            }
          }
        },
        {
          "type": "evn_program_start",
          "x": 30,
          "y": 115,
          "next": {
            "block": {
              "type": "controls_repeat_ext",
              "inputs": {
                "TIMES": {
                  "shadow": {
                    "type": "math_number",
                    "fields": {
                      "NUM": 50
                    }
                  }
                },
                "DO": {
                  "block": {
                    "type": "text_print",
                    "inputs": {
                      "TEXT": {
                        "block": {
                          "type": "evn_compass_heading",
                          "fields": {
                            "PORT": "2"
                          }
                        }
                      }
                    },
                    "next": {
                      "block": {
                        "type": "evn_wait",
                        "inputs": {
                          "TIME": {
                            "shadow": {
                              "type": "math_number",
                              "fields": {
                                "NUM": 200
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      ]
    }
  }
}
