1 line
6.5 KiB
XML
1 line
6.5 KiB
XML
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="controls_whileUntil" id="g;$:Hz44d0bpPx)2m^3w" x="-2150" y="-615"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="N=b82B34a*:,H0Nv[C5M"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="controls_if" id="nNfbe=QLrs8h;kq8pHCP"><value name="IF0"><block type="sensor_mixgo_button_was_pressed" id="AEd8FhZGQ|T}?DTT_7fx"><value name="btn"><shadow type="pins_button" id="5zQA_rMd~=b?#z7!B$0k"><field name="PIN">button_a</field></shadow></value></block></value><statement name="DO0"><block type="storage_fileopen" id="iJFC=j};yWfZ9`VT,;v["><field name="MODE">w</field><value name="FILENAME"><shadow type="text" id="}tBHUA#c-o}gv_b,{uWC"><field name="TEXT">/test.txt</field></shadow></value><value name="FILE"><shadow type="variables_get" id="m$@qj)gQ?FthjEo:tFp!"><field name="VAR">f</field></shadow></value><next><block type="controls_forEach" id="@1YFzn0$]=:gdWRD]$D1"><value name="LIST"><shadow type="list_many_input" id="DhL8Ta~,^)Q!)6yDWxHj"><field name="CONTENT">0,1,2,3</field></shadow><block type="controls_range" id="+AOd]a!O2{c{;bwB,cIK"><value name="FROM"><shadow type="math_number" id="WAGqcC!zdGR}B{HmUw2i"><field name="NUM">0</field></shadow></value><value name="TO"><shadow type="math_number" id="hbV;8D.Zn6[285iK`Uc#"><field name="NUM">100</field></shadow></value><value name="STEP"><shadow type="math_number" id="hb;G+:K,-MRod`tA!6Ke"><field name="NUM">1</field></shadow></value></block></value><value name="VAR"><shadow type="variables_get" id="b3y[0_6tlmQ+R6.1MX;C"><field name="VAR">x</field></shadow></value><statement name="DO"><block type="variables_set" id="nMGuLSiCx|j?#vlKox`t"><field name="VAR">d</field><value name="VALUE"><block type="sensor_sound" id="Je=L#J4*t-etpjOp`D$J"></block></value><next><block type="controls_forEach" id="V.sFky(7/C;1H.m$Q]lY"><value name="LIST"><shadow type="list_many_input" id="Duizk*WNo3rhME?=g(j_"><field name="CONTENT">0,1,2,3</field></shadow><block type="controls_range" id="3Bs1yi@!KxO8uG9kq6QK"><value name="FROM"><shadow type="math_number" id="F$!=SOidcMVJ9Z{COVu-"><field name="NUM">11</field></shadow></value><value name="TO"><shadow type="math_number" id="=]k)Gtrpw=mub(kKy/y]"><field name="NUM">5</field></shadow><block type="text_to_number" id="=)uT$KJ.^=t8F$W48;bR"><field name="TOWHAT">int</field><value name="VAR"><shadow type="variables_get" id="R6GO_$`{U`}h0Mo8x_eL"><field name="VAR">x</field></shadow><block type="math_map" id="tQN!DGuCYK^yv)rTRh]v"><value name="NUM"><shadow type="math_number" id="-*Y@/_Xv7`69ppElx:dE"><field name="NUM">50</field></shadow><block type="variables_get" id="v.f#.wOM:?jvC?[na$j~"><field name="VAR">d</field></block></value><value name="fromLow"><shadow type="math_number" id="}x9H8o3ID(oYPGqPX;-1"><field name="NUM">0</field></shadow></value><value name="fromHigh"><shadow type="math_number" id="njkOWuk96IST@D@W0PY~"><field name="NUM">10000</field></shadow></value><value name="toLow"><shadow type="math_number" id="2-K][1DYaVe-jDiie,sC"><field name="NUM">11</field></shadow></value><value name="toHigh"><shadow type="math_number" id="`Z7M|oj_Kp855oG13izg"><field name="NUM">0</field></shadow></value></block></value></block></value><value name="STEP"><shadow type="math_number" id="JG.H7]+;@[2Zc$_8]$aV"><field name="NUM">-1</field></shadow></value></block></value><value name="VAR"><shadow type="variables_get" id="6BIKUso-bT:Sy/|ocm;U"><field name="VAR">i</field></shadow></value><statement name="DO"><block type="display_bright_point" id="U!#4Hzk!bLo{qhtP}B6}"><value name="x"><shadow type="pins_exlcdh" id="yti9gs}OSP2puKA(clS/"><field name="PIN">11</field></shadow></value><value name="y"><shadow type="pins_exlcdv" id="nx7]*dYH#KFEg{N9YGgt"><field name="PIN">0</field></shadow><block type="variables_get" id="G{fI~}.*KfHn#YVjFi?J"><field name="VAR">i</field></block></value><value name="STAT"><shadow type="display_onoff" id="k2x?K2a_[G~45pUvdN}C"><field name="ONOFF">ON</field></shadow></value></block></statement><next><block type="display_shift" id="81j/pdOj8v@)Sbu4OUU{"><field name="OP">shift_left</field><value name="val"><shadow type="math_number" id="i]xnurGaS6L8_]h__Id^"><field name="NUM">1</field></shadow></value><next><block type="storage_file_write" id="CbI;X1}kFawqgq(@u=;="><value name="data"><shadow type="text" id="+EZ].[5#8V7`hKA)OObo"><field name="TEXT">Mixly</field></shadow><block type="number_to_text" id="sm///s)FO-HH$R*J3.vQ"><value name="VAR"><shadow type="variables_get" id="4H4hQx[C}2~V_yp3F#=Y"><field name="VAR">x</field></shadow><block type="text_to_number" id=")8u5O8vDB~HtezufL70t"><field name="TOWHAT">int</field><value name="VAR"><shadow type="variables_get" id="tfo6K9,JX*+eb7ujlWVp"><field name="VAR">x</field></shadow><block type="variables_get" id="`H=(*O{]OdrG?V!U0PC}"><field name="VAR">d</field></block></value></block></value></block></value><value name="FILE"><shadow type="variables_get" id="lm2rdh,Ut^6?PVt2iHFK"><field name="VAR">f</field></shadow></value><next><block type="storage_file_write" id=",1gWu#|x)mhM,Fa_,$mh"><value name="data"><shadow type="text" id=";F@!$0hpT:t/zUvQFgv6"><field name="TEXT">Mixly</field></shadow><block type="ascii_to_char" id="Hen~P!3QO;gEgj1)/=Y~"><value name="VAR"><shadow type="math_number" id="fBh9OO9C[[k{R3b{UEsV"><field name="NUM">10</field></shadow></value></block></value><value name="FILE"><shadow type="variables_get" id=";`0_`$!v!q_[^)`9,(-B"><field name="VAR">f</field></shadow></value></block></next></block></next></block></next></block></next></block></statement><next><block type="storage_close_file" id="Vi6s|!RE;UT@K$7!r`so"><value name="FILE"><shadow type="variables_get" id="=I/c5{H$6;9]Q;Qa3Yrr"><field name="VAR">f</field></shadow></value></block></next></block></next></block></statement></block></statement></block></xml><config>{}</config><code>aW1wb3J0IGZlaXlpCmZyb20gZmVpeWkgaW1wb3J0IG9uYm9hcmRfc291bmQKZnJvbSBtaXhweSBpbXBvcnQgbWF0aF9tYXAKZnJvbSBmZWl5aSBpbXBvcnQgb25ib2FyZF9tYXRyaXgKCgp3aGlsZSBUcnVlOgogICAgaWYgZmVpeWkuYnV0dG9uX2Eud2FzX3ByZXNzZWQoKToKICAgICAgICBmID0gb3BlbignL3Rlc3QudHh0JywgJ3cnKQogICAgICAgIGZvciB4IGluIHJhbmdlKDAsIDEwMCwgMSk6CiAgICAgICAgICAgIGQgPSBvbmJvYXJkX3NvdW5kLnJlYWQoKQogICAgICAgICAgICBmb3IgaSBpbiByYW5nZSgxMSwgaW50KChtYXRoX21hcChkLCAwLCAxMDAwMCwgMTEsIDApKSksIC0xKToKICAgICAgICAgICAgICAgIG9uYm9hcmRfbWF0cml4LnBpeGVsKGludCgxMSksIGludChpKSwgMSkKICAgICAgICAgICAgICAgIG9uYm9hcmRfbWF0cml4LnNob3coKQogICAgICAgICAgICBvbmJvYXJkX21hdHJpeC5zaGlmdF9sZWZ0KDEpCiAgICAgICAgICAgIGYud3JpdGUoc3RyKGludChkKSkpCiAgICAgICAgICAgIGYud3JpdGUoY2hyKDEwKSkKICAgICAgICBmLmNsb3NlKCkK</code> |