pxt-microbit 7.0.26 → 7.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- var testJSON = {"libsTests":[{"packageName":"core","testFiles":[{"testName":"basic.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables>\n <variable type=\"\" id=\"PGGhch1kuMF##st8~wFr\">receivedNumber</variable>\n </variables>\n <block type=\"pxt-on-start\" x=\"77\" y=\"38\">\n <statement name=\"HANDLER\">\n <block type=\"device_show_number\">\n <value name=\"number\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">12</field>\n </shadow>\n </value>\n <next>\n <block type=\"basic_show_icon\">\n <field name=\"i\">IconNames.Umbrella</field>\n <next>\n <block type=\"device_print_message\">\n <value name=\"text\">\n <shadow type=\"text\">\n <field name=\"TEXT\">Hello!</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_pause\">\n <value name=\"pause\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">100</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_clear_display\">\n <next>\n <block type=\"basic_show_arrow\">\n <value name=\"i\">\n <shadow type=\"device_arrow\">\n <field name=\"arrow\">ArrowNames.South</field>\n </shadow>\n </value>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"device_forever\" x=\"418\" y=\"25\"></block>\n</xml>"},{"testName":"control.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables>\n <variable type=\"\" id=\"tgDN]qF_Ah1Z*?=|+?^Y\">item</variable>\n </variables>\n <block type=\"control_in_background\" x=\"-13\" y=\"175\">\n <statement name=\"HANDLER\">\n <block type=\"control_reset\">\n <next>\n <block type=\"control_wait_us\">\n <value name=\"micros\">\n <shadow type=\"math_number\" id=\"w]G5E,EGl+SOB?91N4SV\">\n <field name=\"NUM\">4</field>\n </shadow>\n <block type=\"control_event_timestamp&quot;\"></block>\n </value>\n <next>\n <block type=\"control_raise_event\">\n <value name=\"src\">\n <shadow type=\"control_event_source_id\" id=\"~$#[A%Y{}%ZvxA7_z/6+\">\n <field name=\"id\">EventBusSource.MICROBIT_ID_BUTTON_A</field>\n </shadow>\n <block type=\"control_event_value&quot;\"></block>\n </value>\n <value name=\"value\">\n <shadow type=\"control_event_value_id\" id=\"=OWyqW(E=RBE^i;;QC0$\">\n <field name=\"id\">EventBusValue.MICROBIT_EVT_ANY</field>\n </shadow>\n <block type=\"control_device_serial_number\"></block>\n </value>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"control_on_event\" x=\"-58\" y=\"393\">\n <value name=\"src\">\n <shadow type=\"control_event_source_id\" id=\"o,i-zrB1+%JG/,EC.6zB\">\n <field name=\"id\">EventBusSource.MICROBIT_ID_BUTTON_A</field>\n </shadow>\n <block type=\"control_event_value_id\">\n <field name=\"id\">EventBusValue.MES_DPAD_BUTTON_C_UP</field>\n </block>\n </value>\n <value name=\"value\">\n <shadow type=\"control_event_value_id\" id=\"n2s(-M;{|izma6OZGq:F\">\n <field name=\"id\">EventBusValue.MICROBIT_EVT_ANY</field>\n </shadow>\n <block type=\"control_event_value_id\">\n <field name=\"id\">EventBusValue.MES_REMOTE_CONTROL_EVT_PLAY</field>\n </block>\n </value>\n <statement name=\"HANDLER\">\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"tgDN]qF_Ah1Z*?=|+?^Y\" variabletype=\"\">item</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"$3|;#yTHhAwO-r1Bsk:B\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"control_device_name\"></block>\n </value>\n </block>\n </statement>\n </block>\n</xml>"},{"testName":"game.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables>\n <variable type=\"\" id=\"B{fp`0m8viO6.2a3):}D\">item</variable>\n <variable type=\"\" id=\")IrU.C_Qui4E3llvPl7H\">gdfgsdfg</variable>\n </variables>\n <block type=\"pxt-on-start\" x=\"246\" y=\"25\">\n <statement name=\"HANDLER\">\n <block type=\"game_delete_sprite\">\n <value name=\"this\">\n <block type=\"game_create_sprite\">\n <value name=\"x\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">2</field>\n </shadow>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">2</field>\n </shadow>\n </value>\n </block>\n </value>\n <next>\n <block type=\"game_move_sprite\">\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n <value name=\"leds\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">1</field>\n </shadow>\n </value>\n <next>\n <block type=\"game_turn_sprite\">\n <field name=\"direction\">Direction.Right</field>\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n <value name=\"degrees\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">45</field>\n </shadow>\n </value>\n <next>\n <block type=\"game_sprite_change_xy\">\n <field name=\"property\">LedSpriteProperty.X</field>\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">1</field>\n </shadow>\n </value>\n <next>\n <block type=\"game_sprite_set_property\">\n <field name=\"property\">LedSpriteProperty.X</field>\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n <value name=\"value\">\n <shadow type=\"math_number\" id=\"sRSKKdl8vYSc1rPg4mA2\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"game_sprite_property\">\n <field name=\"property\">LedSpriteProperty.X</field>\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")IrU.C_Qui4E3llvPl7H\" variabletype=\"\">gdfgsdfg</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"}{^7O7X5I9`!f`OhoEk1\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"game_sprite_touching_sprite\">\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n <value name=\"other\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")IrU.C_Qui4E3llvPl7H\" variabletype=\"\">gdfgsdfg</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"}{^7O7X5I9`!f`OhoEk1\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"game_sprite_touching_edge\">\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n </block>\n </value>\n <next>\n <block type=\"game_sprite_bounce\">\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n <next>\n <block type=\"game_add_score\">\n <value name=\"points\">\n <shadow type=\"math_number\" id=\"Z8k_T^n:89Tv{RiBQP!$\">\n <field name=\"NUM\">1</field>\n </shadow>\n <block type=\"game_score\"></block>\n </value>\n <next>\n <block type=\"game_set_score\">\n <value name=\"points\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <next>\n <block type=\"game_start_countdown\">\n <value name=\"duration\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">10000</field>\n </shadow>\n </value>\n <next>\n <block type=\"game_game_over\"></block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"variables_set\" disabled=\"true\" x=\"-76\" y=\"44\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n </block>\n <block type=\"variables_get\" disabled=\"true\" x=\"-92\" y=\"111\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n</xml>"},{"testName":"input.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables>\n <variable type=\"\" id=\"wUkGVHoc@p^mter~Rc7h\">item</variable>\n <variable type=\"\" id=\")f$ml.CVl6|1^?sPWl:;\">sdfsadf</variable>\n </variables>\n <block type=\"device_button_event\" x=\"-6\" y=\"17\">\n <field name=\"NAME\">Button.AB</field>\n <statement name=\"HANDLER\">\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"wUkGVHoc@p^mter~Rc7h\" variabletype=\"\">item</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"*jGI?[NsA.f}=qk0RHHf\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_get_button2\">\n <field name=\"NAME\">Button.B</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"wUkGVHoc@p^mter~Rc7h\" variabletype=\"\">item</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"*jGI?[NsA.f}=qk0RHHf\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_pin_is_pressed\">\n <field name=\"NAME\">TouchPin.P1</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")f$ml.CVl6|1^?sPWl:;\" variabletype=\"\">sdfsadf</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"bZBPUCLiZ6#D@e_[Y`:0\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_acceleration\">\n <field name=\"NAME\">Dimension.Y</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")f$ml.CVl6|1^?sPWl:;\" variabletype=\"\">sdfsadf</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"bZBPUCLiZ6#D@e_[Y`:0\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_get_light_level\"></block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")f$ml.CVl6|1^?sPWl:;\" variabletype=\"\">sdfsadf</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"bZBPUCLiZ6#D@e_[Y`:0\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_heading\"></block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")f$ml.CVl6|1^?sPWl:;\" variabletype=\"\">sdfsadf</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"bZBPUCLiZ6#D@e_[Y`:0\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_temperature\"></block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")f$ml.CVl6|1^?sPWl:;\" variabletype=\"\">sdfsadf</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"o~k},FK*r@[O2)Cy!lM}\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_get_rotation\">\n <field name=\"NAME\">Rotation.Roll</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")f$ml.CVl6|1^?sPWl:;\" variabletype=\"\">sdfsadf</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"Uu,ZpYs7!BzIpX`%V_^!\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_get_magnetic_force\">\n <field name=\"NAME\">Dimension.Z</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")f$ml.CVl6|1^?sPWl:;\" variabletype=\"\">sdfsadf</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"s{USu#UBc84Ao*jy(EQC\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_get_running_time\"></block>\n </value>\n <next>\n <block type=\"device_set_accelerometer_range\">\n <field name=\"range\">AcceleratorRange.TwoG</field>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"device_gesture_event\" x=\"472\" y=\"-8\">\n <field name=\"NAME\">Gesture.SixG</field>\n </block>\n <block type=\"device_pin_event\" x=\"555\" y=\"96\">\n <field name=\"name\">TouchPin.P2</field>\n </block>\n <block type=\"device_pin_released\" x=\"188\" y=\"435\">\n <field name=\"NAME\">TouchPin.P2</field>\n </block>\n</xml>"},{"testName":"image.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables>\n <variable type=\"\" id=\"tgDN]qF_Ah1Z*?=|+?^Y\">item</variable>\n </variables>\n <block type=\"pxt-on-start\" x=\"-29\" y=\"116\">\n <statement name=\"HANDLER\">\n <block type=\"device_show_image_offset\">\n <value name=\"sprite\">\n <block type=\"builtin_image\">\n <field name=\"i\">IconNames.Heart</field>\n </block>\n </value>\n <value name=\"offset\">\n <shadow type=\"math_number\" id=\"KX(1%=^vQUd=Q`UHhD*n\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_arrow\">\n <field name=\"arrow\">ArrowNames.South</field>\n </block>\n </value>\n <next>\n <block type=\"device_scroll_image\">\n <value name=\"sprite\">\n <block type=\"builtin_arrow_image\">\n <field name=\"i\">ArrowNames.SouthWest</field>\n </block>\n </value>\n <value name=\"frameoffset\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">1</field>\n </shadow>\n </value>\n <value name=\"delay\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">200</field>\n </shadow>\n </value>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"variables_get\" disabled=\"true\" x=\"145\" y=\"168\">\n <field name=\"VAR\" id=\"tgDN]qF_Ah1Z*?=|+?^Y\" variabletype=\"\">item</field>\n </block>\n</xml>"},{"testName":"led.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <block type=\"pxt-on-start\" x=\"20\" y=\"20\">\n <statement name=\"HANDLER\">\n <block type=\"device_plot\">\n <value name=\"x\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_unplot\">\n <value name=\"x\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_led_toggle\">\n <value name=\"x\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_plot_bar_graph\">\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <value name=\"high\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_plot_brightness\">\n <value name=\"x\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n <block type=\"device_get_brightness\"></block>\n </value>\n <value name=\"brightness\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_set_brightness\">\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_stop_animation\">\n <next>\n <block type=\"device_led_enable\">\n <value name=\"on\">\n <shadow type=\"logic_boolean\" id=\"F!|?!lo8YkE4p2I@MDy?\">\n <field name=\"BOOL\">FALSE</field>\n </shadow>\n <block type=\"device_point\">\n <value name=\"x\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n </block>\n </value>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n</xml>"},{"testName":"music.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables>\n <variable type=\"\" id=\"I3xB5Q]ehg#-~(sq{[|E\">item</variable>\n </variables>\n <block type=\"melody_on_event\" x=\"-27\" y=\"128\">\n <field name=\"value\">MusicEvent.BackgroundMelodyStarted</field>\n <statement name=\"HANDLER\">\n <block type=\"device_play_note\">\n <value name=\"note\">\n <shadow type=\"device_note\">\n <field name=\"name\">175</field>\n </shadow>\n </value>\n <value name=\"duration\">\n <shadow type=\"device_beat\">\n <field name=\"fraction\">BeatFraction.Sixteenth</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_ring\">\n <value name=\"note\">\n <shadow type=\"device_note\">\n <field name=\"name\">147</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_rest\">\n <value name=\"duration\">\n <shadow type=\"device_beat\">\n <field name=\"fraction\">BeatFraction.Sixteenth</field>\n </shadow>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"I3xB5Q]ehg#-~(sq{[|E\" variabletype=\"\">item</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"8/Ht9pG0DuL-0~sPe},^\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_note\">\n <field name=\"name\">466</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"I3xB5Q]ehg#-~(sq{[|E\" variabletype=\"\">item</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"8/Ht9pG0DuL-0~sPe},^\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_beat\">\n <field name=\"fraction\">BeatFraction.Sixteenth</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"I3xB5Q]ehg#-~(sq{[|E\" variabletype=\"\">item</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"8/Ht9pG0DuL-0~sPe},^\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_tempo\"></block>\n </value>\n <next>\n <block type=\"device_change_tempo\">\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">1242</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_set_tempo\">\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n</xml>"},{"testName":"pins.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\r\n <block type=\"pins_on_pulsed\" x=\"-157\" y=\"130\">\r\n <value name=\"pin\">\r\n <shadow type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P5</field>\r\n </shadow>\r\n </value>\r\n <field name=\"pulse\">PulseValue.Low</field>\r\n <statement name=\"HANDLER\">\r\n <block type=\"device_set_analog_pin\">\r\n <value name=\"name\">\r\n <shadow type=\"analog_pin\">\r\n <field name=\"pin\">AnalogPin.P9</field>\r\n </shadow>\r\n </value>\r\n <value name=\"value\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">5</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"device_set_analog_period\">\r\n <value name=\"pin\">\r\n <shadow type=\"analog_pin\">\r\n <field name=\"pin\">AnalogPin.P10</field>\r\n </shadow>\r\n </value>\r\n <value name=\"micros\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">20000</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"device_set_digital_pin\">\r\n <value name=\"name\">\r\n <shadow type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P6</field>\r\n </shadow>\r\n </value>\r\n <value name=\"value\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">5</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"device_set_servo_pin\">\r\n <value name=\"name\">\r\n <shadow type=\"analog_pin\">\r\n <field name=\"pin\">AnalogPin.P13</field>\r\n </shadow>\r\n </value>\r\n <value name=\"value\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">5</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"device_set_servo_pulse\">\r\n <value name=\"value\">\r\n <shadow type=\"analog_pin\">\r\n <field name=\"pin\">AnalogPin.P8</field>\r\n </shadow>\r\n </value>\r\n <value name=\"micros\">\r\n <shadow type=\"math_number\" id=\"Hx4bpmg|8KSH=b_`+XtP\">\r\n <field name=\"NUM\">1500</field>\r\n </shadow>\r\n <block type=\"math_map\">\r\n <value name=\"value\">\r\n <shadow type=\"math_number\" id=\"J%8`=~h4-?O{fY59%(_{\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n <block type=\"pins_i2c_readnumber\">\r\n <field name=\"format\">NumberFormat.Int8BE</field>\r\n <value name=\"address\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n </value>\r\n <value name=\"repeat\">\r\n <shadow type=\"logic_boolean\">\r\n <field name=\"BOOL\">FALSE</field>\r\n </shadow>\r\n </value>\r\n </block>\r\n </value>\r\n <value name=\"fromLow\">\r\n <shadow type=\"math_number\" id=\"kp(!mScnCVWI/1_X|ar#\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n <block type=\"pins_pulse_in\">\r\n <value name=\"name\">\r\n <shadow type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P9</field>\r\n </shadow>\r\n </value>\r\n <field name=\"value\">PulseValue.Low</field>\r\n </block>\r\n </value>\r\n <value name=\"fromHigh\">\r\n <shadow type=\"math_number\" id=\"]@F=`[ZuxAk,=05Yyn[{\">\r\n <field name=\"NUM\">1023</field>\r\n </shadow>\r\n <block type=\"pins_pulse_duration\"></block>\r\n </value>\r\n <value name=\"toLow\">\r\n <shadow type=\"math_number\" id=\"sJDL?hoabUE)cDdBJWO=\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n <block type=\"spi_write\">\r\n <value name=\"value\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n </value>\r\n </block>\r\n </value>\r\n <value name=\"toHigh\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">4</field>\r\n </shadow>\r\n </value>\r\n </block>\r\n </value>\r\n <next>\r\n <block type=\"i2c_writenumber\">\r\n <field name=\"format\">NumberFormat.Int16BE</field>\r\n <value name=\"address\">\r\n <shadow type=\"math_number\" id=\"RjJ{^G_#*rwUqER:]i-L\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n <block type=\"device_get_digital_pin\">\r\n <value name=\"name\">\r\n <shadow type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P9</field>\r\n </shadow>\r\n </value>\r\n </block>\r\n </value>\r\n <value name=\"value\">\r\n <shadow type=\"math_number\" id=\"CCl{zdVU/!(bR}aUfG,G\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n <block type=\"device_get_analog_pin\">\r\n <value name=\"name\">\r\n <shadow type=\"analog_pin\">\r\n <field name=\"pin\">AnalogPin.P9</field>\r\n </shadow>\r\n </value>\r\n </block>\r\n </value>\r\n <value name=\"repeat\">\r\n <shadow type=\"logic_boolean\">\r\n <field name=\"BOOL\">FALSE</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"spi_pins\">\r\n <value name=\"mosi\">\r\n <shadow type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P11</field>\r\n </shadow>\r\n </value>\r\n <value name=\"miso\">\r\n <shadow type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P9</field>\r\n </shadow>\r\n </value>\r\n <value name=\"sck\">\r\n <shadow type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P10</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"device_set_pull\">\r\n <value name=\"pin\">\r\n <shadow type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P9</field>\r\n </shadow>\r\n </value>\r\n <field name=\"pull\">PinPullMode.PullDown</field>\r\n <next>\r\n <block type=\"device_analog_pitch\">\r\n <value name=\"frequency\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n </value>\r\n <value name=\"ms\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"device_set_pin_events\">\r\n <value name=\"pin\">\r\n <shadow type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P8</field>\r\n </shadow>\r\n </value>\r\n <field name=\"type\">PinEventType.Touch</field>\r\n <next>\r\n <block type=\"device_analog_set_pitch_pin\">\r\n <value name=\"name\">\r\n <shadow type=\"analog_pin\">\r\n <field name=\"pin\">AnalogPin.P9</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"spi_format\">\r\n <value name=\"bits\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">8</field>\r\n </shadow>\r\n </value>\r\n <value name=\"mode\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">3</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"spi_format\">\r\n <value name=\"bits\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">8</field>\r\n </shadow>\r\n </value>\r\n <value name=\"mode\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">3</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"spi_frequency\">\r\n <value name=\"frequency\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">1000000</field>\r\n </shadow>\r\n </value>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </statement>\r\n </block>\r\n</xml>"},{"testName":"test.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables>\n <variable type=\"\" id=\"2w47B[B-y%SK,+8+DQGz\">booltest</variable>\n <variable type=\"\" id=\"Uv6@%!N7Ts}XI7t+j[zB\">myImage</variable>\n <variable type=\"\" id=\"7BPQp@}m*I210zEM4S=3\">strtest</variable>\n </variables>\n <block type=\"pxt-on-start\" x=\"481\" y=\"68\">\n <statement name=\"HANDLER\">\n <block type=\"device_show_number\">\n <value name=\"number\">\n <shadow type=\"math_number\" id=\")RB0,?b3RM|TO|?[ZPG6\">\n <field name=\"NUM\">123</field>\n </shadow>\n <block type=\"control_event_value&quot;\"></block>\n </value>\n <next>\n <block type=\"device_show_leds\">\n <field name=\"LEDS\">`\n # . . # .\n # . . # .\n . # . . .\n . # # . .\n . . . . .\n `\n </field>\n <next>\n <block type=\"basic_show_icon\">\n <field name=\"i\">IconNames.Heart</field>\n <next>\n <block type=\"device_pause\">\n <value name=\"pause\">\n <shadow type=\"timePicker\">\n <field name=\"ms\">500</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_clear_display\">\n <next>\n <block type=\"basic_show_arrow\">\n <value name=\"i\">\n <shadow type=\"device_arrow\">\n <field name=\"arrow\">ArrowNames.SouthEast</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_show_image_offset\">\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"Uv6@%!N7Ts}XI7t+j[zB\" variabletype=\"\">myImage</field>\n </block>\n </value>\n <value name=\"offset\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_scroll_image\">\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"Uv6@%!N7Ts}XI7t+j[zB\" variabletype=\"\">myImage</field>\n </block>\n </value>\n <value name=\"frameoffset\">\n <shadow type=\"math_number\" id=\"xu?]Tdz!8RfpHlMjG)~B\">\n <field name=\"NUM\">1</field>\n </shadow>\n <block type=\"control_device_serial_number\"></block>\n </value>\n <value name=\"delay\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">200</field>\n </shadow>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"7BPQp@}m*I210zEM4S=3\" variabletype=\"\">strtest</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"W]w@ImzxKDQ=.w+$$f4a\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"serial_read_until\">\n <value name=\"delimiter\">\n <shadow type=\"serial_delimiter_conv\">\n <field name=\"del\">Delimiters.Hash</field>\n </shadow>\n </value>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"7BPQp@}m*I210zEM4S=3\" variabletype=\"\">strtest</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"W]w@ImzxKDQ=.w+$$f4a\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"serial_read_buffer\"></block>\n </value>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"device_pin_event\" x=\"2407\" y=\"0\">\n <field name=\"name\">TouchPin.P2</field>\n <statement name=\"HANDLER\">\n <block type=\"device_led_toggle\">\n <value name=\"x\">\n <shadow type=\"math_number_minmax\">\n <mutation min=\"0\" max=\"4\" label=\"X\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">1</field>\n </shadow>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number_minmax\">\n <mutation min=\"0\" max=\"4\" label=\"Y\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">2</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_plot_bar_graph\">\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <value name=\"high\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">45</field>\n </shadow>\n </value>\n <next>\n <block type=\"led_set_display_mode\">\n <field name=\"mode\">DisplayMode.Greyscale</field>\n <next>\n <block type=\"device_set_analog_pin\">\n <value name=\"name\">\n <shadow type=\"analog_pin\">\n <field name=\"pin\">AnalogPin.P4</field>\n </shadow>\n </value>\n <value name=\"value\">\n <shadow type=\"math_number_minmax\" id=\",:%8N*FL3wa-zFQ[+^$9\">\n <mutation min=\"0\" max=\"1023\" label=\"Value\" precision=\"0\"></mutation>\n <field name=\"SLIDER\">1023</field>\n </shadow>\n <block type=\"device_get_analog_pin\">\n <value name=\"name\">\n <shadow type=\"analog_pin\">\n <field name=\"pin\">AnalogPin.P13</field>\n </shadow>\n </value>\n </block>\n </value>\n <next>\n <block type=\"device_set_digital_pin\">\n <value name=\"name\">\n <shadow type=\"digital_pin\">\n <field name=\"pin\">DigitalPin.P10</field>\n </shadow>\n </value>\n <value name=\"value\">\n <shadow type=\"math_number_minmax\" id=\"W~pvdj%jFEj?EHmT{81Z\">\n <mutation min=\"0\" max=\"1\" label=\"Value\" precision=\"0\"></mutation>\n <field name=\"SLIDER\">0</field>\n </shadow>\n <block type=\"device_get_digital_pin\">\n <value name=\"name\">\n <shadow type=\"digital_pin\">\n <field name=\"pin\">DigitalPin.P15</field>\n </shadow>\n </value>\n </block>\n </value>\n <next>\n <block type=\"device_set_analog_period\">\n <value name=\"pin\">\n <shadow type=\"analog_pin\">\n <field name=\"pin\">AnalogPin.P9</field>\n </shadow>\n </value>\n <value name=\"micros\">\n <shadow type=\"math_number\" id=\"4a@.1MdG`n=p;34mQOpC\">\n <field name=\"NUM\">1234</field>\n </shadow>\n <block type=\"pin_map\">\n <value name=\"value\">\n <shadow type=\"math_number\" id=\"lTWI!)d`ZkwvZW))3X(F\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_temperature\"></block>\n </value>\n <value name=\"fromLow\">\n <shadow type=\"math_number\" id=\"2n.VJ_pD7wFdcjM:FToF\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_heading\"></block>\n </value>\n <value name=\"fromHigh\">\n <shadow type=\"math_number\" id=\"-c^:x{=$`RLP5RW9}{6a\">\n <field name=\"NUM\">1023</field>\n </shadow>\n <block type=\"device_get_rotation\">\n <field name=\"NAME\">Rotation.Roll</field>\n </block>\n </value>\n <value name=\"toLow\">\n <shadow type=\"math_number\" id=\"#1@Uxq:nFqe!(pHawH9H\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_get_magnetic_force\">\n <field name=\"NAME\">Dimension.Y</field>\n </block>\n </value>\n <value name=\"toHigh\">\n <shadow type=\"math_number\" id=\"?%tD/NB|a$cg#TU0/C02\">\n <field name=\"NUM\">4</field>\n </shadow>\n <block type=\"device_get_running_time\"></block>\n </value>\n </block>\n </value>\n <next>\n <block type=\"device_set_servo_pin\">\n <value name=\"name\">\n <shadow type=\"analog_pin\">\n <field name=\"pin\">AnalogPin.P20</field>\n </shadow>\n </value>\n <value name=\"value\">\n <shadow type=\"math_number_minmax\" id=\"xC9lYf`{!gA-A8R+#~L.\">\n <mutation min=\"0\" max=\"180\" label=\"Value\" precision=\"0\"></mutation>\n <field name=\"SLIDER\">180</field>\n </shadow>\n <block type=\"device_acceleration\">\n <field name=\"NAME\">Dimension.Z</field>\n </block>\n </value>\n <next>\n <block type=\"device_set_servo_pulse\">\n <value name=\"value\">\n <shadow type=\"analog_pin\">\n <field name=\"pin\">AnalogPin.P14</field>\n </shadow>\n </value>\n <value name=\"micros\">\n <shadow type=\"math_number\" id=\"@*C3kzJkeeUQ@s$N5?K}\">\n <field name=\"NUM\">1500</field>\n </shadow>\n <block type=\"device_get_light_level\"></block>\n </value>\n <next>\n <block type=\"device_play_note\">\n <value name=\"note\">\n <shadow type=\"device_note\">\n <field name=\"name\">220</field>\n </shadow>\n </value>\n <value name=\"duration\">\n <shadow type=\"device_beat\">\n <field name=\"fraction\">BeatFraction.Sixteenth</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_ring\">\n <value name=\"note\">\n <shadow type=\"device_note\">\n <field name=\"name\">659</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_rest\">\n <value name=\"duration\">\n <shadow type=\"device_beat\">\n <field name=\"fraction\">BeatFraction.Double</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_start_melody\">\n <field name=\"options\">MelodyOptions.ForeverInBackground</field>\n <value name=\"melody\">\n <shadow type=\"device_builtin_melody\">\n <field name=\"melody\">Melodies.Ringtone</field>\n </shadow>\n </value>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"device_gesture_event\" x=\"1570\" y=\"56\">\n <field name=\"NAME\">Gesture.TiltLeft</field>\n <statement name=\"HANDLER\">\n <block type=\"device_unplot\">\n <value name=\"x\">\n <shadow type=\"math_number_minmax\" id=\"|}V%t{K/j77J}J54FX]r\">\n <mutation min=\"0\" max=\"4\" label=\"X\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">1</field>\n </shadow>\n <block type=\"control_event_value_id\">\n <field name=\"id\">EventBusValue.MICROBIT_PIN_EVT_PULSE_HI</field>\n </block>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number_minmax\">\n <mutation min=\"0\" max=\"4\" label=\"Y\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">2</field>\n </shadow>\n </value>\n <next>\n <block type=\"serial_writebuffer\">\n <value name=\"buffer\">\n <shadow type=\"serial_readbuffer\">\n <value name=\"length\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">64</field>\n </shadow>\n </value>\n </shadow>\n </value>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"device_forever\" x=\"1172\" y=\"242\">\n <statement name=\"HANDLER\">\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"2w47B[B-y%SK,+8+DQGz\" variabletype=\"\">booltest</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"RP?w4vFS1wB4I0nNyldb\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_get_button2\">\n <field name=\"NAME\">Button.B</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"2w47B[B-y%SK,+8+DQGz\" variabletype=\"\">booltest</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"RP?w4vFS1wB4I0nNyldb\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_pin_is_pressed\">\n <field name=\"NAME\">TouchPin.P2</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"2w47B[B-y%SK,+8+DQGz\" variabletype=\"\">booltest</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"RP?w4vFS1wB4I0nNyldb\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_point\">\n <value name=\"x\">\n <shadow type=\"math_number_minmax\">\n <mutation min=\"0\" max=\"4\" label=\"X\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">3</field>\n </shadow>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number_minmax\">\n <mutation min=\"0\" max=\"4\" label=\"Y\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">4</field>\n </shadow>\n </value>\n </block>\n </value>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"device_button_event\" x=\"1294\" y=\"513\">\n <field name=\"NAME\">Button.AB</field>\n <statement name=\"HANDLER\">\n <block type=\"device_plot\">\n <value name=\"x\">\n <shadow type=\"math_number_minmax\" id=\"Z[BsF}r)3:FoNWE|X5}s\">\n <mutation min=\"0\" max=\"4\" label=\"X\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">1</field>\n </shadow>\n <block type=\"device_beat\">\n <field name=\"fraction\">BeatFraction.Sixteenth</field>\n </block>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number_minmax\">\n <mutation min=\"0\" max=\"4\" label=\"Y\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">2</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_plot_brightness\">\n <value name=\"x\">\n <shadow type=\"math_number_minmax\" id=\"2we6or2Y|vhAl!^BAYtl\">\n <mutation min=\"0\" max=\"4\" label=\"X\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">3</field>\n </shadow>\n <block type=\"device_tempo\"></block>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number_minmax\">\n <mutation min=\"0\" max=\"4\" label=\"Y\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">5</field>\n </shadow>\n </value>\n <value name=\"brightness\">\n <shadow type=\"math_number_minmax\" id=\"IjJTgf5z!,K`qd`~pCB3\">\n <mutation min=\"0\" max=\"255\" label=\"Brightness\" precision=\"0\"></mutation>\n <field name=\"SLIDER\">255</field>\n </shadow>\n <block type=\"device_get_brightness\"></block>\n </value>\n <next>\n <block type=\"device_set_brightness\">\n <value name=\"value\">\n <shadow type=\"math_number_minmax\" id=\"WAUzdT@1z{%:UNn!_dU(\">\n <mutation min=\"0\" max=\"255\" label=\"Value\" precision=\"0\"></mutation>\n <field name=\"SLIDER\">255</field>\n </shadow>\n <block type=\"device_note\">\n <field name=\"name\">440</field>\n </block>\n </value>\n <next>\n <block type=\"device_stop_animation\">\n <next>\n <block type=\"device_led_enable\">\n <value name=\"on\">\n <shadow type=\"logic_boolean\">\n <field name=\"BOOL\">TRUE</field>\n </shadow>\n </value>\n <next>\n <block type=\"input_compass_calibrate\"></block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"control_in_background\" x=\"0\" y=\"635\">\n <statement name=\"HANDLER\">\n <block type=\"control_wait_us\">\n <value name=\"micros\">\n <shadow type=\"math_number\" id=\"^!;AKS(vo=ly}ykm1~Z|\">\n <field name=\"NUM\">4</field>\n </shadow>\n <block type=\"control_event_timestamp&quot;\"></block>\n </value>\n <next>\n <block type=\"control_raise_event\">\n <value name=\"src\">\n <shadow type=\"control_event_source_id\">\n <field name=\"id\">EventBusSource.MICROBIT_ID_IO_P0</field>\n </shadow>\n </value>\n <value name=\"value\">\n <shadow type=\"control_event_value_id\">\n <field name=\"id\">EventBusValue.MES_ALERT_EVT_ALARM1</field>\n </shadow>\n </value>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"device_pin_released\" x=\"942\" y=\"723\">\n <field name=\"NAME\">TouchPin.P2</field>\n <statement name=\"HANDLER\">\n <block type=\"device_set_accelerometer_range\">\n <field name=\"range\">AcceleratorRange.EightG</field>\n </block>\n </statement>\n </block>\n <block type=\"serial_on_data_received\" x=\"419\" y=\"933\">\n <value name=\"delimiters\">\n <shadow type=\"serial_delimiter_conv\">\n <field name=\"del\">Delimiters.Colon</field>\n </shadow>\n </value>\n <statement name=\"HANDLER\">\n <block type=\"serial_redirect\">\n <field name=\"tx\">SerialPin.P12</field>\n <field name=\"rx\">SerialPin.P14</field>\n <field name=\"rate\">BaudRate.BaudRate19200</field>\n <next>\n <block type=\"serial_redirect_to_usb\"></block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"pins_on_pulsed\" x=\"1538\" y=\"929\">\n <value name=\"pin\">\n <shadow type=\"digital_pin\">\n <field name=\"pin\">DigitalPin.P10</field>\n </shadow>\n </value>\n <field name=\"pulse\">PulseValue.Low</field>\n <statement name=\"HANDLER\">\n <block type=\"i2c_writenumber\">\n <field name=\"format\">NumberFormat.UInt8BE</field>\n <value name=\"address\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <value name=\"repeat\">\n <shadow type=\"logic_boolean\">\n <field name=\"BOOL\">FALSE</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_analog_pitch\">\n <value name=\"frequency\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <value name=\"ms\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_set_pin_events\">\n <value name=\"pin\">\n <shadow type=\"digital_pin\">\n <field name=\"pin\">DigitalPin.P0</field>\n </shadow>\n </value>\n <field name=\"type\">PinEventType.Touch</field>\n <next>\n <block type=\"spi_frequency\">\n <value name=\"frequency\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">1000000</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_analog_set_pitch_pin\">\n <value name=\"name\">\n <shadow type=\"analog_pin\">\n <field name=\"pin\">AnalogPin.P2</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_set_pull\">\n <value name=\"pin\">\n <shadow type=\"digital_pin\">\n <field name=\"pin\">DigitalPin.P2</field>\n </shadow>\n </value>\n <field name=\"pull\">PinPullMode.PullDown</field>\n <next>\n <block type=\"spi_format\">\n <value name=\"bits\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">8</field>\n </shadow>\n </value>\n <value name=\"mode\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">3</field>\n </shadow>\n </value>\n <next>\n <block type=\"spi_pins\">\n <value name=\"mosi\">\n <shadow type=\"digital_pin\">\n <field name=\"pin\">DigitalPin.P9</field>\n </shadow>\n </value>\n <value name=\"miso\">\n <shadow type=\"digital_pin\">\n <field name=\"pin\">DigitalPin.P14</field>\n </shadow>\n </value>\n <value name=\"sck\">\n <shadow type=\"digital_pin\">\n <field name=\"pin\">DigitalPin.P16</field>\n </shadow>\n </value>\n <next>\n <block type=\"control_reset\"></block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"melody_on_event\" x=\"859\" y=\"1002\">\n <field name=\"value\">MusicEvent.BackgroundMelodyNotePlayed</field>\n <statement name=\"HANDLER\">\n <block type=\"device_change_tempo\">\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">123</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_set_tempo\">\n <value name=\"value\">\n <shadow type=\"math_number_minmax\">\n <mutation min=\"4\" max=\"400\" label=\"Bpm\" precision=\"0\"></mutation>\n <field name=\"SLIDER\">12312312</field>\n </shadow>\n </value>\n <next>\n <block type=\"serial_writeline\">\n <value name=\"text\">\n <shadow type=\"text\" id=\"SYl:x9lxu0KI{YcmomQz\">\n <field name=\"TEXT\"></field>\n </shadow>\n <block type=\"serial_read_line\"></block>\n </value>\n <next>\n <block type=\"serial_writenumber\">\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <next>\n <block type=\"serial_writevalue\">\n <value name=\"name\">\n <shadow type=\"text\">\n <field name=\"TEXT\">x</field>\n </shadow>\n </value>\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <next>\n <block type=\"serial_writestring\">\n <value name=\"text\">\n <shadow type=\"text\" id=\"_gp`6rz8ZI+em9ILvR~6\">\n <field name=\"TEXT\"></field>\n </shadow>\n <block type=\"control_device_name\"></block>\n </value>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"control_on_event\" x=\"24\" y=\"1406\">\n <value name=\"src\">\n <shadow type=\"control_event_source_id\">\n <field name=\"id\">EventBusSource.MICROBIT_ID_IO_P1</field>\n </shadow>\n </value>\n <value name=\"value\">\n <shadow type=\"control_event_value_id\">\n <field name=\"id\">EventBusValue.MES_ALERT_EVT_ALARM2</field>\n </shadow>\n </value>\n </block>\n</xml>"},{"testName":"serial.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables>\n <variable type=\"\" id=\"3ch~y{k6dWI;q}kA]3pa\">item</variable>\n </variables>\n <block type=\"serial_on_data_received\" x=\"79\" y=\"287\">\n <value name=\"delimiters\">\n <shadow type=\"serial_delimiter_conv\" id=\"Rgi{j+glSZt}8nIn!+08\">\n <field name=\"del\">Delimiters.Colon</field>\n </shadow>\n <block type=\"serial_read_buffer\"></block>\n </value>\n <statement name=\"HANDLER\">\n <block type=\"serial_writeline\">\n <value name=\"text\">\n <shadow type=\"text\" id=\"re1R]taer}HU[ed30FDZ\">\n <field name=\"TEXT\"></field>\n </shadow>\n <block type=\"serial_read_line\"></block>\n </value>\n <next>\n <block type=\"serial_writenumber\">\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <next>\n <block type=\"serial_writevalue\">\n <value name=\"name\">\n <shadow type=\"text\" id=\"Y9NXoV7DPB{.(T=w:ei^\">\n <field name=\"TEXT\">x</field>\n </shadow>\n <block type=\"serial_read_until\">\n <value name=\"delimiter\">\n <shadow type=\"serial_delimiter_conv\">\n <field name=\"del\">Delimiters.Colon</field>\n </shadow>\n </value>\n </block>\n </value>\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <next>\n <block type=\"serial_writestring\">\n <value name=\"text\">\n <shadow type=\"text\">\n <field name=\"TEXT\"></field>\n </shadow>\n </value>\n <next>\n <block type=\"serial_writenumbers\">\n <value name=\"values\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"3ch~y{k6dWI;q}kA]3pa\" variabletype=\"\">item</field>\n </block>\n </value>\n <next>\n <block type=\"serial_redirect\">\n <field name=\"tx\">SerialPin.P12</field>\n <field name=\"rx\">SerialPin.P13</field>\n <field name=\"rate\">BaudRate.BaudRate28800</field>\n <next>\n <block type=\"serial_writebuffer\">\n <value name=\"buffer\">\n <block type=\"serial_readbuffer\">\n <value name=\"length\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">64</field>\n </shadow>\n </value>\n </block>\n </value>\n <next>\n <block type=\"serial_redirect_to_usb\"></block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n</xml>"}]}],"commonTests":[]}
1
+ var testJSON = {"libsTests":[{"packageName":"core","testFiles":[{"testName":"basic.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables>\n <variable type=\"\" id=\"PGGhch1kuMF##st8~wFr\">receivedNumber</variable>\n </variables>\n <block type=\"pxt-on-start\" x=\"77\" y=\"38\">\n <statement name=\"HANDLER\">\n <block type=\"device_show_number\">\n <value name=\"number\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">12</field>\n </shadow>\n </value>\n <next>\n <block type=\"basic_show_icon\">\n <field name=\"i\">IconNames.Umbrella</field>\n <next>\n <block type=\"device_print_message\">\n <value name=\"text\">\n <shadow type=\"text\">\n <field name=\"TEXT\">Hello!</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_pause\">\n <value name=\"pause\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">100</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_clear_display\">\n <next>\n <block type=\"basic_show_arrow\">\n <value name=\"i\">\n <shadow type=\"device_arrow\">\n <field name=\"arrow\">ArrowNames.South</field>\n </shadow>\n </value>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"device_forever\" x=\"418\" y=\"25\"></block>\n</xml>"},{"testName":"control.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables>\n <variable type=\"\" id=\"tgDN]qF_Ah1Z*?=|+?^Y\">item</variable>\n </variables>\n <block type=\"control_in_background\" x=\"-13\" y=\"175\">\n <statement name=\"HANDLER\">\n <block type=\"control_reset\">\n <next>\n <block type=\"control_wait_us\">\n <value name=\"micros\">\n <shadow type=\"math_number\" id=\"w]G5E,EGl+SOB?91N4SV\">\n <field name=\"NUM\">4</field>\n </shadow>\n <block type=\"control_event_timestamp&quot;\"></block>\n </value>\n <next>\n <block type=\"control_raise_event\">\n <value name=\"src\">\n <shadow type=\"control_event_source_id\" id=\"~$#[A%Y{}%ZvxA7_z/6+\">\n <field name=\"id\">EventBusSource.MICROBIT_ID_BUTTON_A</field>\n </shadow>\n <block type=\"control_event_value&quot;\"></block>\n </value>\n <value name=\"value\">\n <shadow type=\"control_event_value_id\" id=\"=OWyqW(E=RBE^i;;QC0$\">\n <field name=\"id\">EventBusValue.MICROBIT_EVT_ANY</field>\n </shadow>\n <block type=\"control_device_serial_number\"></block>\n </value>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"control_on_event\" x=\"-58\" y=\"393\">\n <value name=\"src\">\n <shadow type=\"control_event_source_id\" id=\"o,i-zrB1+%JG/,EC.6zB\">\n <field name=\"id\">EventBusSource.MICROBIT_ID_BUTTON_A</field>\n </shadow>\n <block type=\"control_event_value_id\">\n <field name=\"id\">EventBusValue.MES_DPAD_BUTTON_C_UP</field>\n </block>\n </value>\n <value name=\"value\">\n <shadow type=\"control_event_value_id\" id=\"n2s(-M;{|izma6OZGq:F\">\n <field name=\"id\">EventBusValue.MICROBIT_EVT_ANY</field>\n </shadow>\n <block type=\"control_event_value_id\">\n <field name=\"id\">EventBusValue.MES_REMOTE_CONTROL_EVT_PLAY</field>\n </block>\n </value>\n <statement name=\"HANDLER\">\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"tgDN]qF_Ah1Z*?=|+?^Y\" variabletype=\"\">item</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"$3|;#yTHhAwO-r1Bsk:B\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"control_device_name\"></block>\n </value>\n </block>\n </statement>\n </block>\n</xml>"},{"testName":"input.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables>\n <variable type=\"\" id=\"wUkGVHoc@p^mter~Rc7h\">item</variable>\n <variable type=\"\" id=\")f$ml.CVl6|1^?sPWl:;\">sdfsadf</variable>\n </variables>\n <block type=\"device_button_event\" x=\"-6\" y=\"17\">\n <field name=\"NAME\">Button.AB</field>\n <statement name=\"HANDLER\">\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"wUkGVHoc@p^mter~Rc7h\" variabletype=\"\">item</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"*jGI?[NsA.f}=qk0RHHf\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_get_button2\">\n <field name=\"NAME\">Button.B</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"wUkGVHoc@p^mter~Rc7h\" variabletype=\"\">item</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"*jGI?[NsA.f}=qk0RHHf\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_pin_is_pressed\">\n <field name=\"NAME\">TouchPin.P1</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")f$ml.CVl6|1^?sPWl:;\" variabletype=\"\">sdfsadf</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"bZBPUCLiZ6#D@e_[Y`:0\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_acceleration\">\n <field name=\"NAME\">Dimension.Y</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")f$ml.CVl6|1^?sPWl:;\" variabletype=\"\">sdfsadf</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"bZBPUCLiZ6#D@e_[Y`:0\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_get_light_level\"></block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")f$ml.CVl6|1^?sPWl:;\" variabletype=\"\">sdfsadf</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"bZBPUCLiZ6#D@e_[Y`:0\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_heading\"></block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")f$ml.CVl6|1^?sPWl:;\" variabletype=\"\">sdfsadf</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"bZBPUCLiZ6#D@e_[Y`:0\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_temperature\"></block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")f$ml.CVl6|1^?sPWl:;\" variabletype=\"\">sdfsadf</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"o~k},FK*r@[O2)Cy!lM}\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_get_rotation\">\n <field name=\"NAME\">Rotation.Roll</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")f$ml.CVl6|1^?sPWl:;\" variabletype=\"\">sdfsadf</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"Uu,ZpYs7!BzIpX`%V_^!\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_get_magnetic_force\">\n <field name=\"NAME\">Dimension.Z</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")f$ml.CVl6|1^?sPWl:;\" variabletype=\"\">sdfsadf</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"s{USu#UBc84Ao*jy(EQC\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_get_running_time\"></block>\n </value>\n <next>\n <block type=\"device_set_accelerometer_range\">\n <field name=\"range\">AcceleratorRange.TwoG</field>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"device_gesture_event\" x=\"472\" y=\"-8\">\n <field name=\"NAME\">Gesture.SixG</field>\n </block>\n <block type=\"device_pin_event\" x=\"555\" y=\"96\">\n <field name=\"name\">TouchPin.P2</field>\n </block>\n <block type=\"device_pin_released\" x=\"188\" y=\"435\">\n <field name=\"NAME\">TouchPin.P2</field>\n </block>\n</xml>"},{"testName":"game.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables>\n <variable type=\"\" id=\"B{fp`0m8viO6.2a3):}D\">item</variable>\n <variable type=\"\" id=\")IrU.C_Qui4E3llvPl7H\">gdfgsdfg</variable>\n </variables>\n <block type=\"pxt-on-start\" x=\"246\" y=\"25\">\n <statement name=\"HANDLER\">\n <block type=\"game_delete_sprite\">\n <value name=\"this\">\n <block type=\"game_create_sprite\">\n <value name=\"x\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">2</field>\n </shadow>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">2</field>\n </shadow>\n </value>\n </block>\n </value>\n <next>\n <block type=\"game_move_sprite\">\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n <value name=\"leds\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">1</field>\n </shadow>\n </value>\n <next>\n <block type=\"game_turn_sprite\">\n <field name=\"direction\">Direction.Right</field>\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n <value name=\"degrees\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">45</field>\n </shadow>\n </value>\n <next>\n <block type=\"game_sprite_change_xy\">\n <field name=\"property\">LedSpriteProperty.X</field>\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">1</field>\n </shadow>\n </value>\n <next>\n <block type=\"game_sprite_set_property\">\n <field name=\"property\">LedSpriteProperty.X</field>\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n <value name=\"value\">\n <shadow type=\"math_number\" id=\"sRSKKdl8vYSc1rPg4mA2\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"game_sprite_property\">\n <field name=\"property\">LedSpriteProperty.X</field>\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")IrU.C_Qui4E3llvPl7H\" variabletype=\"\">gdfgsdfg</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"}{^7O7X5I9`!f`OhoEk1\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"game_sprite_touching_sprite\">\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n <value name=\"other\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\")IrU.C_Qui4E3llvPl7H\" variabletype=\"\">gdfgsdfg</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"}{^7O7X5I9`!f`OhoEk1\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"game_sprite_touching_edge\">\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n </block>\n </value>\n <next>\n <block type=\"game_sprite_bounce\">\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n </value>\n <next>\n <block type=\"game_add_score\">\n <value name=\"points\">\n <shadow type=\"math_number\" id=\"Z8k_T^n:89Tv{RiBQP!$\">\n <field name=\"NUM\">1</field>\n </shadow>\n <block type=\"game_score\"></block>\n </value>\n <next>\n <block type=\"game_set_score\">\n <value name=\"points\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <next>\n <block type=\"game_start_countdown\">\n <value name=\"duration\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">10000</field>\n </shadow>\n </value>\n <next>\n <block type=\"game_game_over\"></block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"variables_set\" disabled=\"true\" x=\"-76\" y=\"44\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n </block>\n <block type=\"variables_get\" disabled=\"true\" x=\"-92\" y=\"111\">\n <field name=\"VAR\" id=\"B{fp`0m8viO6.2a3):}D\" variabletype=\"\">item</field>\n </block>\n</xml>"},{"testName":"led.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <block type=\"pxt-on-start\" x=\"20\" y=\"20\">\n <statement name=\"HANDLER\">\n <block type=\"device_plot\">\n <value name=\"x\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_unplot\">\n <value name=\"x\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_led_toggle\">\n <value name=\"x\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_plot_bar_graph\">\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <value name=\"high\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_plot_brightness\">\n <value name=\"x\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n <block type=\"device_get_brightness\"></block>\n </value>\n <value name=\"brightness\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_set_brightness\">\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_stop_animation\">\n <next>\n <block type=\"device_led_enable\">\n <value name=\"on\">\n <shadow type=\"logic_boolean\" id=\"F!|?!lo8YkE4p2I@MDy?\">\n <field name=\"BOOL\">FALSE</field>\n </shadow>\n <block type=\"device_point\">\n <value name=\"x\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n </block>\n </value>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n</xml>"},{"testName":"image.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables>\n <variable type=\"\" id=\"tgDN]qF_Ah1Z*?=|+?^Y\">item</variable>\n </variables>\n <block type=\"pxt-on-start\" x=\"-29\" y=\"116\">\n <statement name=\"HANDLER\">\n <block type=\"device_show_image_offset\">\n <value name=\"sprite\">\n <block type=\"builtin_image\">\n <field name=\"i\">IconNames.Heart</field>\n </block>\n </value>\n <value name=\"offset\">\n <shadow type=\"math_number\" id=\"KX(1%=^vQUd=Q`UHhD*n\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_arrow\">\n <field name=\"arrow\">ArrowNames.South</field>\n </block>\n </value>\n <next>\n <block type=\"device_scroll_image\">\n <value name=\"sprite\">\n <block type=\"builtin_arrow_image\">\n <field name=\"i\">ArrowNames.SouthWest</field>\n </block>\n </value>\n <value name=\"frameoffset\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">1</field>\n </shadow>\n </value>\n <value name=\"delay\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">200</field>\n </shadow>\n </value>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"variables_get\" disabled=\"true\" x=\"145\" y=\"168\">\n <field name=\"VAR\" id=\"tgDN]qF_Ah1Z*?=|+?^Y\" variabletype=\"\">item</field>\n </block>\n</xml>"},{"testName":"music.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables>\n <variable type=\"\" id=\"I3xB5Q]ehg#-~(sq{[|E\">item</variable>\n </variables>\n <block type=\"melody_on_event\" x=\"-27\" y=\"128\">\n <field name=\"value\">MusicEvent.BackgroundMelodyStarted</field>\n <statement name=\"HANDLER\">\n <block type=\"device_play_note\">\n <value name=\"note\">\n <shadow type=\"device_note\">\n <field name=\"name\">175</field>\n </shadow>\n </value>\n <value name=\"duration\">\n <shadow type=\"device_beat\">\n <field name=\"fraction\">BeatFraction.Sixteenth</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_ring\">\n <value name=\"note\">\n <shadow type=\"device_note\">\n <field name=\"name\">147</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_rest\">\n <value name=\"duration\">\n <shadow type=\"device_beat\">\n <field name=\"fraction\">BeatFraction.Sixteenth</field>\n </shadow>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"I3xB5Q]ehg#-~(sq{[|E\" variabletype=\"\">item</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"8/Ht9pG0DuL-0~sPe},^\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_note\">\n <field name=\"name\">466</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"I3xB5Q]ehg#-~(sq{[|E\" variabletype=\"\">item</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"8/Ht9pG0DuL-0~sPe},^\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_beat\">\n <field name=\"fraction\">BeatFraction.Sixteenth</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"I3xB5Q]ehg#-~(sq{[|E\" variabletype=\"\">item</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"8/Ht9pG0DuL-0~sPe},^\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_tempo\"></block>\n </value>\n <next>\n <block type=\"device_change_tempo\">\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">1242</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_set_tempo\">\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n</xml>"},{"testName":"serial.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables>\n <variable type=\"\" id=\"3ch~y{k6dWI;q}kA]3pa\">item</variable>\n </variables>\n <block type=\"serial_on_data_received\" x=\"79\" y=\"287\">\n <value name=\"delimiters\">\n <shadow type=\"serial_delimiter_conv\" id=\"Rgi{j+glSZt}8nIn!+08\">\n <field name=\"del\">Delimiters.Colon</field>\n </shadow>\n <block type=\"serial_read_buffer\"></block>\n </value>\n <statement name=\"HANDLER\">\n <block type=\"serial_writeline\">\n <value name=\"text\">\n <shadow type=\"text\" id=\"re1R]taer}HU[ed30FDZ\">\n <field name=\"TEXT\"></field>\n </shadow>\n <block type=\"serial_read_line\"></block>\n </value>\n <next>\n <block type=\"serial_writenumber\">\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <next>\n <block type=\"serial_writevalue\">\n <value name=\"name\">\n <shadow type=\"text\" id=\"Y9NXoV7DPB{.(T=w:ei^\">\n <field name=\"TEXT\">x</field>\n </shadow>\n <block type=\"serial_read_until\">\n <value name=\"delimiter\">\n <shadow type=\"serial_delimiter_conv\">\n <field name=\"del\">Delimiters.Colon</field>\n </shadow>\n </value>\n </block>\n </value>\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <next>\n <block type=\"serial_writestring\">\n <value name=\"text\">\n <shadow type=\"text\">\n <field name=\"TEXT\"></field>\n </shadow>\n </value>\n <next>\n <block type=\"serial_writenumbers\">\n <value name=\"values\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"3ch~y{k6dWI;q}kA]3pa\" variabletype=\"\">item</field>\n </block>\n </value>\n <next>\n <block type=\"serial_redirect\">\n <field name=\"tx\">SerialPin.P12</field>\n <field name=\"rx\">SerialPin.P13</field>\n <field name=\"rate\">BaudRate.BaudRate28800</field>\n <next>\n <block type=\"serial_writebuffer\">\n <value name=\"buffer\">\n <block type=\"serial_readbuffer\">\n <value name=\"length\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">64</field>\n </shadow>\n </value>\n </block>\n </value>\n <next>\n <block type=\"serial_redirect_to_usb\"></block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n</xml>"},{"testName":"test.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\n <variables>\n <variable type=\"\" id=\"2w47B[B-y%SK,+8+DQGz\">booltest</variable>\n <variable type=\"\" id=\"Uv6@%!N7Ts}XI7t+j[zB\">myImage</variable>\n <variable type=\"\" id=\"7BPQp@}m*I210zEM4S=3\">strtest</variable>\n </variables>\n <block type=\"pxt-on-start\" x=\"481\" y=\"68\">\n <statement name=\"HANDLER\">\n <block type=\"device_show_number\">\n <value name=\"number\">\n <shadow type=\"math_number\" id=\")RB0,?b3RM|TO|?[ZPG6\">\n <field name=\"NUM\">123</field>\n </shadow>\n <block type=\"control_event_value&quot;\"></block>\n </value>\n <next>\n <block type=\"device_show_leds\">\n <field name=\"LEDS\">`\n # . . # .\n # . . # .\n . # . . .\n . # # . .\n . . . . .\n `\n </field>\n <next>\n <block type=\"basic_show_icon\">\n <field name=\"i\">IconNames.Heart</field>\n <next>\n <block type=\"device_pause\">\n <value name=\"pause\">\n <shadow type=\"timePicker\">\n <field name=\"ms\">500</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_clear_display\">\n <next>\n <block type=\"basic_show_arrow\">\n <value name=\"i\">\n <shadow type=\"device_arrow\">\n <field name=\"arrow\">ArrowNames.SouthEast</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_show_image_offset\">\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"Uv6@%!N7Ts}XI7t+j[zB\" variabletype=\"\">myImage</field>\n </block>\n </value>\n <value name=\"offset\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_scroll_image\">\n <value name=\"sprite\">\n <block type=\"variables_get\">\n <field name=\"VAR\" id=\"Uv6@%!N7Ts}XI7t+j[zB\" variabletype=\"\">myImage</field>\n </block>\n </value>\n <value name=\"frameoffset\">\n <shadow type=\"math_number\" id=\"xu?]Tdz!8RfpHlMjG)~B\">\n <field name=\"NUM\">1</field>\n </shadow>\n <block type=\"control_device_serial_number\"></block>\n </value>\n <value name=\"delay\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">200</field>\n </shadow>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"7BPQp@}m*I210zEM4S=3\" variabletype=\"\">strtest</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"W]w@ImzxKDQ=.w+$$f4a\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"serial_read_until\">\n <value name=\"delimiter\">\n <shadow type=\"serial_delimiter_conv\">\n <field name=\"del\">Delimiters.Hash</field>\n </shadow>\n </value>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"7BPQp@}m*I210zEM4S=3\" variabletype=\"\">strtest</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"W]w@ImzxKDQ=.w+$$f4a\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"serial_read_buffer\"></block>\n </value>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"device_pin_event\" x=\"2407\" y=\"0\">\n <field name=\"name\">TouchPin.P2</field>\n <statement name=\"HANDLER\">\n <block type=\"device_led_toggle\">\n <value name=\"x\">\n <shadow type=\"math_number_minmax\">\n <mutation min=\"0\" max=\"4\" label=\"X\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">1</field>\n </shadow>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number_minmax\">\n <mutation min=\"0\" max=\"4\" label=\"Y\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">2</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_plot_bar_graph\">\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">5</field>\n </shadow>\n </value>\n <value name=\"high\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">45</field>\n </shadow>\n </value>\n <next>\n <block type=\"led_set_display_mode\">\n <field name=\"mode\">DisplayMode.Greyscale</field>\n <next>\n <block type=\"device_set_analog_pin\">\n <value name=\"name\">\n <shadow type=\"analog_pin\">\n <field name=\"pin\">AnalogPin.P4</field>\n </shadow>\n </value>\n <value name=\"value\">\n <shadow type=\"math_number_minmax\" id=\",:%8N*FL3wa-zFQ[+^$9\">\n <mutation min=\"0\" max=\"1023\" label=\"Value\" precision=\"0\"></mutation>\n <field name=\"SLIDER\">1023</field>\n </shadow>\n <block type=\"device_get_analog_pin\">\n <value name=\"name\">\n <shadow type=\"analog_pin\">\n <field name=\"pin\">AnalogPin.P13</field>\n </shadow>\n </value>\n </block>\n </value>\n <next>\n <block type=\"device_set_digital_pin\">\n <value name=\"name\">\n <shadow type=\"digital_pin\">\n <field name=\"pin\">DigitalPin.P10</field>\n </shadow>\n </value>\n <value name=\"value\">\n <shadow type=\"math_number_minmax\" id=\"W~pvdj%jFEj?EHmT{81Z\">\n <mutation min=\"0\" max=\"1\" label=\"Value\" precision=\"0\"></mutation>\n <field name=\"SLIDER\">0</field>\n </shadow>\n <block type=\"device_get_digital_pin\">\n <value name=\"name\">\n <shadow type=\"digital_pin\">\n <field name=\"pin\">DigitalPin.P15</field>\n </shadow>\n </value>\n </block>\n </value>\n <next>\n <block type=\"device_set_analog_period\">\n <value name=\"pin\">\n <shadow type=\"analog_pin\">\n <field name=\"pin\">AnalogPin.P9</field>\n </shadow>\n </value>\n <value name=\"micros\">\n <shadow type=\"math_number\" id=\"4a@.1MdG`n=p;34mQOpC\">\n <field name=\"NUM\">1234</field>\n </shadow>\n <block type=\"pin_map\">\n <value name=\"value\">\n <shadow type=\"math_number\" id=\"lTWI!)d`ZkwvZW))3X(F\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_temperature\"></block>\n </value>\n <value name=\"fromLow\">\n <shadow type=\"math_number\" id=\"2n.VJ_pD7wFdcjM:FToF\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_heading\"></block>\n </value>\n <value name=\"fromHigh\">\n <shadow type=\"math_number\" id=\"-c^:x{=$`RLP5RW9}{6a\">\n <field name=\"NUM\">1023</field>\n </shadow>\n <block type=\"device_get_rotation\">\n <field name=\"NAME\">Rotation.Roll</field>\n </block>\n </value>\n <value name=\"toLow\">\n <shadow type=\"math_number\" id=\"#1@Uxq:nFqe!(pHawH9H\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_get_magnetic_force\">\n <field name=\"NAME\">Dimension.Y</field>\n </block>\n </value>\n <value name=\"toHigh\">\n <shadow type=\"math_number\" id=\"?%tD/NB|a$cg#TU0/C02\">\n <field name=\"NUM\">4</field>\n </shadow>\n <block type=\"device_get_running_time\"></block>\n </value>\n </block>\n </value>\n <next>\n <block type=\"device_set_servo_pin\">\n <value name=\"name\">\n <shadow type=\"analog_pin\">\n <field name=\"pin\">AnalogPin.P20</field>\n </shadow>\n </value>\n <value name=\"value\">\n <shadow type=\"math_number_minmax\" id=\"xC9lYf`{!gA-A8R+#~L.\">\n <mutation min=\"0\" max=\"180\" label=\"Value\" precision=\"0\"></mutation>\n <field name=\"SLIDER\">180</field>\n </shadow>\n <block type=\"device_acceleration\">\n <field name=\"NAME\">Dimension.Z</field>\n </block>\n </value>\n <next>\n <block type=\"device_set_servo_pulse\">\n <value name=\"value\">\n <shadow type=\"analog_pin\">\n <field name=\"pin\">AnalogPin.P14</field>\n </shadow>\n </value>\n <value name=\"micros\">\n <shadow type=\"math_number\" id=\"@*C3kzJkeeUQ@s$N5?K}\">\n <field name=\"NUM\">1500</field>\n </shadow>\n <block type=\"device_get_light_level\"></block>\n </value>\n <next>\n <block type=\"device_play_note\">\n <value name=\"note\">\n <shadow type=\"device_note\">\n <field name=\"name\">220</field>\n </shadow>\n </value>\n <value name=\"duration\">\n <shadow type=\"device_beat\">\n <field name=\"fraction\">BeatFraction.Sixteenth</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_ring\">\n <value name=\"note\">\n <shadow type=\"device_note\">\n <field name=\"name\">659</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_rest\">\n <value name=\"duration\">\n <shadow type=\"device_beat\">\n <field name=\"fraction\">BeatFraction.Double</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_start_melody\">\n <field name=\"options\">MelodyOptions.ForeverInBackground</field>\n <value name=\"melody\">\n <shadow type=\"device_builtin_melody\">\n <field name=\"melody\">Melodies.Ringtone</field>\n </shadow>\n </value>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"device_gesture_event\" x=\"1570\" y=\"56\">\n <field name=\"NAME\">Gesture.TiltLeft</field>\n <statement name=\"HANDLER\">\n <block type=\"device_unplot\">\n <value name=\"x\">\n <shadow type=\"math_number_minmax\" id=\"|}V%t{K/j77J}J54FX]r\">\n <mutation min=\"0\" max=\"4\" label=\"X\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">1</field>\n </shadow>\n <block type=\"control_event_value_id\">\n <field name=\"id\">EventBusValue.MICROBIT_PIN_EVT_PULSE_HI</field>\n </block>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number_minmax\">\n <mutation min=\"0\" max=\"4\" label=\"Y\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">2</field>\n </shadow>\n </value>\n <next>\n <block type=\"serial_writebuffer\">\n <value name=\"buffer\">\n <shadow type=\"serial_readbuffer\">\n <value name=\"length\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">64</field>\n </shadow>\n </value>\n </shadow>\n </value>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"device_forever\" x=\"1172\" y=\"242\">\n <statement name=\"HANDLER\">\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"2w47B[B-y%SK,+8+DQGz\" variabletype=\"\">booltest</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"RP?w4vFS1wB4I0nNyldb\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_get_button2\">\n <field name=\"NAME\">Button.B</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"2w47B[B-y%SK,+8+DQGz\" variabletype=\"\">booltest</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"RP?w4vFS1wB4I0nNyldb\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_pin_is_pressed\">\n <field name=\"NAME\">TouchPin.P2</field>\n </block>\n </value>\n <next>\n <block type=\"variables_set\">\n <field name=\"VAR\" id=\"2w47B[B-y%SK,+8+DQGz\" variabletype=\"\">booltest</field>\n <value name=\"VALUE\">\n <shadow type=\"math_number\" id=\"RP?w4vFS1wB4I0nNyldb\">\n <field name=\"NUM\">0</field>\n </shadow>\n <block type=\"device_point\">\n <value name=\"x\">\n <shadow type=\"math_number_minmax\">\n <mutation min=\"0\" max=\"4\" label=\"X\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">3</field>\n </shadow>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number_minmax\">\n <mutation min=\"0\" max=\"4\" label=\"Y\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">4</field>\n </shadow>\n </value>\n </block>\n </value>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"device_button_event\" x=\"1294\" y=\"513\">\n <field name=\"NAME\">Button.AB</field>\n <statement name=\"HANDLER\">\n <block type=\"device_plot\">\n <value name=\"x\">\n <shadow type=\"math_number_minmax\" id=\"Z[BsF}r)3:FoNWE|X5}s\">\n <mutation min=\"0\" max=\"4\" label=\"X\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">1</field>\n </shadow>\n <block type=\"device_beat\">\n <field name=\"fraction\">BeatFraction.Sixteenth</field>\n </block>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number_minmax\">\n <mutation min=\"0\" max=\"4\" label=\"Y\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">2</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_plot_brightness\">\n <value name=\"x\">\n <shadow type=\"math_number_minmax\" id=\"2we6or2Y|vhAl!^BAYtl\">\n <mutation min=\"0\" max=\"4\" label=\"X\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">3</field>\n </shadow>\n <block type=\"device_tempo\"></block>\n </value>\n <value name=\"y\">\n <shadow type=\"math_number_minmax\">\n <mutation min=\"0\" max=\"4\" label=\"Y\" precision=\"1\"></mutation>\n <field name=\"SLIDER\">5</field>\n </shadow>\n </value>\n <value name=\"brightness\">\n <shadow type=\"math_number_minmax\" id=\"IjJTgf5z!,K`qd`~pCB3\">\n <mutation min=\"0\" max=\"255\" label=\"Brightness\" precision=\"0\"></mutation>\n <field name=\"SLIDER\">255</field>\n </shadow>\n <block type=\"device_get_brightness\"></block>\n </value>\n <next>\n <block type=\"device_set_brightness\">\n <value name=\"value\">\n <shadow type=\"math_number_minmax\" id=\"WAUzdT@1z{%:UNn!_dU(\">\n <mutation min=\"0\" max=\"255\" label=\"Value\" precision=\"0\"></mutation>\n <field name=\"SLIDER\">255</field>\n </shadow>\n <block type=\"device_note\">\n <field name=\"name\">440</field>\n </block>\n </value>\n <next>\n <block type=\"device_stop_animation\">\n <next>\n <block type=\"device_led_enable\">\n <value name=\"on\">\n <shadow type=\"logic_boolean\">\n <field name=\"BOOL\">TRUE</field>\n </shadow>\n </value>\n <next>\n <block type=\"input_compass_calibrate\"></block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"control_in_background\" x=\"0\" y=\"635\">\n <statement name=\"HANDLER\">\n <block type=\"control_wait_us\">\n <value name=\"micros\">\n <shadow type=\"math_number\" id=\"^!;AKS(vo=ly}ykm1~Z|\">\n <field name=\"NUM\">4</field>\n </shadow>\n <block type=\"control_event_timestamp&quot;\"></block>\n </value>\n <next>\n <block type=\"control_raise_event\">\n <value name=\"src\">\n <shadow type=\"control_event_source_id\">\n <field name=\"id\">EventBusSource.MICROBIT_ID_IO_P0</field>\n </shadow>\n </value>\n <value name=\"value\">\n <shadow type=\"control_event_value_id\">\n <field name=\"id\">EventBusValue.MES_ALERT_EVT_ALARM1</field>\n </shadow>\n </value>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"device_pin_released\" x=\"942\" y=\"723\">\n <field name=\"NAME\">TouchPin.P2</field>\n <statement name=\"HANDLER\">\n <block type=\"device_set_accelerometer_range\">\n <field name=\"range\">AcceleratorRange.EightG</field>\n </block>\n </statement>\n </block>\n <block type=\"serial_on_data_received\" x=\"419\" y=\"933\">\n <value name=\"delimiters\">\n <shadow type=\"serial_delimiter_conv\">\n <field name=\"del\">Delimiters.Colon</field>\n </shadow>\n </value>\n <statement name=\"HANDLER\">\n <block type=\"serial_redirect\">\n <field name=\"tx\">SerialPin.P12</field>\n <field name=\"rx\">SerialPin.P14</field>\n <field name=\"rate\">BaudRate.BaudRate19200</field>\n <next>\n <block type=\"serial_redirect_to_usb\"></block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"pins_on_pulsed\" x=\"1538\" y=\"929\">\n <value name=\"pin\">\n <shadow type=\"digital_pin\">\n <field name=\"pin\">DigitalPin.P10</field>\n </shadow>\n </value>\n <field name=\"pulse\">PulseValue.Low</field>\n <statement name=\"HANDLER\">\n <block type=\"i2c_writenumber\">\n <field name=\"format\">NumberFormat.UInt8BE</field>\n <value name=\"address\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <value name=\"repeat\">\n <shadow type=\"logic_boolean\">\n <field name=\"BOOL\">FALSE</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_analog_pitch\">\n <value name=\"frequency\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <value name=\"ms\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_set_pin_events\">\n <value name=\"pin\">\n <shadow type=\"digital_pin\">\n <field name=\"pin\">DigitalPin.P0</field>\n </shadow>\n </value>\n <field name=\"type\">PinEventType.Touch</field>\n <next>\n <block type=\"spi_frequency\">\n <value name=\"frequency\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">1000000</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_analog_set_pitch_pin\">\n <value name=\"name\">\n <shadow type=\"analog_pin\">\n <field name=\"pin\">AnalogPin.P2</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_set_pull\">\n <value name=\"pin\">\n <shadow type=\"digital_pin\">\n <field name=\"pin\">DigitalPin.P2</field>\n </shadow>\n </value>\n <field name=\"pull\">PinPullMode.PullDown</field>\n <next>\n <block type=\"spi_format\">\n <value name=\"bits\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">8</field>\n </shadow>\n </value>\n <value name=\"mode\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">3</field>\n </shadow>\n </value>\n <next>\n <block type=\"spi_pins\">\n <value name=\"mosi\">\n <shadow type=\"digital_pin\">\n <field name=\"pin\">DigitalPin.P9</field>\n </shadow>\n </value>\n <value name=\"miso\">\n <shadow type=\"digital_pin\">\n <field name=\"pin\">DigitalPin.P14</field>\n </shadow>\n </value>\n <value name=\"sck\">\n <shadow type=\"digital_pin\">\n <field name=\"pin\">DigitalPin.P16</field>\n </shadow>\n </value>\n <next>\n <block type=\"control_reset\"></block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"melody_on_event\" x=\"859\" y=\"1002\">\n <field name=\"value\">MusicEvent.BackgroundMelodyNotePlayed</field>\n <statement name=\"HANDLER\">\n <block type=\"device_change_tempo\">\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">123</field>\n </shadow>\n </value>\n <next>\n <block type=\"device_set_tempo\">\n <value name=\"value\">\n <shadow type=\"math_number_minmax\">\n <mutation min=\"4\" max=\"400\" label=\"Bpm\" precision=\"0\"></mutation>\n <field name=\"SLIDER\">12312312</field>\n </shadow>\n </value>\n <next>\n <block type=\"serial_writeline\">\n <value name=\"text\">\n <shadow type=\"text\" id=\"SYl:x9lxu0KI{YcmomQz\">\n <field name=\"TEXT\"></field>\n </shadow>\n <block type=\"serial_read_line\"></block>\n </value>\n <next>\n <block type=\"serial_writenumber\">\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <next>\n <block type=\"serial_writevalue\">\n <value name=\"name\">\n <shadow type=\"text\">\n <field name=\"TEXT\">x</field>\n </shadow>\n </value>\n <value name=\"value\">\n <shadow type=\"math_number\">\n <field name=\"NUM\">0</field>\n </shadow>\n </value>\n <next>\n <block type=\"serial_writestring\">\n <value name=\"text\">\n <shadow type=\"text\" id=\"_gp`6rz8ZI+em9ILvR~6\">\n <field name=\"TEXT\"></field>\n </shadow>\n <block type=\"control_device_name\"></block>\n </value>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </next>\n </block>\n </statement>\n </block>\n <block type=\"control_on_event\" x=\"24\" y=\"1406\">\n <value name=\"src\">\n <shadow type=\"control_event_source_id\">\n <field name=\"id\">EventBusSource.MICROBIT_ID_IO_P1</field>\n </shadow>\n </value>\n <value name=\"value\">\n <shadow type=\"control_event_value_id\">\n <field name=\"id\">EventBusValue.MES_ALERT_EVT_ALARM2</field>\n </shadow>\n </value>\n </block>\n</xml>"},{"testName":"pins.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\r\n <block type=\"pins_on_pulsed\" x=\"-157\" y=\"130\">\r\n <value name=\"pin\">\r\n <shadow type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P5</field>\r\n </shadow>\r\n </value>\r\n <field name=\"pulse\">PulseValue.Low</field>\r\n <statement name=\"HANDLER\">\r\n <block type=\"device_set_analog_pin\">\r\n <value name=\"name\">\r\n <shadow type=\"analog_pin\">\r\n <field name=\"pin\">AnalogPin.P9</field>\r\n </shadow>\r\n </value>\r\n <value name=\"value\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">5</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"device_set_analog_period\">\r\n <value name=\"pin\">\r\n <shadow type=\"analog_pin\">\r\n <field name=\"pin\">AnalogPin.P10</field>\r\n </shadow>\r\n </value>\r\n <value name=\"micros\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">20000</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"device_set_digital_pin\">\r\n <value name=\"name\">\r\n <shadow type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P6</field>\r\n </shadow>\r\n </value>\r\n <value name=\"value\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">5</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"device_set_servo_pin\">\r\n <value name=\"name\">\r\n <shadow type=\"analog_pin\">\r\n <field name=\"pin\">AnalogPin.P13</field>\r\n </shadow>\r\n </value>\r\n <value name=\"value\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">5</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"device_set_servo_pulse\">\r\n <value name=\"value\">\r\n <shadow type=\"analog_pin\">\r\n <field name=\"pin\">AnalogPin.P8</field>\r\n </shadow>\r\n </value>\r\n <value name=\"micros\">\r\n <shadow type=\"math_number\" id=\"Hx4bpmg|8KSH=b_`+XtP\">\r\n <field name=\"NUM\">1500</field>\r\n </shadow>\r\n <block type=\"math_map\">\r\n <value name=\"value\">\r\n <shadow type=\"math_number\" id=\"J%8`=~h4-?O{fY59%(_{\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n <block type=\"pins_i2c_readnumber\">\r\n <field name=\"format\">NumberFormat.Int8BE</field>\r\n <value name=\"address\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n </value>\r\n <value name=\"repeat\">\r\n <shadow type=\"logic_boolean\">\r\n <field name=\"BOOL\">FALSE</field>\r\n </shadow>\r\n </value>\r\n </block>\r\n </value>\r\n <value name=\"fromLow\">\r\n <shadow type=\"math_number\" id=\"kp(!mScnCVWI/1_X|ar#\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n <block type=\"pins_pulse_in\">\r\n <value name=\"name\">\r\n <shadow type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P9</field>\r\n </shadow>\r\n </value>\r\n <field name=\"value\">PulseValue.Low</field>\r\n </block>\r\n </value>\r\n <value name=\"fromHigh\">\r\n <shadow type=\"math_number\" id=\"]@F=`[ZuxAk,=05Yyn[{\">\r\n <field name=\"NUM\">1023</field>\r\n </shadow>\r\n <block type=\"pins_pulse_duration\"></block>\r\n </value>\r\n <value name=\"toLow\">\r\n <shadow type=\"math_number\" id=\"sJDL?hoabUE)cDdBJWO=\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n <block type=\"spi_write\">\r\n <value name=\"value\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n </value>\r\n </block>\r\n </value>\r\n <value name=\"toHigh\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">4</field>\r\n </shadow>\r\n </value>\r\n </block>\r\n </value>\r\n <next>\r\n <block type=\"i2c_writenumber\">\r\n <field name=\"format\">NumberFormat.Int16BE</field>\r\n <value name=\"address\">\r\n <shadow type=\"math_number\" id=\"RjJ{^G_#*rwUqER:]i-L\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n <block type=\"device_get_digital_pin\">\r\n <value name=\"name\">\r\n <shadow type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P9</field>\r\n </shadow>\r\n </value>\r\n </block>\r\n </value>\r\n <value name=\"value\">\r\n <shadow type=\"math_number\" id=\"CCl{zdVU/!(bR}aUfG,G\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n <block type=\"device_get_analog_pin\">\r\n <value name=\"name\">\r\n <shadow type=\"analog_pin\">\r\n <field name=\"pin\">AnalogPin.P9</field>\r\n </shadow>\r\n </value>\r\n </block>\r\n </value>\r\n <value name=\"repeat\">\r\n <shadow type=\"logic_boolean\">\r\n <field name=\"BOOL\">FALSE</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"spi_pins\">\r\n <value name=\"mosi\">\r\n <shadow type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P11</field>\r\n </shadow>\r\n </value>\r\n <value name=\"miso\">\r\n <shadow type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P9</field>\r\n </shadow>\r\n </value>\r\n <value name=\"sck\">\r\n <shadow type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P10</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"device_set_pull\">\r\n <value name=\"pin\">\r\n <shadow type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P9</field>\r\n </shadow>\r\n </value>\r\n <field name=\"pull\">PinPullMode.PullDown</field>\r\n <next>\r\n <block type=\"device_analog_pitch\">\r\n <value name=\"frequency\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n </value>\r\n <value name=\"ms\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">0</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"device_set_pin_events\">\r\n <value name=\"pin\">\r\n <shadow type=\"digital_pin\">\r\n <field name=\"pin\">DigitalPin.P8</field>\r\n </shadow>\r\n </value>\r\n <field name=\"type\">PinEventType.Touch</field>\r\n <next>\r\n <block type=\"device_analog_set_pitch_pin\">\r\n <value name=\"name\">\r\n <shadow type=\"analog_pin\">\r\n <field name=\"pin\">AnalogPin.P9</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"spi_format\">\r\n <value name=\"bits\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">8</field>\r\n </shadow>\r\n </value>\r\n <value name=\"mode\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">3</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"spi_format\">\r\n <value name=\"bits\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">8</field>\r\n </shadow>\r\n </value>\r\n <value name=\"mode\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">3</field>\r\n </shadow>\r\n </value>\r\n <next>\r\n <block type=\"spi_frequency\">\r\n <value name=\"frequency\">\r\n <shadow type=\"math_number\">\r\n <field name=\"NUM\">1000000</field>\r\n </shadow>\r\n </value>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </next>\r\n </block>\r\n </statement>\r\n </block>\r\n</xml>"}]}],"commonTests":[]}
package/built/editor.js CHANGED
@@ -4032,9 +4032,11 @@ function patchBlocks(pkgTargetVersion, dom) {
4032
4032
  .forEach(oldPinNode => {
4033
4033
  const valueNode = node.ownerDocument.createElement("value");
4034
4034
  valueNode.setAttribute("name", oldPinNode.getAttribute("name"));
4035
+ let nodeText = oldPinNode.textContent;
4035
4036
  const pinShadowNode = node.ownerDocument.createElement("shadow");
4037
+ const [enumName, pinName] = nodeText.split(".");
4036
4038
  let pinBlockType;
4037
- switch (oldPinNode.textContent.split(".")[0]) {
4039
+ switch (enumName) {
4038
4040
  case "DigitalPin":
4039
4041
  pinBlockType = "digital_pin_shadow";
4040
4042
  break;
@@ -4044,10 +4046,24 @@ function patchBlocks(pkgTargetVersion, dom) {
4044
4046
  }
4045
4047
  if (!pinBlockType)
4046
4048
  return;
4049
+ // If this is one of the read/write pins, narrow to the read write shadow
4050
+ if (blockType === "device_get_analog_pin") {
4051
+ switch (pinName) {
4052
+ case "P0":
4053
+ case "P1":
4054
+ case "P2":
4055
+ case "P3":
4056
+ case "P4":
4057
+ case "P10":
4058
+ pinBlockType = "analog_read_write_pin_shadow";
4059
+ nodeText = `AnalogReadWritePin.${pinName}`;
4060
+ break;
4061
+ }
4062
+ }
4047
4063
  pinShadowNode.setAttribute("type", pinBlockType);
4048
4064
  const fieldNode = node.ownerDocument.createElement("field");
4049
4065
  fieldNode.setAttribute("name", "pin");
4050
- fieldNode.textContent = oldPinNode.textContent;
4066
+ fieldNode.textContent = nodeText;
4051
4067
  pinShadowNode.appendChild(fieldNode);
4052
4068
  valueNode.appendChild(pinShadowNode);
4053
4069
  node.replaceChild(valueNode, oldPinNode);
@@ -1 +1 @@
1
- {"A Blocks / JavaScript code editor for the micro:bit powered by Microsoft MakeCode.":"A Blocks / JavaScript code editor for the micro:bit powered by Microsoft MakeCode.","A micro-servo library":"A micro-servo library","Adds new blocks for message communication in the radio category":"Adds new blocks for message communication in the radio category","BETA - Camera, remote control and other Bluetooth services. App required.":"BETA - Camera, remote control and other Bluetooth services. App required.","Behind the MakeCode Hardware":"Behind the MakeCode Hardware","Blocks to JavaScript":"Blocks to JavaScript","Bluetooth services":"Bluetooth services","Buy":"Buy","Can't import microbit.co.uk scripts...":"Can't import microbit.co.uk scripts...","Coding Cards":"Coding Cards","Coding for Teachers":"Coding for Teachers","Color manipulation":"Color manipulation","Courses":"Courses","Data logging to flash memory. micro:bit (V2) only.":"Data logging to flash memory. micro:bit (V2) only.","Data logging to flash.":"Data logging to flash.","Deep Dive":"Deep Dive","Disable Bluetooth Event Service":"Disable Bluetooth Event Service","Download cancelled":"Download cancelled","Download failed, please try again":"Download failed, please try again","Download for V2 only":"Download for V2 only","Fashion":"Fashion","Fonts for displays (V2 only).":"Fonts for displays (V2 only).","Games":"Games","Go Back":"Go Back","Go to the old editor":"Go to the old editor","Great coding skills! Unfortunately, your program is too large to fit on a micro:bit V1😢. You can go back and try to make your program smaller, or you can download your program onto a micro:bit V2.":"Great coding skills! Unfortunately, your program is too large to fit on a micro:bit V1😢. You can go back and try to make your program smaller, or you can download your program onto a micro:bit V2.","Great coding skills! Unfortunately, your program is too large to fit on a micro:bit V2😢. You can go back and try to make your program smaller, or continue to use the simulator to run your code.":"Great coding skills! Unfortunately, your program is too large to fit on a micro:bit V2😢. You can go back and try to make your program smaller, or continue to use the simulator to run your code.","Hardware":"Hardware","Importing microbit.co.uk programs is not supported in this editor anymore. Please open this script in the https://makecode.microbit.org/v0 editor.":"Importing microbit.co.uk programs is not supported in this editor anymore. Please open this script in the https://makecode.microbit.org/v0 editor.","Jacdac":"Jacdac","JustWorks pairing (default): Pairing is automatic once the pairing is initiated.":"JustWorks pairing (default): Pairing is automatic once the pairing is initiated.","Live Coding":"Live Coding","MicroCode for the new micro:bit (V2)":"MicroCode for the new micro:bit (V2)","Microsoft MakeCode for micro:bit":"Microsoft MakeCode for micro:bit","Music":"Music","New? Start here!":"New? Start here!","No Pairing Required: Anyone can connect via Bluetooth.":"No Pairing Required: Anyone can connect via Bluetooth.","Oops, there was a problem downloading your code":"Oops, there was a problem downloading your code","Passkey pairing: Pairing requires 6 digit key to pair.":"Passkey pairing: Pairing requires 6 digit key to pair.","Radio Games":"Radio Games","Record sound clips. micro:bit (V2) only":"Record sound clips. micro:bit (V2) only","Reference":"Reference","Science":"Science","Science Experiments":"Science Experiments","Settings storage in internal flash":"Settings storage in internal flash","Support":"Support","The microbit core library":"The microbit core library","The microphone library":"The microphone library","The radio services":"The radio services","Tools":"Tools","Toys":"Toys","Turtle":"Turtle","Tutorials":"Tutorials","Tutorials for the new micro:bit (V2)":"Tutorials for the new micro:bit (V2)","makecode.microbit.org":"makecode.microbit.org","{0} is a write only analog pin":"{0} is a write only analog pin","{id:extension-tag}Gaming":"Gaming","{id:extension-tag}Lights and Display":"Lights and Display","{id:extension-tag}Networking":"Networking","{id:extension-tag}Robotics":"Robotics","{id:extension-tag}Science":"Science","{id:extension-tag}Software":"Software","{id:type}Image":"Image","{id:type}LedSprite":"LedSprite","{id:var}image":"image","{id:var}sprite":"sprite"}
1
+ {"A Blocks / JavaScript code editor for the micro:bit powered by Microsoft MakeCode.":"A Blocks / JavaScript code editor for the micro:bit powered by Microsoft MakeCode.","A micro-servo library":"A micro-servo library","Adds new blocks for message communication in the radio category":"Adds new blocks for message communication in the radio category","BETA - Camera, remote control and other Bluetooth services. App required.":"BETA - Camera, remote control and other Bluetooth services. App required.","Behind the MakeCode Hardware":"Behind the MakeCode Hardware","Blocks to JavaScript":"Blocks to JavaScript","Bluetooth services":"Bluetooth services","Buy":"Buy","Can't import microbit.co.uk scripts...":"Can't import microbit.co.uk scripts...","Coding Cards":"Coding Cards","Coding for Teachers":"Coding for Teachers","Color manipulation":"Color manipulation","Courses":"Courses","Data logging to flash memory. micro:bit (V2) only.":"Data logging to flash memory. micro:bit (V2) only.","Data logging to flash.":"Data logging to flash.","Deep Dive":"Deep Dive","Disable Bluetooth Event Service":"Disable Bluetooth Event Service","Download cancelled":"Download cancelled","Download failed, please try again":"Download failed, please try again","Download for V2 only":"Download for V2 only","Fashion":"Fashion","Games":"Games","Go Back":"Go Back","Go to the old editor":"Go to the old editor","Great coding skills! Unfortunately, your program is too large to fit on a micro:bit V1😢. You can go back and try to make your program smaller, or you can download your program onto a micro:bit V2.":"Great coding skills! Unfortunately, your program is too large to fit on a micro:bit V1😢. You can go back and try to make your program smaller, or you can download your program onto a micro:bit V2.","Great coding skills! Unfortunately, your program is too large to fit on a micro:bit V2😢. You can go back and try to make your program smaller, or continue to use the simulator to run your code.":"Great coding skills! Unfortunately, your program is too large to fit on a micro:bit V2😢. You can go back and try to make your program smaller, or continue to use the simulator to run your code.","Hardware":"Hardware","Importing microbit.co.uk programs is not supported in this editor anymore. Please open this script in the https://makecode.microbit.org/v0 editor.":"Importing microbit.co.uk programs is not supported in this editor anymore. Please open this script in the https://makecode.microbit.org/v0 editor.","Jacdac":"Jacdac","JustWorks pairing (default): Pairing is automatic once the pairing is initiated.":"JustWorks pairing (default): Pairing is automatic once the pairing is initiated.","Live Coding":"Live Coding","MicroCode for the new micro:bit (V2)":"MicroCode for the new micro:bit (V2)","Microsoft MakeCode for micro:bit":"Microsoft MakeCode for micro:bit","Music":"Music","New? Start here!":"New? Start here!","No Pairing Required: Anyone can connect via Bluetooth.":"No Pairing Required: Anyone can connect via Bluetooth.","Oops, there was a problem downloading your code":"Oops, there was a problem downloading your code","Passkey pairing: Pairing requires 6 digit key to pair.":"Passkey pairing: Pairing requires 6 digit key to pair.","Radio Games":"Radio Games","Record sound clips. micro:bit (V2) only":"Record sound clips. micro:bit (V2) only","Reference":"Reference","Science":"Science","Science Experiments":"Science Experiments","Settings storage in internal flash":"Settings storage in internal flash","Support":"Support","The microbit core library":"The microbit core library","The microphone library":"The microphone library","The radio services":"The radio services","Tools":"Tools","Toys":"Toys","Turtle":"Turtle","Tutorials":"Tutorials","Tutorials for the new micro:bit (V2)":"Tutorials for the new micro:bit (V2)","makecode.microbit.org":"makecode.microbit.org","{0} is a write only analog pin":"{0} is a write only analog pin","{id:extension-tag}Gaming":"Gaming","{id:extension-tag}Lights and Display":"Lights and Display","{id:extension-tag}Networking":"Networking","{id:extension-tag}Robotics":"Robotics","{id:extension-tag}Science":"Science","{id:extension-tag}Software":"Software","{id:type}Image":"Image","{id:type}LedSprite":"LedSprite","{id:var}image":"image","{id:var}sprite":"sprite"}