Files
mixly3/boards/default/micropython_esp32c3/examples/3xtn-eVfIEev/OxVHP5kF8Cpf.mix
2024-07-23 20:47:22 +08:00

1 line
14 KiB
XML

<xml version="Mixly 2.0 rc4" board="Python ESP32-C3@MixGo CC"><block type="controls_whileUntil" id="`bKlFRc;uU,YS4|I}$/6" x="-2150" y="-615"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="gslf=(h4Ey[OH8y5F-8,"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="controls_if" id="mOk6Vv.J!e:,#_C~/IQJ"><value name="IF0"><block type="sensor_mixgo_button_was_pressed" id="yb!:Z0:v{66^R.vab*r|"><value name="btn"><shadow type="pins_button" id="eU,7,b$E#TfaVtl,6Rme"><field name="PIN">B1key</field></shadow></value></block></value><statement name="DO0"><block type="actuator_led_bright" id=".7Y/|+Wg2_SJq_d?*gjE"><value name="led"><shadow type="number" id="1Rh^|]_wyY-^f2-?ej)I"><field name="op">1</field></shadow></value><value name="bright"><shadow type="ledswitch" id="YRPfEe;v1GoOc2(eaYNy"><field name="flag">1</field></shadow></value><next><block type="storage_fileopen" id="UEG(?:qu{u]cYH@{0^(F"><field name="MODE">w</field><value name="FILENAME"><shadow type="text" id="d:~MI8joX9S7{(0RavZC"><field name="TEXT">/test.txt</field></shadow></value><value name="FILE"><shadow type="variables_get" id="z9JyP@4y+YIPy^T5WZ5a"><field name="VAR">f</field></shadow></value><next><block type="controls_forEach" id="`5#S018PfVLClPq1(u_e"><value name="LIST"><shadow type="list_many_input" id="}uC;#mzR)#`R:s7~UZ7@"><field name="CONTENT">0,1,2,3</field></shadow><block type="controls_range" id="cxj|sijlHC]|P#;ZY]N4"><value name="FROM"><shadow type="math_number" id="8JQf~puPTMhf7!y@NGA^"><field name="NUM">0</field></shadow></value><value name="TO"><shadow type="math_number" id="i9WLQ{s91pvapl/q9GM?"><field name="NUM">100</field></shadow></value><value name="STEP"><shadow type="math_number" id="Y?yEfRoD[jx[;6V0gVq#"><field name="NUM">1</field></shadow></value></block></value><value name="VAR"><shadow type="variables_get" id="/~0!kUUVF6Lg!N(Z147i"><field name="VAR">x</field></shadow></value><statement name="DO"><block type="variables_set" id=":AzRL)cROAr*U-uxz3LK"><field name="VAR">d</field><value name="VALUE"><block type="sensor_sound" id="c@dj369Y,3fwxd@eq0wE"></block></value><next><block type="controls_forEach" id="e@.lZ*/v~f.a3Jd1F}4q"><value name="LIST"><shadow type="list_many_input" id="L($osxV@=IX`M]u99a=["><field name="CONTENT">0,1,2,3</field></shadow><block type="controls_range" id="sUXbWoa)UY8X#PQ/7pO@"><value name="FROM"><shadow type="math_number" id="B_6ABL:m9qD`/Gm60ES2"><field name="NUM">11</field></shadow></value><value name="TO"><shadow type="math_number" id="WF,Jrpi7aA`=r.r!Z,TM"><field name="NUM">5</field></shadow><block type="text_to_number" id="P=yzluJbRe:~5^@a/#[)"><field name="TOWHAT">int</field><value name="VAR"><shadow type="variables_get" id="Y3;:oDQxb!;k$CZoI}7."><field name="VAR">x</field></shadow><block type="math_map" id="*M5sncx1h-TK$i}V-BUe"><value name="NUM"><shadow type="math_number" id="p@=^QiCny~h..W_3G1$k"><field name="NUM">50</field></shadow><block type="variables_get" id=":xx,nmc_m!1Ws;{XQ./."><field name="VAR">d</field></block></value><value name="fromLow"><shadow type="math_number" id="fUNf96a.Tp#q$#KV3BH="><field name="NUM">0</field></shadow></value><value name="fromHigh"><shadow type="math_number" id="2K6A{)`#(AleeoW)j5En"><field name="NUM">10000</field></shadow></value><value name="toLow"><shadow type="math_number" id="BB?p`=z(t17~lCUZ_L^-"><field name="NUM">11</field></shadow></value><value name="toHigh"><shadow type="math_number" id="All#zD72p8x/i{!MU.b!"><field name="NUM">0</field></shadow></value></block></value></block></value><value name="STEP"><shadow type="math_number" id="Hqz[=j4ly{oKURmP49V0"><field name="NUM">-1</field></shadow></value></block></value><value name="VAR"><shadow type="variables_get" id="fS3E[=H-r45@p{l}GQ:s"><field name="VAR">i</field></shadow></value><statement name="DO"><block type="display_bright_point" id="qo*hGQkGrvXF~sUA.8j$"><value name="x"><shadow type="pins_exlcdh" id="SH7N-e)IKj9EKiX2bhbK"><field name="PIN">31</field></shadow></value><value name="y"><shadow type="pins_exlcdv" id="zZ|bp2TZMo1#b:P19j=*"><field name="PIN">0</field></shadow><block type="variables_get" id="BJM4Y4K::47Fs,tM93gq"><field name="VAR">i</field></block></value><value name="STAT"><shadow type="display_onoff" id="H]5sTga+rZ+05~jaFm3C"><field name="ONOFF">ON</field></shadow></value></block></statement><next><block type="display_shift" id="JL|`)*-:7N#T~TJwI,i."><field name="OP">shift_left</field><value name="val"><shadow type="math_number" id="*W*Lu6PbckNaD1bQncv]"><field name="NUM">1</field></shadow></value><next><block type="storage_file_write" id="q,*DOWRScm=kjg7C}|GZ"><value name="data"><shadow type="text" id="c2C({6_#cY$z=$zz)?sf"><field name="TEXT">Mixly</field></shadow><block type="number_to_text" id="8=rhlv,a`?(JKU3NT@{*"><value name="VAR"><shadow type="variables_get" id="uFx|N8v)0,@#nFNJ:p3~"><field name="VAR">x</field></shadow><block type="text_to_number" id="j-s$A1fh;z:Qh}$tujL="><field name="TOWHAT">int</field><value name="VAR"><shadow type="variables_get" id="ch_R(;iXAbl#^o`4*W#}"><field name="VAR">x</field></shadow><block type="variables_get" id=":[KH;C:O]p]Ah8U-/)UC"><field name="VAR">d</field></block></value></block></value></block></value><value name="FILE"><shadow type="variables_get" id="pk301LAA9vOjPdIVNc=O"><field name="VAR">f</field></shadow></value><next><block type="storage_file_write" id="[;7eUmNz;O;^RY-I|7`1"><value name="data"><shadow type="text" id="fuC7BZEpg}*kVAbrzhaL"><field name="TEXT">Mixly</field></shadow><block type="ascii_to_char" id="@-#:6~?H,]$xlqA4|p`X"><value name="VAR"><shadow type="math_number" id="iQ]o+xNmB@R,~bHsgD5C"><field name="NUM">10</field></shadow></value></block></value><value name="FILE"><shadow type="variables_get" id="HSt~UH3U0CBhwN-S_mf9"><field name="VAR">f</field></shadow></value></block></next></block></next></block></next></block></next></block></statement><next><block type="storage_close_file" id="X?xV!82m{qp1|sAUx*l6"><value name="FILE"><shadow type="variables_get" id="bfO/53qN!/7C)-5Y}-z8"><field name="VAR">f</field></shadow></value><next><block type="actuator_led_bright" id=":0bX5$jwM^@lP.Z}t1EV"><value name="led"><shadow type="number" id="j#?1f;?CD-#Jo=hN_VIr"><field name="op">1</field></shadow></value><value name="bright"><shadow type="ledswitch" id="K~2o_^oSc`V*mjf6iSpr"><field name="flag">0</field></shadow></value></block></next></block></next></block></next></block></next></block></statement><next><block type="controls_if" id="EF!w|uhVz7Sp{zQR$pz@"><value name="IF0"><block type="sensor_mixgo_button_was_pressed" id="*OKqWAl/ov3BtG@7/1b9"><value name="btn"><shadow type="pins_button" id="gQLJ.V#UyI?WdhxjX$QB"><field name="PIN">B2key</field></shadow></value></block></value><statement name="DO0"><block type="actuator_led_bright" id=";zgg})2SHH=hlbJ`-~tZ"><value name="led"><shadow type="number" id="7kS`U0Q8QTPB|Hv3,~Q,"><field name="op">2</field></shadow></value><value name="bright"><shadow type="ledswitch" id="/Gm=`yAe1Q.{i*Ukhy0J"><field name="flag">1</field></shadow></value><next><block type="controls_try_finally" id="WTnFc}gq}GpJ1D{Msg#a"><mutation elseif="1"></mutation><statement name="try"><block type="storage_fileopen" id="8km,4YP~8i[]B]N-Rv.;"><field name="MODE">r</field><value name="FILENAME"><shadow type="text" id="hTca]S)w:k#|U@s~ET,Y"><field name="TEXT">/test.txt</field></shadow></value><value name="FILE"><shadow type="variables_get" id="dHTA{aQ*cTIXCEh5T3IM"><field name="VAR">f</field></shadow></value><next><block type="controls_forEach" id="WY[?l(PU$E!9kQJq95OT"><value name="LIST"><shadow type="list_many_input" id="sg=6-73:n{Ff7]#8bNzW"><field name="CONTENT">0,1,2,3</field></shadow><block type="controls_range" id="scpco*c?Z-wx*S$49x|)"><value name="FROM"><shadow type="math_number" id="WqyF,W;DOJ~sz-}Go]Uw"><field name="NUM">0</field></shadow></value><value name="TO"><shadow type="math_number" id="@XcKs?p[-me`|~y33Cn*"><field name="NUM">100</field></shadow></value><value name="STEP"><shadow type="math_number" id="!;{vDpp6-Gp$3f/!p~[#"><field name="NUM">1</field></shadow></value></block></value><value name="VAR"><shadow type="variables_get" id="Zs}!?VQS*`hAUe.{1x3R"><field name="VAR">x</field></shadow></value><statement name="DO"><block type="variables_set" id="SFM$vsu4K/#7fm3B0)`F"><field name="VAR">s</field><value name="VALUE"><block type="storage_get_contents_without_para" id="ovUmb!MC~s=zVI=l)G@X"><field name="MODE">readline</field><value name="FILE"><shadow type="variables_get" id="ZqN6-d}6d`KRCTFDekoK"><field name="VAR">f</field></shadow></value></block></value><next><block type="controls_if" id="6o3[.j.?J_[+u4-x!cEk"><value name="IF0"><block type="variables_get" id="`OZE@Dsekde/YaN0^c`J"><field name="VAR">s</field></block></value><statement name="DO0"><block type="variables_set" id="92u]5:n8ren#1ET[]{-C"><field name="VAR">d</field><value name="VALUE"><block type="text_to_number" id="8*rTq^F}gS.f{s//fNh@"><field name="TOWHAT">int</field><value name="VAR"><shadow type="variables_get" id="GaT+a2S~bI]`Ww@}L^cz"><field name="VAR">x</field></shadow><block type="variables_get" id="r)Uk8[vKjdBB47#0w_h8"><field name="VAR">s</field></block></value></block></value><next><block type="controls_forEach" id="qmT-1[9EWgjy^tRy`mb^"><value name="LIST"><shadow type="list_many_input" id="9V^}us|F3W!S8IEoJWn9"><field name="CONTENT">0,1,2,3</field></shadow><block type="controls_range" id="h^x(.uurs^WulYECAuBD"><value name="FROM"><shadow type="math_number" id="e4R{1.75CN=/OXV!}_Il"><field name="NUM">11</field></shadow></value><value name="TO"><shadow type="math_number" id="9S$x.`@bkTG{vtKk5bzG"><field name="NUM">5</field></shadow><block type="text_to_number" id="HoaJM/T),^q*zMY-*xiY"><field name="TOWHAT">int</field><value name="VAR"><shadow type="variables_get" id="/Akpbe/!Ke0}2FB`JKOi"><field name="VAR">x</field></shadow><block type="math_map" id="dB39/q2i;uvzMc`h1)1:"><value name="NUM"><shadow type="math_number" id="0Jn~Y{!Vq7y^OH:$^PH6"><field name="NUM">50</field></shadow><block type="variables_get" id="N=Yzo7D{#f;Gg6j5z;EJ"><field name="VAR">d</field></block></value><value name="fromLow"><shadow type="math_number" id="lRt-Z~ch@vI,6=f/Ji0I"><field name="NUM">0</field></shadow></value><value name="fromHigh"><shadow type="math_number" id="XT72vC~^uW[KNEap32wd"><field name="NUM">10000</field></shadow></value><value name="toLow"><shadow type="math_number" id="TY,L~edet-ve=(cg3Ryq"><field name="NUM">11</field></shadow></value><value name="toHigh"><shadow type="math_number" id="NY6,cr#,`qfhL}3$]+Bm"><field name="NUM">0</field></shadow></value></block></value></block></value><value name="STEP"><shadow type="math_number" id="7pLkR$9q#;sF;WR8PV*L"><field name="NUM">-1</field></shadow></value></block></value><value name="VAR"><shadow type="variables_get" id="D]iwTv/oj,b0oJ|qCw5/"><field name="VAR">i</field></shadow></value><statement name="DO"><block type="display_bright_point" id="K7x[d3x;o3yjrN}O?E-`"><value name="x"><shadow type="pins_exlcdh" id="kiT(HKwF)IO7d4jd$i#d"><field name="PIN">31</field></shadow></value><value name="y"><shadow type="pins_exlcdv" id="!ISdAQR,|v@jv)2h3hY["><field name="PIN">0</field></shadow><block type="variables_get" id="EEaiHzU7,$X{]}t8YQTx"><field name="VAR">i</field></block></value><value name="STAT"><shadow type="display_onoff" id="P3G..+H.!9Y!;]Oxh._2"><field name="ONOFF">ON</field></shadow></value></block></statement><next><block type="display_shift" id="Ke#OoF)q+Utx_AtFMj[]"><field name="OP">shift_left</field><value name="val"><shadow type="math_number" id="aYA]K8WM5sxW8-5=Zpls"><field name="NUM">1</field></shadow></value></block></next></block></next></block></statement></block></next></block></statement><next><block type="storage_close_file" id="(xOs|DHb@nIwQ`oMHY|$"><value name="FILE"><shadow type="variables_get" id="3Ga++60,O.wB*W=[UwA^"><field name="VAR">f</field></shadow></value></block></next></block></next></block></statement><value name="IF1"><shadow type="factory_block_return" id="AL2ZtH9$c~/2;rof!em8"><field name="VALUE">Exception as e</field></shadow></value><statement name="DO1"><block type="system_print" id="G6{(xKr_$}@uBajt{EG$"><value name="VAR"><block type="variables_get" id="5@M,JLs?@NqYHTc|Wpl8"><field name="VAR">e</field></block></value></block></statement><next><block type="actuator_led_bright" id="f}X?l9B~krdC^ZQV2_Xt"><value name="led"><shadow type="number" id="|-XJ5=KIzKnDR(#TgzQg"><field name="op">2</field></shadow></value><value name="bright"><shadow type="ledswitch" id="$T+Ts6WoxhU`X:yTS)GV"><field name="flag">0</field></shadow></value></block></next></block></next></block></statement></block></next></block></statement></block></xml><config>{}</config><code>aW1wb3J0IG1peGdvX2NjCmZyb20gbWl4Z29fY2MgaW1wb3J0IG9uYm9hcmRfbGVkCmZyb20gbWl4Z29fY2MgaW1wb3J0IG9uYm9hcmRfc291bmQKZnJvbSBtaXhweSBpbXBvcnQgbWF0aF9tYXAKZnJvbSBtaXhnb19jYyBpbXBvcnQgb25ib2FyZF9tYXRyaXgKaW1wb3J0IG1hY2hpbmUKCgp3aGlsZSBUcnVlOgogICAgaWYgbWl4Z29fY2MuQjFrZXkud2FzX3ByZXNzZWQoKToKICAgICAgICBvbmJvYXJkX2xlZC5zZXRvbm9mZigxLDEpCiAgICAgICAgZiA9IG9wZW4oJy90ZXN0LnR4dCcsICd3JykKICAgICAgICBmb3IgeCBpbiByYW5nZSgwLCAxMDAsIDEpOgogICAgICAgICAgICBkID0gb25ib2FyZF9zb3VuZC5yZWFkKCkKICAgICAgICAgICAgZm9yIGkgaW4gcmFuZ2UoMTEsIGludCgobWF0aF9tYXAoZCwgMCwgMTAwMDAsIDExLCAwKSkpLCAtMSk6CiAgICAgICAgICAgICAgICBvbmJvYXJkX21hdHJpeC5waXhlbChpbnQoMzEpLCBpbnQoaSksIDEpCiAgICAgICAgICAgICAgICBvbmJvYXJkX21hdHJpeC5zaG93KCkKICAgICAgICAgICAgb25ib2FyZF9tYXRyaXguc2hpZnRfbGVmdCgxKQogICAgICAgICAgICBmLndyaXRlKHN0cihpbnQoZCkpKQogICAgICAgICAgICBmLndyaXRlKGNocigxMCkpCiAgICAgICAgZi5jbG9zZSgpCiAgICAgICAgb25ib2FyZF9sZWQuc2V0b25vZmYoMSwwKQogICAgaWYgbWl4Z29fY2MuQjJrZXkud2FzX3ByZXNzZWQoKToKICAgICAgICBvbmJvYXJkX2xlZC5zZXRvbm9mZigyLDEpCiAgICAgICAgdHJ5OgogICAgICAgICAgICBmID0gb3BlbignL3Rlc3QudHh0JywgJ3InKQogICAgICAgICAgICBmb3IgeCBpbiByYW5nZSgwLCAxMDAsIDEpOgogICAgICAgICAgICAgICAgcyA9IGYucmVhZGxpbmUoKQogICAgICAgICAgICAgICAgaWYgczoKICAgICAgICAgICAgICAgICAgICBkID0gaW50KHMpCiAgICAgICAgICAgICAgICAgICAgZm9yIGkgaW4gcmFuZ2UoMTEsIGludCgobWF0aF9tYXAoZCwgMCwgMTAwMDAsIDExLCAwKSkpLCAtMSk6CiAgICAgICAgICAgICAgICAgICAgICAgIG9uYm9hcmRfbWF0cml4LnBpeGVsKGludCgzMSksIGludChpKSwgMSkKICAgICAgICAgICAgICAgICAgICAgICAgb25ib2FyZF9tYXRyaXguc2hvdygpCiAgICAgICAgICAgICAgICAgICAgb25ib2FyZF9tYXRyaXguc2hpZnRfbGVmdCgxKQogICAgICAgICAgICBmLmNsb3NlKCkKICAgICAgICBleGNlcHQgRXhjZXB0aW9uIGFzIGU6CiAgICAgICAgICAgIHByaW50KGUpCiAgICAgICAgb25ib2FyZF9sZWQuc2V0b25vZmYoMiwwKQo=</code>