{
  "appVersion": "0.10.0",
  "savedAt": "2026-09-29T08:29:32.090Z",
  "workspace": {
    "blocks": {
      "languageVersion": 0,
      "blocks": [
        {
          "type": "controls_whileUntil",
          "id": "P$cKAbgCc:L;[hvRP0_?",
          "x": 228,
          "y": 276,
          "fields": {
            "MODE": "WHILE"
          },
          "inputs": {
            "BOOL": {
              "block": {
                "type": "logic_boolean",
                "id": "-atz%e]6upg@h`Dt?EhE",
                "fields": {
                  "BOOL": "TRUE"
                }
              }
            },
            "DO": {
              "block": {
                "type": "apm_mini_rpm",
                "id": "ZOqQ@mjy`8AL~$.ko?EN",
                "inputs": {
                  "LEFT": {
                    "shadow": {
                      "type": "math_number",
                      "id": "Pt!-QQ//Xq:d`0icPZb$",
                      "fields": {
                        "NUM": 50
                      }
                    }
                  },
                  "RIGHT": {
                    "shadow": {
                      "type": "math_number",
                      "id": "qba7[#C@7Pac/?LQb=s-",
                      "fields": {
                        "NUM": 50
                      }
                    }
                  }
                },
                "next": {
                  "block": {
                    "type": "controls_if",
                    "id": "By+-ji@;n~nK/1iJRaX=",
                    "inputs": {
                      "IF0": {
                        "block": {
                          "type": "logic_compare",
                          "id": "Udc=}c#6jPZ|w9Zw;O6[",
                          "fields": {
                            "OP": "LT"
                          },
                          "inputs": {
                            "A": {
                              "block": {
                                "type": "apm_mini_sensor",
                                "id": ".D1zqAIT}IiuO(:M#jzB",
                                "fields": {
                                  "CH": "3"
                                }
                              }
                            },
                            "B": {
                              "block": {
                                "type": "math_number",
                                "id": "kX%h8tS]j?o{jUH!j)@j",
                                "icons": {
                                  "comment": {
                                    "text": "根据实际情况调整",
                                    "pinned": false,
                                    "height": 80,
                                    "width": 161.86669921875
                                  }
                                },
                                "fields": {
                                  "NUM": 40
                                }
                              }
                            }
                          }
                        }
                      },
                      "DO0": {
                        "block": {
                          "type": "apm_mini_rpm",
                          "id": "9znmMoGYCKp+aP|Wt1a.",
                          "inputs": {
                            "LEFT": {
                              "shadow": {
                                "type": "math_number",
                                "id": "Zb/.w3$RjZvLd_ZE;q]P",
                                "fields": {
                                  "NUM": -100
                                }
                              }
                            },
                            "RIGHT": {
                              "shadow": {
                                "type": "math_number",
                                "id": "]AB]KTjjYM~L@oD+D%VB",
                                "fields": {
                                  "NUM": -100
                                }
                              }
                            }
                          },
                          "next": {
                            "block": {
                              "type": "apm_mini_wait",
                              "id": "{hB+(U`Zd-;h29SjX)!^",
                              "inputs": {
                                "MS": {
                                  "shadow": {
                                    "type": "math_number",
                                    "id": "TySCtYx{7e*=o%IO)XWo",
                                    "fields": {
                                      "NUM": 1000
                                    }
                                  }
                                }
                              },
                              "next": {
                                "block": {
                                  "type": "apm_mini_stop",
                                  "id": "}:XujXmk8b!GSmYqSN$/",
                                  "fields": {
                                    "MOTOR": "0"
                                  },
                                  "next": {
                                    "block": {
                                      "type": "apm_mini_wait",
                                      "id": "`S8fIT5Cm7z+]%hTic`z",
                                      "inputs": {
                                        "MS": {
                                          "shadow": {
                                            "type": "math_number",
                                            "id": "Y~`.f)v,m[14t/{D}phG",
                                            "fields": {
                                              "NUM": 1000
                                            }
                                          }
                                        }
                                      },
                                      "next": {
                                        "block": {
                                          "type": "apm_mini_rpm",
                                          "id": "Y-LEf.5R8`ovo}*Wy#c#",
                                          "inputs": {
                                            "LEFT": {
                                              "shadow": {
                                                "type": "math_number",
                                                "id": "Z/jR5bXP#791voU}.!f.",
                                                "fields": {
                                                  "NUM": 50
                                                }
                                              }
                                            },
                                            "RIGHT": {
                                              "shadow": {
                                                "type": "math_number",
                                                "id": "AjdLufh`#sd:/(6ac^mR",
                                                "fields": {
                                                  "NUM": 0
                                                }
                                              }
                                            }
                                          },
                                          "next": {
                                            "block": {
                                              "type": "apm_mini_wait",
                                              "id": "9RtpUlQef#i}AJiHiewo",
                                              "inputs": {
                                                "MS": {
                                                  "shadow": {
                                                    "type": "math_number",
                                                    "id": "5=yb{)KcU_=.XH8V18#Q",
                                                    "fields": {
                                                      "NUM": 500
                                                    }
                                                  }
                                                }
                                              },
                                              "next": {
                                                "block": {
                                                  "type": "apm_mini_stop",
                                                  "id": "KOrcO,t-gpF;3;4Qs!19",
                                                  "fields": {
                                                    "MOTOR": "0"
                                                  }
                                                }
                                              }
                                            }
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      ]
    }
  },
  "python": "import drive\nimport light\nimport time\n\n\nwhile True:\n  drive.drive_rpm(50, 50)\n  if light.get_optical_sensor(3) < 40:\n    drive.drive_rpm(-100, -100)\n    time.sleep_ms(int(1000))\n    drive.stop_rpm(0)\n    time.sleep_ms(int(1000))\n    drive.drive_rpm(50, 0)\n    time.sleep_ms(int(500))\n    drive.stop_rpm(0)\n",
  "programmingMode": "blocks"
}