1 line
15 KiB
XML
1 line
15 KiB
XML
<xml version="Mixly 3.0 rc0" board="Python ESP32-S3@元控自强(SANT)" shown="block"><block type="procedures_defnoreturn" id="Z2r*et:qP#NB.LUztRxX" x="-3156" y="-340"><field name="NAME">录音</field><statement name="STACK"><block type="display_clear" id="bnMC?k)1*{G7`f$51I6|"><value name="boolean"><shadow type="logic_boolean" id="krT?I}j~@p`E]6g9vU5f"><field name="BOOL">TRUE</field></shadow></value><next><block type="actuator_led_bright" id="XlOE3#iCkPkS/@}?JUGa"><value name="led"><shadow type="number" id="w1smUm{5#Biu=NpxUYTw"><field name="op">1</field></shadow></value><value name="bright"><shadow type="ledswitch" id="@kj{lqvGQB7@aZ4+jygw"><field name="flag">1</field></shadow></value><next><block type="storage_fileopen" id="66dowG,TE#3PvB?vAsoV"><field name="MODE">w</field><value name="FILENAME"><shadow type="text" id="}@}ea,}hdRT;+=McIKJ)"><field name="TEXT">/test.txt</field></shadow></value><value name="FILE"><shadow type="variables_get" id="jv$3~x.nQrYEHqj93OEo"><field name="VAR">f</field></shadow></value><next><block type="controls_forEach" id="!wJwJl7645@sEU+~w8D["><value name="LIST"><shadow type="list_many_input" id="WLx{v+.(Q;O.mZYXnMsG"><field name="CONTENT">0,1,2,3</field></shadow><block type="controls_range" id="@J$?E:{/KfTZxwcBjJi8"><value name="FROM"><shadow type="math_number" id="M`gx`jUz}^Ee$vVcJ_!m"><field name="NUM">0</field></shadow></value><value name="TO"><shadow type="math_number" id="E!SssE?cEfS_oR#}Iq1w"><field name="NUM">1000</field></shadow></value><value name="STEP"><shadow type="math_number" id="OjMb`t7n66B3?^fq#0]q"><field name="NUM">1</field></shadow></value></block></value><value name="VAR"><shadow type="variables_get" id="+EtIcaiv@bS~ZM|l0?j]"><field name="VAR">x</field></shadow></value><statement name="DO"><block type="variables_set" id="*#9~w9Xcz:(IP4EKwN@a"><field name="VAR">d</field><value name="VALUE"><block type="sensor_sound" id="0y@XQfa(:938]e+Cr?)7"></block></value><next><block type="onboard_tft_display_line" id="MA$:p+grzJ@suAcW_]lj"><value name="x1"><shadow type="math_number" id="7*gx:JOc3QzH|U3SvKW:"><field name="NUM">238</field></shadow></value><value name="y1"><shadow type="math_number" id="muJyxL+A-h`szqtxW(+T"><field name="NUM">238</field></shadow></value><value name="x2"><shadow type="math_number" id="AI*ZBoU8Hgf2/gutr5*!"><field name="NUM">238</field></shadow></value><value name="y2"><shadow type="math_number" id="9Kq0o7mT,}qcL|]ALv^q"><field name="NUM">50</field></shadow><block type="math_arithmetic" id="Jtet|Bad#`woW_1+:vP#"><field name="OP">MINUS</field><value name="A"><shadow type="math_number" id="usCRXRwC~{13!;Q4w,IG"><field name="NUM">239</field></shadow></value><value name="B"><shadow type="math_number" id="R{25F]aQL6he3++fQl.3"><field name="NUM">1</field></shadow><block type="text_to_number" id="Y@m`=rHOK0;zze5kbkC:"><field name="TOWHAT">int</field><value name="VAR"><shadow type="variables_get" id="Lt3@A8nw,J[pXF(MfMfZ"><field name="VAR">x</field></shadow><block type="math_map" id="#]d5C[F!5hZD0fjj7Gcg" inline="false"><value name="NUM"><shadow type="math_number" id="e.paZ.@]@^e#aeya~|b:"><field name="NUM">50</field></shadow><block type="variables_get" id="(~9ApG1PKkR+LGA:,E@L"><field name="VAR">d</field></block></value><value name="fromLow"><shadow type="math_number" id="22oMZE~ed/]s=qvr^xd9"><field name="NUM">0</field></shadow></value><value name="fromHigh"><shadow type="math_number" id="Xg#a8hP30G3#z}FGmmd["><field name="NUM">6000</field></shadow></value><value name="toLow"><shadow type="math_number" id="3IY3ALZ3OdFEKi3AEImR"><field name="NUM">0</field></shadow></value><value name="toHigh"><shadow type="math_number" id="_(#+hLy3BM~dy-(93VTj"><field name="NUM">239</field></shadow></value></block></value></block></value></block></value><value name="VAR"><shadow type="tuple_create_with_text_return" id="tz0yySBscx0V!sals9S7"><field name="TEXT">255,255,0</field></shadow><block type="display_color_seclet" id="$EGVDJWWd#ziB{]5:uvl"><field name="COLOR">#ffffff</field></block></value><value name="boolean"><shadow type="logic_boolean" id="m8tp^@xKpq6BEqC1);[s"><field name="BOOL">FALSE</field></shadow></value><next><block type="display_shift" id="tBX`XMC7Q.Jar#}0vG@Z"><field name="OP">shift_left</field><value name="val"><shadow type="math_number" id="c@3q;=^cn-QG{wP+drUc"><field name="NUM">1</field></shadow></value><value name="boolean"><shadow type="logic_boolean" id="Tp[Liq?]^GVO,NF=ISaM"><field name="BOOL">TRUE</field></shadow></value><next><block type="storage_file_write" id="aR|^0=jZoij;Fg/I9e[c"><value name="data"><shadow type="text" id="cr@KUOKht1yTa:L4Qrt."><field name="TEXT">Mixly</field></shadow><block type="number_to_text" id="lVwvI^YiPhF]Vv(nV~3C"><value name="VAR"><shadow type="variables_get" id="[[~f{1)wkMb}FXBgXZ9c"><field name="VAR">x</field></shadow><block type="text_to_number" id="5$NUI)FIGuVT@e7yqDtr"><field name="TOWHAT">int</field><value name="VAR"><shadow type="variables_get" id="Jk2,ej{QAq/EU3rd=Q_F"><field name="VAR">x</field></shadow><block type="variables_get" id="gH:?0{$sZhfu!3oL.}Bz"><field name="VAR">d</field></block></value></block></value></block></value><value name="FILE"><shadow type="variables_get" id="zR*W,R#cq,dQd[V}^Um/"><field name="VAR">f</field></shadow></value><next><block type="storage_file_write" id="^~!2SJKu+|!]mH.!?hjP"><value name="data"><shadow type="text" id="k/u}UPE(;)Rj(/B^1e=="><field name="TEXT">Mixly</field></shadow><block type="ascii_to_char" id="^5zPsyDT$~R2?u|cG;RQ"><value name="VAR"><shadow type="math_number" id="2_tGap7cN8VFO4EXyC`f"><field name="NUM">10</field></shadow></value></block></value><value name="FILE"><shadow type="variables_get" id="JPp|};g{f;IM[VxX#8!5"><field name="VAR">f</field></shadow></value></block></next></block></next></block></next></block></next></block></statement><next><block type="storage_close_file" id="@G_Zid9Q/wfSRE`[pzxo"><value name="FILE"><shadow type="variables_get" id="#b]Q,fbJHwK4-I.FpML."><field name="VAR">f</field></shadow></value><next><block type="actuator_led_bright" id="$Y1ap)d[@gB@!H!_+Ol4"><value name="led"><shadow type="number" id="tS=t^x^)=;6W0i7${n_c"><field name="op">1</field></shadow></value><value name="bright"><shadow type="ledswitch" id="Bi8/G#+kx+093H*HdK=I"><field name="flag">0</field></shadow></value></block></next></block></next></block></next></block></next></block></next></block></statement></block><block type="procedures_defnoreturn" id="/4B^Bj:p^t3j,._,+QJA" x="-2068" y="-337"><field name="NAME">重现</field><statement name="STACK"><block type="display_clear" id="VtE,wA4WbC8g1h;vJzY!"><value name="boolean"><shadow type="logic_boolean" id="D.tS3l{9$]s~9L8sC,sJ"><field name="BOOL">TRUE</field></shadow></value><next><block type="actuator_led_bright" id="v.|aWz6z.2mO{6stn|sy"><value name="led"><shadow type="number" id="[,UGx(;.!9y(`k=?0K}N"><field name="op">2</field></shadow></value><value name="bright"><shadow type="ledswitch" id="^@-}ALbn97sI9g}/fdn["><field name="flag">1</field></shadow></value><next><block type="controls_try_finally" id="IE]=6X.x=jsPo.8A7XL!"><mutation elseif="1"></mutation><statement name="try"><block type="storage_fileopen" id="r5xUi9,9=!e#o3aS1WEA"><field name="MODE">r</field><value name="FILENAME"><shadow type="text" id="*o!3$+N_}@2ul?18u7S|"><field name="TEXT">/test.txt</field></shadow></value><value name="FILE"><shadow type="variables_get" id="02,Zda;o{e|-,M--n3Qq"><field name="VAR">f</field></shadow></value><next><block type="controls_forEach" id=")3*S?RwV#0h|4OHxb,eD"><value name="LIST"><shadow type="list_many_input" id="$h0!8DvP_K+nscbKlqjG"><field name="CONTENT">0,1,2,3</field></shadow><block type="controls_range" id="{$RVSK5QOznt)r:X`|!w"><value name="FROM"><shadow type="math_number" id="H5QjCau@G@A+@vDv+0oh"><field name="NUM">0</field></shadow></value><value name="TO"><shadow type="math_number" id=",-VE.wG:G!i@SFB`,pou"><field name="NUM">1000</field></shadow></value><value name="STEP"><shadow type="math_number" id="0d[hQz7mN`o6:^^H*JrT"><field name="NUM">1</field></shadow></value></block></value><value name="VAR"><shadow type="variables_get" id="=5A-Z`1x`YM#0GjQ_{p4"><field name="VAR">x</field></shadow></value><statement name="DO"><block type="variables_set" id="f4mj2j=/$fHUNyC@~CCy"><field name="VAR">s</field><value name="VALUE"><block type="storage_get_contents_without_para" id="jBa5:A@8Tjp./k:L8yf?"><field name="MODE">readline</field><value name="FILE"><shadow type="variables_get" id="N,gs]!^Z3U4=A@2,35a^"><field name="VAR">f</field></shadow></value></block></value><next><block type="controls_if" id="GH5$tLOY=/L/u,Hpn.+Z"><value name="IF0"><block type="variables_get" id="Qo`CFw6Tn_yKrM/18(8X"><field name="VAR">s</field></block></value><statement name="DO0"><block type="variables_set" id="XsbkW?BW-Z[aPD^~q9yr"><field name="VAR">d</field><value name="VALUE"><block type="text_to_number" id="n-K4fPe8)w*k~!;StUdk"><field name="TOWHAT">int</field><value name="VAR"><shadow type="variables_get" id="nG(fYPJM`X82a0XiAc;@"><field name="VAR">x</field></shadow><block type="variables_get" id=",1QsDrf_}7VZS5Nr4G7;"><field name="VAR">s</field></block></value></block></value><next><block type="onboard_tft_display_line" id="Ny6[X~9MkGwv=*8#J[RV"><value name="x1"><shadow type="math_number" id="~LJmf[VwMi?(Q1[9#1Z)"><field name="NUM">238</field></shadow></value><value name="y1"><shadow type="math_number" id="Wsj?Wh38S^Q*Sf47;^7N"><field name="NUM">238</field></shadow></value><value name="x2"><shadow type="math_number" id="O)_R6``67a!9]?4o~7TC"><field name="NUM">238</field></shadow></value><value name="y2"><shadow type="math_number" id="9Kq0o7mT,}qcL|]ALv^q"><field name="NUM">50</field></shadow><block type="math_arithmetic" id="vEF;)4~Ded=6PJrwGNGx"><field name="OP">MINUS</field><value name="A"><shadow type="math_number" id="X52a5N7-J-Fq3C$6,{w+"><field name="NUM">239</field></shadow></value><value name="B"><shadow type="math_number" id="R{25F]aQL6he3++fQl.3"><field name="NUM">1</field></shadow><block type="text_to_number" id="ER}Q+9Y}q2t1#CZDwPJb"><field name="TOWHAT">int</field><value name="VAR"><shadow type="variables_get" id="Lt3@A8nw,J[pXF(MfMfZ"><field name="VAR">x</field></shadow><block type="math_map" id="b?74.[Fi2uM9^aI;L:~M" inline="false"><value name="NUM"><shadow type="math_number" id="e.paZ.@]@^e#aeya~|b:"><field name="NUM">50</field></shadow><block type="variables_get" id="Dr[:o+/dN[sv(~cqkdb;"><field name="VAR">d</field></block></value><value name="fromLow"><shadow type="math_number" id="9Xa)}]*Y]EZP6SU.VS_V"><field name="NUM">0</field></shadow></value><value name="fromHigh"><shadow type="math_number" id="BiAKwy1!Q!wwb4:,MZ@e"><field name="NUM">6000</field></shadow></value><value name="toLow"><shadow type="math_number" id="ue,(A*L28h`m)Oh#svsk"><field name="NUM">0</field></shadow></value><value name="toHigh"><shadow type="math_number" id="cdL,LLW0odel[uxHG5PS"><field name="NUM">239</field></shadow></value></block></value></block></value></block></value><value name="VAR"><shadow type="tuple_create_with_text_return" id="tz0yySBscx0V!sals9S7"><field name="TEXT">255,255,0</field></shadow><block type="display_color_seclet" id="Za8Lo:UJ,iYt@COi^UnW"><field name="COLOR">#ffffff</field></block></value><value name="boolean"><shadow type="logic_boolean" id=".1CxeGyCKjbT#F}IE1EX"><field name="BOOL">FALSE</field></shadow></value><next><block type="display_shift" id="{$I]mgw-1qZTup|t]x!^"><field name="OP">shift_left</field><value name="val"><shadow type="math_number" id="rZFWHIehGnyk}7*f[.$X"><field name="NUM">1</field></shadow></value><value name="boolean"><shadow type="logic_boolean" id="zyCV(hhShC-V1?CEuA;."><field name="BOOL">TRUE</field></shadow></value></block></next></block></next></block></statement></block></next></block></statement><next><block type="storage_close_file" id="A*U.OJk8h?NgLQDVvWIU"><value name="FILE"><shadow type="variables_get" id="hX7w|lG6,Q:~OTkZ1hO="><field name="VAR">f</field></shadow></value></block></next></block></next></block></statement><value name="IF1"><shadow type="factory_block_return" id="ME,wb#uW4#uc5buimV~A"><field name="VALUE">Exception as e</field></shadow></value><statement name="DO1"><block type="system_print" id="3?FwmaG]V$ubA,sZRjRu"><value name="VAR"><block type="variables_get" id="[WmWy$-4:k[#YLk{L`yF"><field name="VAR">e</field></block></value></block></statement><next><block type="actuator_led_bright" id="Xfi)3}Lsnyk@=2@ps__q"><value name="led"><shadow type="number" id="*cgFvE.I~d[YzdI[E-Sv"><field name="op">2</field></shadow></value><value name="bright"><shadow type="ledswitch" id="mOby/hMciY#=X23uF;dG"><field name="flag">0</field></shadow></value></block></next></block></next></block></next></block></statement></block><block type="controls_whileUntil" id="#/mqlTEPUNHGPwlU3t[F" x="-2545" y="93"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="*AZPyU{vyig1LTr@$Ku6"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="controls_if" id="X-/C,?KYZ}Q.49N*Yt[b"><value name="IF0"><block type="sensor_mixgo_button_was_pressed" id="v6T4k+Y#(Ncl6:Izd:pn"><value name="btn"><shadow type="pins_button" id="/~03s7q8={-i=J_;,jNq"><field name="PIN">B1key</field></shadow></value></block></value><statement name="DO0"><block type="procedures_callnoreturn" id="{fDdQoL3#@E][/Z[CRa0"><mutation name="录音"></mutation></block></statement><next><block type="controls_if" id="?xZ~pS$loCkngQVB5eWw"><value name="IF0"><block type="sensor_mixgo_button_was_pressed" id="@1^,$RJtbkya?T(s^9]a"><value name="btn"><shadow type="pins_button" id="Q)#xy7`zkGH(6x-r?$}Q"><field name="PIN">B2key</field></shadow></value></block></value><statement name="DO0"><block type="procedures_callnoreturn" id="DAG8zt;BH@~T]1_3|TDu"><mutation name="重现"></mutation></block></statement></block></next></block></statement></block></xml><config>{}</config><code>ZnJvbSBtaXhnb19zYW50IGltcG9ydCBvbmJvYXJkX3RmdApmcm9tIG1peGdvX3NhbnQgaW1wb3J0IG9uYm9hcmRfbGVkCmZyb20gbWl4Z29fc2FudCBpbXBvcnQgb25ib2FyZF9zb3VuZApmcm9tIG1peHB5IGltcG9ydCBtYXRoX21hcAppbXBvcnQgbWFjaGluZQppbXBvcnQgbWl4Z29fc2FudAoKZGVmIOW9lemfsygpOgogICAgb25ib2Fy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6CiAgICAgICAgcHJpbnQoZSkKICAgIG9uYm9hcmRfbGVkLnNldG9ub2ZmKDIsMCkKCgp3aGlsZSBUcnVlOgogICAgaWYgbWl4Z29fc2FudC5CMWtleS53YXNfcHJlc3NlZCgpOgogICAgICAgIOW9lemfsygpCiAgICBpZiBtaXhnb19zYW50LkIya2V5Lndhc19wcmVzc2VkKCk6CiAgICAgICAg6YeN546wKCkK</code> |