pxt-microbit
Version:
micro:bit target for Microsoft MakeCode (PXT)
1 lines • 84.4 kB
JavaScript
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"\"></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"\"></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":"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":"pins.blocks","contents":"<xml xmlns=\"http://www.w3.org/1999/xhtml\">\r\n <block type=\"pins_on_pulsed\" x=\"-157\" y=\"130\">\r\n <field name=\"pin\">DigitalPin.P10</field>\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":"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":"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":"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=\"N