{
 "meta": {
  "cloudId": "pxt/microbit",
  "editor": "blocksprj",
  "name": "6\u00ba S1 \u00b7 Reto 2: contador"
 },
 "source": "{\"pxt.json\": \"{\\n    \\\"name\\\": \\\"6\u00ba S1 \u00b7 Reto 2: contador\\\",\\n    \\\"description\\\": \\\"Gu\u00eda C\u00f3digo Escuela 4.0 \u00b7 6\u00ba S1\\\",\\n    \\\"dependencies\\\": {\\n        \\\"core\\\": \\\"*\\\",\\n        \\\"radio\\\": \\\"*\\\",\\n        \\\"microphone\\\": \\\"*\\\"\\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=\\\"(Rr!Ko7^L%#n(VRb3l9i\\\">contador</variable></variables><block type=\\\"pxt-on-start\\\" x=\\\"20\\\" y=\\\"20\\\"><statement name=\\\"HANDLER\\\"><block type=\\\"device_show_number\\\"><value name=\\\"number\\\"><block type=\\\"variables_get\\\"><field name=\\\"VAR\\\" id=\\\"(Rr!Ko7^L%#n(VRb3l9i\\\">contador</field></block></value></block></statement></block><block type=\\\"device_button_event\\\" x=\\\"346\\\" y=\\\"20\\\"><field name=\\\"NAME\\\">Button.A</field><statement name=\\\"HANDLER\\\"><block type=\\\"variables_change\\\"><field name=\\\"VAR\\\" id=\\\"(Rr!Ko7^L%#n(VRb3l9i\\\">contador</field><value name=\\\"VALUE\\\"><shadow type=\\\"math_number\\\"><field name=\\\"NUM\\\">1</field></shadow></value><next><block type=\\\"device_show_number\\\"><value name=\\\"number\\\"><block type=\\\"variables_get\\\"><field name=\\\"VAR\\\" id=\\\"(Rr!Ko7^L%#n(VRb3l9i\\\">contador</field></block></value></block></next></block></statement></block><block type=\\\"device_button_event\\\" x=\\\"685\\\" y=\\\"20\\\"><field name=\\\"NAME\\\">Button.B</field><statement name=\\\"HANDLER\\\"><block type=\\\"variables_change\\\"><field name=\\\"VAR\\\" id=\\\"(Rr!Ko7^L%#n(VRb3l9i\\\">contador</field><value name=\\\"VALUE\\\"><shadow type=\\\"math_number\\\"><field name=\\\"NUM\\\">-1</field></shadow></value><next><block type=\\\"device_show_number\\\"><value name=\\\"number\\\"><block type=\\\"variables_get\\\"><field name=\\\"VAR\\\" id=\\\"(Rr!Ko7^L%#n(VRb3l9i\\\">contador</field></block></value></block></next></block></statement></block><block type=\\\"device_button_event\\\" x=\\\"20\\\" y=\\\"241\\\"><field name=\\\"NAME\\\">Button.AB</field><statement name=\\\"HANDLER\\\"><block type=\\\"variables_set\\\"><field name=\\\"VAR\\\" id=\\\"(Rr!Ko7^L%#n(VRb3l9i\\\">contador</field><value name=\\\"VALUE\\\"><shadow type=\\\"math_number\\\"><field name=\\\"NUM\\\">0</field></shadow></value><next><block type=\\\"device_show_number\\\"><value name=\\\"number\\\"><block type=\\\"variables_get\\\"><field name=\\\"VAR\\\" id=\\\"(Rr!Ko7^L%#n(VRb3l9i\\\">contador</field></block></value></block></next></block></statement></block></xml>\", \"main.ts\": \"let contador = 0\\ninput.onButtonPressed(Button.A, function () {\\n    contador += 1\\n    basic.showNumber(contador)\\n})\\ninput.onButtonPressed(Button.B, function () {\\n    contador += -1\\n    basic.showNumber(contador)\\n})\\ninput.onButtonPressed(Button.AB, function () {\\n    contador = 0\\n    basic.showNumber(contador)\\n})\\nbasic.showNumber(contador)\\n\", \"README.md\": \"# 6\u00ba S1 \u00b7 Reto 2: contador\\n\\nGu\u00eda did\u00e1ctica C\u00f3digo Escuela 4.0 \u00b7 6\u00ba S1. Programa de referencia para el docente.\\n\"}"
}