{
  "format": "evn-blocks",
  "version": 1,
  "needs": "the colour sensor on I2C port 1, and a white and a darker surface.",
  "workspace": {
    "blocks": {
      "languageVersion": 0,
      "blocks": [
        {
          "type": "evn_colorsensor_setup",
          "id": "JY^!nYD8@*l;CIq8izul",
          "x": 20,
          "y": 20,
          "fields": {
            "PORT": "1"
          }
        },
        {
          "type": "evn_forever",
          "id": "j6ny%|v7F0!zQ2COwE{(",
          "x": 20,
          "y": 85,
          "inputs": {
            "DO": {
              "block": {
                "type": "controls_if",
                "id": "a7d*MmT!d%,F,l;X@5FS",
                "extraState": {
                  "hasElse": true
                },
                "inputs": {
                  "IF0": {
                    "block": {
                      "type": "evn_colorsensor_sees",
                      "id": "|:W4mFxRX,zJk^0g-t1Z",
                      "fields": {
                        "PORT": "1",
                        "COLOR": "WHITE"
                      }
                    }
                  },
                  "DO0": {
                    "block": {
                      "type": "evn_led",
                      "id": "rqm7RI|s3R(:1P-L$[|]",
                      "fields": {
                        "ACTION": "off"
                      }
                    }
                  },
                  "ELSE": {
                    "block": {
                      "type": "evn_led",
                      "id": "s,Gf,f%Ep($Tq7AZn8o3",
                      "fields": {
                        "ACTION": "on"
                      }
                    }
                  }
                },
                "next": {
                  "block": {
                    "type": "text_print",
                    "id": "aPPo/4t:e.@v=(4):b9D",
                    "inputs": {
                      "TEXT": {
                        "block": {
                          "type": "text_join",
                          "id": "E~hIVy9XQN8FJV`w*-.h",
                          "extraState": {
                            "itemCount": 2
                          },
                          "inputs": {
                            "ADD0": {
                              "shadow": {
                                "type": "text",
                                "id": "5/hY_;h;:prgoDKpt[EQ",
                                "fields": {
                                  "TEXT": "reflection: "
                                }
                              }
                            },
                            "ADD1": {
                              "block": {
                                "type": "evn_colorsensor_ambient",
                                "id": "A,L`tQiy[{6[if4b`W;$",
                                "fields": {
                                  "PORT": "1"
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "next": {
                      "block": {
                        "type": "evn_wait",
                        "id": "EJ^pIoRT*Ej=O(dZ.F?w",
                        "inputs": {
                          "TIME": {
                            "shadow": {
                              "type": "math_number",
                              "id": "),?[r)nYt`W)tYguPfls",
                              "fields": {
                                "NUM": 100
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      ]
    }
  }
}
