{
 "meta": {
  "cloudId": "pxt/microbit",
  "editor": "blocksprj",
  "name": "6\u00ba S4 \u00b7 El Nezha recorre un cuadrado"
 },
 "source": "{\"pxt.json\": \"{\\n    \\\"name\\\": \\\"6\u00ba S4 \u00b7 El Nezha recorre un cuadrado\\\",\\n    \\\"description\\\": \\\"Gu\u00eda C\u00f3digo Escuela 4.0 \u00b7 6\u00ba S4\\\",\\n    \\\"dependencies\\\": {\\n        \\\"core\\\": \\\"*\\\",\\n        \\\"radio\\\": \\\"*\\\",\\n        \\\"microphone\\\": \\\"*\\\",\\n        \\\"pxt-nezha\\\": \\\"github:elecfreaks/pxt-nezha#v1.3.9\\\"\\n    },\\n    \\\"files\\\": [\\n        \\\"main.blocks\\\",\\n        \\\"main.ts\\\",\\n        \\\"README.md\\\"\\n    ],\\n    \\\"preferredEditor\\\": \\\"blocksprj\\\"\\n}\", \"main.blocks\": \"<xml xmlns=\\\"https://developers.google.com/blockly/xml\\\"><variables><variable id=\\\"vjx:bK8YUW+1-5=:_lDS\\\">tiempo_avance</variable><variable id=\\\"2rX,=YmiOr/?MC#s%I?p\\\">tiempo_giro</variable></variables><block type=\\\"pxt-on-start\\\" x=\\\"20\\\" y=\\\"20\\\"><statement name=\\\"HANDLER\\\"><block type=\\\"variables_set\\\"><field name=\\\"VAR\\\" id=\\\"vjx:bK8YUW+1-5=:_lDS\\\">tiempo_avance</field><comment pinned=\\\"false\\\" h=\\\"80\\\" w=\\\"160\\\">Los dos tiempos se miden y se ajustan con cada robot</comment><value name=\\\"VALUE\\\"><shadow type=\\\"math_number\\\"><field name=\\\"NUM\\\">2000</field></shadow></value><next><block type=\\\"variables_set\\\"><field name=\\\"VAR\\\" id=\\\"2rX,=YmiOr/?MC#s%I?p\\\">tiempo_giro</field><value name=\\\"VALUE\\\"><shadow type=\\\"math_number\\\"><field name=\\\"NUM\\\">600</field></shadow></value></block></next></block></statement></block><block type=\\\"device_button_event\\\" x=\\\"413\\\" y=\\\"20\\\"><field name=\\\"NAME\\\">Button.A</field><statement name=\\\"HANDLER\\\"><block type=\\\"controls_repeat_ext\\\"><value name=\\\"TIMES\\\"><shadow type=\\\"math_whole_number\\\"><field name=\\\"NUM\\\">4</field></shadow></value><statement name=\\\"DO\\\"><block type=\\\"setMotorSpeed\\\"><field name=\\\"motor\\\">neZha.MotorList.M1</field><comment pinned=\\\"false\\\" h=\\\"80\\\" w=\\\"160\\\">Avanzar 50 cm: los motores van en espejo</comment><value name=\\\"speed\\\"><shadow type=\\\"math_number_minmax\\\"><mutation min=\\\"-100\\\" max=\\\"100\\\" label=\\\"Speed\\\" precision=\\\"0\\\"></mutation><field name=\\\"SLIDER\\\">50</field></shadow></value><next><block type=\\\"setMotorSpeed\\\"><field name=\\\"motor\\\">neZha.MotorList.M2</field><value name=\\\"speed\\\"><shadow type=\\\"math_number_minmax\\\"><mutation min=\\\"-100\\\" max=\\\"100\\\" label=\\\"Speed\\\" precision=\\\"0\\\"></mutation><field name=\\\"SLIDER\\\">-50</field></shadow></value><next><block type=\\\"device_pause\\\"><value name=\\\"pause\\\"><shadow type=\\\"timePicker\\\"><field name=\\\"ms\\\">500</field></shadow><block type=\\\"variables_get\\\"><field name=\\\"VAR\\\" id=\\\"vjx:bK8YUW+1-5=:_lDS\\\">tiempo_avance</field></block></value><next><block type=\\\"setMotorSpeed\\\"><field name=\\\"motor\\\">neZha.MotorList.M1</field><comment pinned=\\\"false\\\" h=\\\"80\\\" w=\\\"160\\\">Girar un cuarto de vuelta: los dos motores con el mismo signo</comment><value name=\\\"speed\\\"><shadow type=\\\"math_number_minmax\\\"><mutation min=\\\"-100\\\" max=\\\"100\\\" label=\\\"Speed\\\" precision=\\\"0\\\"></mutation><field name=\\\"SLIDER\\\">50</field></shadow></value><next><block type=\\\"setMotorSpeed\\\"><field name=\\\"motor\\\">neZha.MotorList.M2</field><value name=\\\"speed\\\"><shadow type=\\\"math_number_minmax\\\"><mutation min=\\\"-100\\\" max=\\\"100\\\" label=\\\"Speed\\\" precision=\\\"0\\\"></mutation><field name=\\\"SLIDER\\\">50</field></shadow></value><next><block type=\\\"device_pause\\\"><value name=\\\"pause\\\"><shadow type=\\\"timePicker\\\"><field name=\\\"ms\\\">500</field></shadow><block type=\\\"variables_get\\\"><field name=\\\"VAR\\\" id=\\\"2rX,=YmiOr/?MC#s%I?p\\\">tiempo_giro</field></block></value></block></next></block></next></block></next></block></next></block></next></block></statement><next><block type=\\\"stopAllMotor\\\"></block></next></block></statement></block></xml>\", \"main.ts\": \"// Los dos tiempos se miden y se ajustan con cada robot\\nlet tiempo_avance = 2000\\nlet tiempo_giro = 600\\ninput.onButtonPressed(Button.A, function () {\\n    for (let index = 0; index < 4; index++) {\\n        // Avanzar 50 cm: los motores van en espejo\\n        neZha.setMotorSpeed(neZha.MotorList.M1, 50)\\n        neZha.setMotorSpeed(neZha.MotorList.M2, -50)\\n        basic.pause(tiempo_avance)\\n        // Girar un cuarto de vuelta: los dos motores con el mismo signo\\n        neZha.setMotorSpeed(neZha.MotorList.M1, 50)\\n        neZha.setMotorSpeed(neZha.MotorList.M2, 50)\\n        basic.pause(tiempo_giro)\\n    }\\n    neZha.stopAllMotor()\\n})\\n\", \"README.md\": \"# 6\u00ba S4 \u00b7 El Nezha recorre un cuadrado\\n\\nGu\u00eda did\u00e1ctica C\u00f3digo Escuela 4.0 \u00b7 6\u00ba S4. Programa de referencia para el docente.\\n\"}"
}