1 line
6.8 KiB
XML
1 line
6.8 KiB
XML
<xml version="Mixly 2.0 rc4" board="Python Robot@飞乙"><block type="controls_whileUntil" id="p(fMH(S21nH-,*N)6o3B" x="-2173" y="-385"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="2Txaham.$-30czL;(^4$"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="controls_if" id="E#W:3Lp}ihf@f#m/A{M4"><value name="IF0"><block type="sensor_mixgo_button_was_pressed" id="/j+h--TdL{k)B;O{3`,_"><value name="btn"><shadow type="pins_button" id="818+rPv3JHKk!WJpCRqX"><field name="PIN">button_a</field></shadow></value></block></value><statement name="DO0"><block type="storage_fileopen" id="ybz8v74XTwr^i^DC4F`h"><field name="MODE">w</field><value name="FILENAME"><shadow type="text" id="dn3qw0jD,][uP?xO)eq?"><field name="TEXT">/acc.txt</field></shadow></value><value name="FILE"><shadow type="variables_get" id="?eiDMUyT=l[FeNm7K9u0"><field name="VAR">f</field></shadow></value><next><block type="controls_forEach" id="hiiT4d.f6f}ND$gj=c^{"><value name="LIST"><shadow type="list_many_input" id=")nsUw}0,x`U#eijY@4sW"><field name="CONTENT">0,1,2,3</field></shadow><block type="controls_range" id="n$t3.e0g|A-@Zf#Kwg)|"><value name="FROM"><shadow type="math_number" id=",_z6}f+xmoN~7*i8nW/A"><field name="NUM">0</field></shadow></value><value name="TO"><shadow type="math_number" id="89y{jk0hHaUo0cVs81{g"><field name="NUM">100</field></shadow></value><value name="STEP"><shadow type="math_number" id="tyF~6qYM}Rve~y9:cj-G"><field name="NUM">1</field></shadow></value></block></value><value name="VAR"><shadow type="variables_get" id=":(}`Z9[te1y.YoU@iMr#"><field name="VAR">x</field></shadow></value><statement name="DO"><block type="variables_set" id="Ida!A},DD~1K78zw(#;W"><field name="VAR">d</field><value name="VALUE"><block type="text_format_noreturn" id="r]9v-/mc2hVE#RS!#::1"><mutation items="3"></mutation><value name="VAR"><shadow type="text" id="g@D1|=~FYN6BU0Kny$e;"><field name="TEXT">{},{},{}</field></shadow></value><value name="ADD0"><block type="sensor_get_acceleration" id="4`mGUrnO:Ixz?L/SPWK4"><field name="key">[0]</field></block></value><value name="ADD1"><block type="sensor_get_acceleration" id="uAKqKsG{sW3|e#bxdl0h"><field name="key">[1]</field></block></value><value name="ADD2"><block type="sensor_get_acceleration" id="Lq?TfYkJ=zW/Ko=CwQb;"><field name="key">[2]</field></block></value></block></value><next><block type="controls_forEach" id="U{woQ_vWLe.#=@?jxS2B"><value name="LIST"><shadow type="list_many_input" id="H;^E?g:D,`]uwi|*?]/u"><field name="CONTENT">0,1,2,3</field></shadow><block type="controls_range" id="r-^m7j.HD=L(g9uR|MKk"><value name="FROM"><shadow type="math_number" id="rY+-qFY@O.8z4!Elc=JE"><field name="NUM">11</field></shadow></value><value name="TO"><shadow type="math_number" id="cL9s8*cz^:c1RJm]l(TR"><field name="NUM">5</field></shadow><block type="text_to_number" id="I$48{WK{CC]osITx;IO!"><field name="TOWHAT">int</field><value name="VAR"><shadow type="variables_get" id="Y[$lVsuGvF@4gsITgcR["><field name="VAR">x</field></shadow><block type="math_map" id="v(,p3LxH[e;0K(B(P=mG"><value name="NUM"><shadow type="math_number" id="x;G7Q4SB=;XF5**Y9jXi"><field name="NUM">50</field></shadow><block type="sensor_get_acceleration" id="i(eh3F,t}fW]Gs}eD,TZ"><field name="key">strength</field></block></value><value name="fromLow"><shadow type="math_number" id="+mjkzI4o4:GE2wvek^C6"><field name="NUM">0</field></shadow></value><value name="fromHigh"><shadow type="math_number" id="=$X-L.gTTH+;9yj}(@@^"><field name="NUM">10</field></shadow></value><value name="toLow"><shadow type="math_number" id="xn9V*89fGD^dP~h,9xJm"><field name="NUM">11</field></shadow></value><value name="toHigh"><shadow type="math_number" id="`mop/OLJCG|jQ{GvHOA}"><field name="NUM">0</field></shadow></value></block></value></block></value><value name="STEP"><shadow type="math_number" id="!Mz.g;.~@7bq[~[.oG5o"><field name="NUM">-1</field></shadow></value></block></value><value name="VAR"><shadow type="variables_get" id="2wfI|d5O7ci]uS$-3o/X"><field name="VAR">i</field></shadow></value><statement name="DO"><block type="display_bright_point" id="8Ql~.#(}trt:`ks7y!@8"><value name="x"><shadow type="pins_exlcdh" id="cZiDfI*4oZ-VB4pQ4^Tv"><field name="PIN">11</field></shadow></value><value name="y"><shadow type="pins_exlcdv" id=";GBBC/_WNOi,p7^WFR.O"><field name="PIN">0</field></shadow><block type="variables_get" id="n!5_rn0s|cn;![^GB@Eo"><field name="VAR">i</field></block></value><value name="STAT"><shadow type="display_onoff" id="89sIO=W76S[TScyi*U.A"><field name="ONOFF">ON</field></shadow></value></block></statement><next><block type="display_shift" id="8J-$G9qAq@xp7_sq^w7v"><field name="OP">shift_left</field><value name="val"><shadow type="math_number" id="$MXvZjl/{+Lx$DDl:)Dp"><field name="NUM">1</field></shadow></value><next><block type="storage_file_write" id="B`{T=zbHR}vXg_^#4|O8"><value name="data"><shadow type="text" id="r8KHV|hFv{/|9hPcwzNN"><field name="TEXT">Mixly</field></shadow><block type="variables_get" id="~FYy2SNchq32hxcMUTLP"><field name="VAR">d</field></block></value><value name="FILE"><shadow type="variables_get" id="O1H?`5JF/xuo/l#tcWN$"><field name="VAR">f</field></shadow></value><next><block type="storage_file_write" id="!$PozD)~A|1VeR{6,/:4"><value name="data"><shadow type="text" id="VKE,Zp5:2oy0:KGQ=)UY"><field name="TEXT">Mixly</field></shadow><block type="ascii_to_char" id="g4w`*?V}]lR^zWBuZjpQ"><value name="VAR"><shadow type="math_number" id="C=Pw]GJ*xwuU1ZY$Q=+-"><field name="NUM">10</field></shadow></value></block></value><value name="FILE"><shadow type="variables_get" id="fN[m;S1+Ol_]{X=6$-0{"><field name="VAR">f</field></shadow></value></block></next></block></next></block></next></block></next></block></statement><next><block type="storage_close_file" id="L)OcXjXFC*5|Ag4/|5q@"><value name="FILE"><shadow type="variables_get" id="glGFI{Qs2,FNz))Fh@rB"><field name="VAR">f</field></shadow></value></block></next></block></next></block></statement></block></statement></block></xml><config>{}</config><code>aW1wb3J0IGZlaXlpCmZyb20gZmVpeWkgaW1wb3J0IG9uYm9hcmRfYWNjCmZyb20gbWl4cHkgaW1wb3J0IG1hdGhfbWFwCmZyb20gZmVpeWkgaW1wb3J0IG9uYm9hcmRfbWF0cml4CgoKd2hpbGUgVHJ1ZToKICAgIGlmIGZlaXlpLmJ1dHRvbl9hLndhc19wcmVzc2VkKCk6CiAgICAgICAgZiA9IG9wZW4oJy9hY2MudHh0JywgJ3cnKQogICAgICAgIGZvciB4IGluIHJhbmdlKDAsIDEwMCwgMSk6CiAgICAgICAgICAgIGQgPSAne30se30se30nLmZvcm1hdChvbmJvYXJkX2FjYy5hY2NlbGVyYXRpb24oKVswXSwgb25ib2FyZF9hY2MuYWNjZWxlcmF0aW9uKClbMV0sIG9uYm9hcmRfYWNjLmFjY2VsZXJhdGlvbigpWzJdKQogICAgICAgICAgICBmb3IgaSBpbiByYW5nZSgxMSwgaW50KChtYXRoX21hcChvbmJvYXJkX2FjYy5zdHJlbmd0aCgpLCAwLCAxMCwgMTEsIDApKSksIC0xKToKICAgICAgICAgICAgICAgIG9uYm9hcmRfbWF0cml4LnBpeGVsKGludCgxMSksIGludChpKSwgMSkKICAgICAgICAgICAgICAgIG9uYm9hcmRfbWF0cml4LnNob3coKQogICAgICAgICAgICBvbmJvYXJkX21hdHJpeC5zaGlmdF9sZWZ0KDEpCiAgICAgICAgICAgIGYud3JpdGUoZCkKICAgICAgICAgICAgZi53cml0ZShjaHIoMTApKQogICAgICAgIGYuY2xvc2UoKQo=</code> |