1 line
13 KiB
XML
1 line
13 KiB
XML
<xml version="Mixly 2.0 rc4" board="MixGo CE@MixGo CE"><block type="controls_whileUntil" id="5#XDsAdZ9oKad#S#,6+N" x="-2150" y="-615"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="0S3]~?97=B(-/m_wC({M"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="controls_if" id="59Vi9Rf8G1cUqI9GD.8="><value name="IF0"><block type="sensor_mixgo_button_was_pressed" id="8/F.hZ0LJo5RzCYQ2!+5"><value name="btn"><shadow type="pins_button" id="gr]U.JX8T+:,taHq+c)d"><field name="PIN">B1key</field></shadow></value></block></value><statement name="DO0"><block type="actuator_led_bright" id="AAiRMz_[=:U+[_S`Wq_6"><value name="led"><shadow type="number" id="Df9C?=z^,7!8a{!5^Ckk"><field name="op">1</field></shadow></value><value name="bright"><shadow type="ledswitch" id="RMiSlO61}HUAWOc)Jp6)"><field name="flag">1</field></shadow></value><next><block type="storage_fileopen" id="1T!7-[I)?-7RH9x0w{j9"><field name="MODE">w</field><value name="FILENAME"><shadow type="text" id="4oQx}NZJ[UO33:t+2/eW"><field name="TEXT">/test.txt</field></shadow></value><value name="FILE"><shadow type="variables_get" id="-WFWZ9hbW.NozT@S/kqF"><field name="VAR">f</field></shadow></value><next><block type="controls_forEach" id=",qZ.F7lPKEH$6hQ{;?6k"><value name="LIST"><shadow type="list_many_input" id="2[Ft:FT/*cyUHiq~R)RI"><field name="CONTENT">0,1,2,3</field></shadow><block type="controls_range" id="X4Jn/Pe$dI3Rt@Uu{,+."><value name="FROM"><shadow type="math_number" id="knFaf59D=gw2(zt=.8}V"><field name="NUM">0</field></shadow></value><value name="TO"><shadow type="math_number" id="VUg~:S-kSwkQ4FEo$v[~"><field name="NUM">100</field></shadow></value><value name="STEP"><shadow type="math_number" id="b:euVJ,5~nx$L8,]kfVd"><field name="NUM">1</field></shadow></value></block></value><value name="VAR"><shadow type="variables_get" id="N4p{9blU4H=p(aPwR9b+"><field name="VAR">x</field></shadow></value><statement name="DO"><block type="variables_set" id="QJ5C^bzVQcX]rNrk=ekS"><field name="VAR">d</field><value name="VALUE"><block type="sensor_sound" id="m58?,eyx^dZppl9xG?w?"></block></value><next><block type="controls_forEach" id="W#64?j0S)|Nf4`C_yP:g"><value name="LIST"><shadow type="list_many_input" id="wK]pnB7ge1dJR=:vx)C5"><field name="CONTENT">0,1,2,3</field></shadow><block type="controls_range" id="5~4#)l!_g9S$2t~T`Z#`"><value name="FROM"><shadow type="math_number" id="S-u)vZ_4V2Nh:[{D]5X7"><field name="NUM">7</field></shadow></value><value name="TO"><shadow type="math_number" id="{#SV*4doiA0aq:jS`OV`"><field name="NUM">5</field></shadow><block type="text_to_number" id="y#kMbO0p}-a(H6LlV]}]"><field name="TOWHAT">int</field><value name="VAR"><shadow type="variables_get" id="M_wGlJBoJ}[:aU!qCs?n"><field name="VAR">x</field></shadow><block type="math_map" id="900NUbxtWaFtG*.P0uV!"><value name="NUM"><shadow type="math_number" id="|#vE(i,OSzCkOH3~rF3}"><field name="NUM">50</field></shadow><block type="variables_get" id="Pu1s.Jd@$+V^~H#~9]Mw"><field name="VAR">d</field></block></value><value name="fromLow"><shadow type="math_number" id="tmAzxZcDn.C869D_{LY["><field name="NUM">0</field></shadow></value><value name="fromHigh"><shadow type="math_number" id="qul1Taq[GtuoZ*Olu?.u"><field name="NUM">10000</field></shadow></value><value name="toLow"><shadow type="math_number" id="|L6ZOm4)AdK!S[5fs@YH"><field name="NUM">7</field></shadow></value><value name="toHigh"><shadow type="math_number" id="fFNFG`?GTtevDbF:(1/T"><field name="NUM">0</field></shadow></value></block></value></block></value><value name="STEP"><shadow type="math_number" id="KVqDmpl?WMKW+/)/Sl0X"><field name="NUM">-1</field></shadow></value></block></value><value name="VAR"><shadow type="variables_get" id="[=KjWH=5)g*jU{$}oNJ]"><field name="VAR">i</field></shadow></value><statement name="DO"><block type="display_bright_point" id="m^McZZ-1#U4W9:clPmza"><value name="x"><shadow type="pins_exlcdh" id="k9*xT#ot0q;k;Q;3I/u0"><field name="PIN">15</field></shadow></value><value name="y"><shadow type="pins_exlcdv" id="H,l90NUY=VN~1{QSLGVe"><field name="PIN">0</field></shadow><block type="variables_get" id="G{hf:8p=WD;Jo,FUA~!t"><field name="VAR">i</field></block></value><value name="STAT"><shadow type="display_onoff" id="k?4]2z)UNz2h?35w7!38"><field name="ONOFF">ON</field></shadow></value></block></statement><next><block type="display_shift" id="(fGSIg~_|$Ed6KfI)=^;"><field name="OP">shift_left</field><value name="val"><shadow type="math_number" id="-NXbcU#o_Gx|^e=@y.)j"><field name="NUM">1</field></shadow></value><next><block type="storage_file_write" id="B_oeOf];Qi/yV+/|s5#p"><value name="data"><shadow type="text" id="^L_-R|-05G4EJ:qe}B~e"><field name="TEXT">Mixly</field></shadow><block type="number_to_text" id="X9n;gse)-=bvHZ00tm59"><value name="VAR"><shadow type="variables_get" id="agFlo_p:B51Nn)|;~b+H"><field name="VAR">x</field></shadow><block type="text_to_number" id="`DlTcPIT`q[t$pZ@,l[_"><field name="TOWHAT">int</field><value name="VAR"><shadow type="variables_get" id="BT3.MTv6,mAV}uK=^J[e"><field name="VAR">x</field></shadow><block type="variables_get" id="5jH.)eCks/+ekrf@r8C:"><field name="VAR">d</field></block></value></block></value></block></value><value name="FILE"><shadow type="variables_get" id="5z-(sq^|h1$]x}B`MnAR"><field name="VAR">f</field></shadow></value><next><block type="storage_file_write" id="[aG3~|st.GKJBLmlcx^["><value name="data"><shadow type="text" id="[[g.nX~PZ5}oH0emt{-R"><field name="TEXT">Mixly</field></shadow><block type="ascii_to_char" id="dXSw]fY;c_^iStt:/OVp"><value name="VAR"><shadow type="math_number" id="sJfl{v?s$+mqfq2zkKOQ"><field name="NUM">10</field></shadow></value></block></value><value name="FILE"><shadow type="variables_get" id="Xk9dwneFDk$)=P-Ahb8|"><field name="VAR">f</field></shadow></value></block></next></block></next></block></next></block></next></block></statement><next><block type="storage_close_file" id="PUC@B*i_f*(z57iKYWt+"><value name="FILE"><shadow type="variables_get" id="?RII-k=n|SRc(s8Ws}jW"><field name="VAR">f</field></shadow></value><next><block type="actuator_led_bright" id="$hQr4yl0ACw6?6om/c*`"><value name="led"><shadow type="number" id="M`qBEN[s+*L)N;rHgBQS"><field name="op">1</field></shadow></value><value name="bright"><shadow type="ledswitch" id="nFf#RD6U;uUn`}jv2A=!"><field name="flag">0</field></shadow></value></block></next></block></next></block></next></block></next></block></statement><next><block type="controls_if" id="*-rxvR[@oJbqv[3t+djc" collapsed="true" disabled="true"><value name="IF0"><block type="sensor_mixgo_button_was_pressed" id="FX{o1(XHm:Pnz9-cbjh!"><value name="btn"><shadow type="pins_button" id="D0$IhyswWzK)-t7msLTn"><field name="PIN">B2key</field></shadow></value></block></value><statement name="DO0"><block type="onboard_tft_clear" id="+LNjH)QvVeG9jCX5p31."><next><block type="actuator_led_bright" id="A9hLq;g`Pjob^{E,k@PX"><value name="led"><shadow type="number" id="~dL{?Y]+;g|y`~jAc@y0"><field name="op">2</field></shadow></value><value name="bright"><shadow type="ledswitch" id="KbHuwxs,/[9aF!uKl?2B"><field name="flag">1</field></shadow></value><next><block type="controls_try_finally" id="[UMblXiCQ.]c)K(`4t/7"><mutation elseif="1"></mutation><statement name="try"><block type="storage_fileopen" id="YO^Cm0$^/1I*?U9$CLq."><field name="MODE">r</field><value name="FILENAME"><shadow type="text" id="dM}Kuaj7=xYgVMxYsOBQ"><field name="TEXT">/sd/test.txt</field></shadow></value><value name="FILE"><shadow type="variables_get" id="0i_CvTQQH)Mi`CDco17/"><field name="VAR">f</field></shadow></value><next><block type="controls_forEach" id="(MY5C1xs!c8v]X,Nl~LI"><value name="LIST"><shadow type="list_many_input" id="Vu0{GOXp$~/EzA$#gA@N"><field name="CONTENT">0,1,2,3</field></shadow><block type="controls_range" id="N(???9Dw~j5,{_b#-`va"><value name="FROM"><shadow type="math_number" id="j/EsDY6}:F)or!@AO@Md"><field name="NUM">0</field></shadow></value><value name="TO"><shadow type="math_number" id="7oq}vIVvs!R(xxUj]o8n"><field name="NUM">160</field></shadow></value><value name="STEP"><shadow type="math_number" id="6CJ^$o9D*hj*@6,XFHri"><field name="NUM">1</field></shadow></value></block></value><value name="VAR"><shadow type="variables_get" id="rD9^|q!#k=!m02HaVH0a"><field name="VAR">x</field></shadow></value><statement name="DO"><block type="variables_set" id="Ej}Z/z1k|mec,8KwvW{{"><field name="VAR">s</field><value name="VALUE"><block type="storage_get_contents_without_para" id="hwsGeZ]9A)=d-;uP2lZ`"><field name="MODE">readline</field><value name="FILE"><shadow type="variables_get" id="Ysh4D#l2}?u[#~OK0oTH"><field name="VAR">f</field></shadow></value></block></value><next><block type="controls_if" id="lED6q_A;uu0Y*54PrXu_"><value name="IF0"><block type="variables_get" id="*WlMe(-P.D?G~L~B*w~b"><field name="VAR">s</field></block></value><statement name="DO0"><block type="variables_set" id="@t!rB{^+^w8;cn5E[DUi"><field name="VAR">d</field><value name="VALUE"><block type="text_to_number" id=".Uoe9c^H|:UR!)X}$DRc"><field name="TOWHAT">int</field><value name="VAR"><shadow type="variables_get" id=",EpsjE+9{lcYOugM;Q;!"><field name="VAR">x</field></shadow><block type="variables_get" id=":kb4:TV{:,^AB):jl`{]"><field name="VAR">s</field></block></value></block></value><next><block type="onboard_tft_display_line" id="e$#g3~]L@TRsUD!3[3^{"><value name="x1"><shadow type="math_number" id="I{=*)sy_OF6K0o1Tj90z"><field name="NUM">0</field></shadow><block type="variables_get" id="/pDfxKmX7*ND`dN~L#~G"><field name="VAR">x</field></block></value><value name="y1"><shadow type="math_number" id="ly$_E;[yfkb*1[dZL!EG"><field name="NUM">127</field></shadow></value><value name="x2"><shadow type="math_number" id="HPns)QroK=I`Yig70T;S"><field name="NUM">50</field></shadow><block type="variables_get" id="_eDT}jx`:_*zLj2hNa]6"><field name="VAR">x</field></block></value><value name="y2"><shadow type="math_number" id="|56)v.o3-G:I^(R[yWSN"><field name="NUM">50</field></shadow><block type="text_to_number" id="PFbn|wr[Z,rgY3ztS|Q1"><field name="TOWHAT">int</field><value name="VAR"><shadow type="variables_get" id="r;4{!p^n2!jFCc9LFW#V"><field name="VAR">x</field></shadow><block type="math_map" id="/wd^-/-OZCng/0tO~Cku"><value name="NUM"><shadow type="math_number" id="tjzw5(,omE48M,r]@W!M"><field name="NUM">0</field></shadow><block type="variables_get" id=",BlQI3RliPT(]?M3=Bsr"><field name="VAR">d</field></block></value><value name="fromLow"><shadow type="math_number" id="t-]637+G^:2!gpr90qCA"><field name="NUM">0</field></shadow></value><value name="fromHigh"><shadow type="math_number" id="~I3E1fU3H|)EZ@JG4EYd"><field name="NUM">20000</field></shadow></value><value name="toLow"><shadow type="math_number" id="n}i8}?$]+`GSbb^ztfZ("><field name="NUM">127</field></shadow></value><value name="toHigh"><shadow type="math_number" id="ZLii=b$7C4nrrn#te*qT"><field name="NUM">0</field></shadow></value></block></value></block></value><value name="VAR"><shadow type="tuple_create_with_text_return" id="q.,t57]rV]bHix,4Di*t"><field name="TEXT">255,255,0</field></shadow><block type="display_color_seclet" id="o]GpdUbC|0rT{3xS;}5S"><field name="COLOR">#ffffff</field></block></value></block></next></block></statement></block></next></block></statement><next><block type="storage_close_file" id=":#FYOx2,)Zdm8z7!t6E;"><value name="FILE"><shadow type="variables_get" id=",R]zG9nP-#-tL]!slK,i"><field name="VAR">f</field></shadow></value></block></next></block></next></block></statement><value name="IF1"><shadow type="factory_block_return" id="7R_xU5:~G5UlQr11[fhV"><field name="VALUE">Exception as e</field></shadow></value><statement name="DO1"><block type="system_print" id="rpJ3JI^u)6DGSwH0S@r1"><value name="VAR"><block type="variables_get" id="0^8fyz$IZaE?4hbzKwR6"><field name="VAR">e</field></block></value></block></statement><next><block type="actuator_led_bright" id="R=[I9FW9({AGX5Yb)ttZ"><value name="led"><shadow type="number" id="A`XyRyfyP*Y/A(,s=!!d"><field name="op">2</field></shadow></value><value name="bright"><shadow type="ledswitch" id="60a4{N9-o3{NT]VT9IT("><field name="flag">0</field></shadow></value></block></next></block></next></block></next></block></statement></block></next></block></statement></block></xml><config>{}</config><code>aW1wb3J0IG1peGdvX2NlCmZyb20gbWl4Z29fY2UgaW1wb3J0IG9uYm9hcmRfbGVkCmZyb20gbWl4Z29fY2UgaW1wb3J0IG9uYm9hcmRfc291bmQKZnJvbSBtaXhweSBpbXBvcnQgbWF0aF9tYXAKZnJvbSBtaXhnb19jZSBpbXBvcnQgb25ib2FyZF9tYXRyaXgKCgp3aGlsZSBUcnVlOgogICAgaWYgbWl4Z29fY2UuQjFrZXkud2FzX3ByZXNzZWQoKToKICAgICAgICBvbmJvYXJkX2xlZC5zZXRvbm9mZigxLDEpCiAgICAgICAgZiA9IG9wZW4oJy90ZXN0LnR4dCcsICd3JykKICAgICAgICBmb3IgeCBpbiByYW5nZSgwLCAxMDAsIDEpOgogICAgICAgICAgICBkID0gb25ib2FyZF9zb3VuZC5yZWFkKCkKICAgICAgICAgICAgZm9yIGkgaW4gcmFuZ2UoNywgaW50KChtYXRoX21hcChkLCAwLCAxMDAwMCwgNywgMCkpKSwgLTEpOgogICAgICAgICAgICAgICAgb25ib2FyZF9tYXRyaXgucGl4ZWwoaW50KDE1KSwgaW50KGkpLCAxKQogICAgICAgICAgICAgICAgb25ib2FyZF9tYXRyaXguc2hvdygpCiAgICAgICAgICAgIG9uYm9hcmRfbWF0cml4LnNoaWZ0X2xlZnQoMSkKICAgICAgICAgICAgZi53cml0ZShzdHIoaW50KGQpKSkKICAgICAgICAgICAgZi53cml0ZShjaHIoMTApKQogICAgICAgIGYuY2xvc2UoKQogICAgICAgIG9uYm9hcmRfbGVkLnNldG9ub2ZmKDEsMCkK</code> |