{
  "format": "evn-blocks",
  "version": 1,
  "needs": "the OLED display on I2C port 1 and the IMU on I2C port 2; tilt the board by hand.",
  "workspace": {
    "blocks": {
      "languageVersion": 0,
      "blocks": [
        {
          "type": "evn_display_setup",
          "id": "s-5:3I7[GSWJ46k0i@Vz",
          "x": 20,
          "y": 20,
          "fields": {
            "PORT": "1",
            "MIRROR": false
          }
        },
        {
          "type": "evn_imu_setup",
          "id": "cb2O!J^yuxQs7cSKys/j",
          "x": 20,
          "y": 87,
          "fields": {
            "PORT": "2"
          }
        },
        {
          "type": "evn_forever",
          "id": "?xHEOQ-3;.ia:u@Y)d!-",
          "x": 20,
          "y": 151,
          "inputs": {
            "DO": {
              "block": {
                "type": "evn_display_clear",
                "id": "Z83*q$sT0l0A,GO*tMQD",
                "fields": {
                  "PORT": "1"
                },
                "next": {
                  "block": {
                    "type": "evn_display_text",
                    "id": "BrVlXSl;Lu7e[!EmE!b2",
                    "fields": {
                      "PORT": "1"
                    },
                    "inputs": {
                      "TEXT": {
                        "block": {
                          "type": "text_join",
                          "id": "?l,RTLA{zZR}xs(tsUIx",
                          "extraState": {
                            "itemCount": 2
                          },
                          "inputs": {
                            "ADD0": {
                              "shadow": {
                                "type": "text",
                                "id": "^u[Yg}qC_zPEv#DVgImC",
                                "fields": {
                                  "TEXT": "pitch "
                                }
                              }
                            },
                            "ADD1": {
                              "block": {
                                "type": "evn_imu_angle",
                                "id": "L@N/M%_%!^?K9.*Jof30",
                                "fields": {
                                  "PORT": "2",
                                  "WHAT": "tilt()[0]"
                                }
                              }
                            }
                          }
                        }
                      },
                      "COL": {
                        "shadow": {
                          "type": "math_number",
                          "id": "8L;EM6nz)w~Z2u?RR~#a",
                          "fields": {
                            "NUM": 0
                          }
                        }
                      },
                      "ROW": {
                        "shadow": {
                          "type": "math_number",
                          "id": "If}-x@~*@l{9U^u?%w+,",
                          "fields": {
                            "NUM": 0
                          }
                        }
                      }
                    },
                    "next": {
                      "block": {
                        "type": "evn_display_text",
                        "id": "Oa;}:EaIQNlC8z:R8dLH",
                        "fields": {
                          "PORT": "1"
                        },
                        "inputs": {
                          "TEXT": {
                            "block": {
                              "type": "text_join",
                              "id": "t-2JwgWw?mLiDi1CoTp:",
                              "extraState": {
                                "itemCount": 2
                              },
                              "inputs": {
                                "ADD0": {
                                  "shadow": {
                                    "type": "text",
                                    "id": "x720$[MyK;$x?`py#Y=~",
                                    "fields": {
                                      "TEXT": "roll  "
                                    }
                                  }
                                },
                                "ADD1": {
                                  "block": {
                                    "type": "evn_imu_angle",
                                    "id": "3V3%9dljx]%R_6[1|3(V",
                                    "fields": {
                                      "PORT": "2",
                                      "WHAT": "tilt()[1]"
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "COL": {
                            "shadow": {
                              "type": "math_number",
                              "id": "^rG}~@$z=+|cCWqhbRXW",
                              "fields": {
                                "NUM": 0
                              }
                            }
                          },
                          "ROW": {
                            "shadow": {
                              "type": "math_number",
                              "id": "5s,Vr]cGfPtC8;LKH*g1",
                              "fields": {
                                "NUM": 1
                              }
                            }
                          }
                        },
                        "next": {
                          "block": {
                            "type": "controls_if",
                            "id": "c]Dp4Q|5//mU;TdMG4m=",
                            "inputs": {
                              "IF0": {
                                "block": {
                                  "type": "evn_imu_up",
                                  "id": "#T`*oJ4y4U^9:#o6(8qg",
                                  "fields": {
                                    "PORT": "2",
                                    "SIDE": "TOP"
                                  }
                                }
                              },
                              "DO0": {
                                "block": {
                                  "type": "evn_display_text",
                                  "id": "`mAc:7iq$xGHT,?u2HH(",
                                  "fields": {
                                    "PORT": "1"
                                  },
                                  "inputs": {
                                    "TEXT": {
                                      "shadow": {
                                        "type": "text",
                                        "id": "d1J7%}y|FkfC^+sm3+;0",
                                        "fields": {
                                          "TEXT": "level!"
                                        }
                                      }
                                    },
                                    "COL": {
                                      "shadow": {
                                        "type": "math_number",
                                        "id": "d0F06]}K-RVxh6/Nw6##",
                                        "fields": {
                                          "NUM": 0
                                        }
                                      }
                                    },
                                    "ROW": {
                                      "shadow": {
                                        "type": "math_number",
                                        "id": "uDm./=%Tw4)rl!2-zD]/",
                                        "fields": {
                                          "NUM": 3
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "next": {
                              "block": {
                                "type": "evn_wait",
                                "id": "IAu!q)tL{jW~Is8HAXL2",
                                "inputs": {
                                  "TIME": {
                                    "shadow": {
                                      "type": "math_number",
                                      "id": "f{iHC9hyb!V;#76xVYae",
                                      "fields": {
                                        "NUM": 200
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      ]
    }
  }
}
