{
  "format": "evn-blocks",
  "version": 3,
  "title": "ADC: minimal",
  "needs": "the ADC module on I2C port 1, and a voltage of 0 to 3.3 V on A0 (for example a potentiometer between the board's 3.3 V and GND pins, its middle pin on A0); never more than 3.3 V on a pin",
  "description": "Says the voltage on input A0, in volts, five times a second, for ever (stop it with the stop button). The set-up block has the ADC measure all four inputs in turn, so any of A0..A3 can be read; this program reads only A0.",
  "workspace": {
    "blocks": {
      "languageVersion": 0,
      "blocks": [
        {
          "type": "evn_setup_start",
          "x": 30,
          "y": 30,
          "next": {
            "block": {
              "type": "evn_adc_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_adc_voltage",
                          "fields": {
                            "PORT": "1"
                          },
                          "inputs": {
                            "INPUT": {
                              "shadow": {
                                "type": "math_number",
                                "fields": {
                                  "NUM": 0
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "next": {
                      "block": {
                        "type": "evn_wait",
                        "inputs": {
                          "TIME": {
                            "shadow": {
                              "type": "math_number",
                              "fields": {
                                "NUM": 200
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      ]
    }
  }
}
