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

1 line
5.4 KiB
XML

<xml version="Mixly 2.0 rc4" board="Python ESP32-C3@MixGo CC"><variables><variable id="d$Hz)_vvA0^=g9`rK.n2">data</variable></variables><block type="communicate_bluetooth_peripheral_init" id="D~MiXo@z^9[-V,076$*D" x="-1213" y="-853"><value name="VAR"><shadow type="variables_get" id="X!K;$v{J9RAlupU)N^gH"><field name="VAR">ble_x</field></shadow></value><value name="data"><shadow type="text" id="v`thyN_:,vBi0e0;Q^P`"><field name="TEXT">Mixly_Slave</field></shadow></value><next><block type="communicate_bluetooth_recv" id="E={KyIz}N4S1tucy^}J["><value name="VAR"><shadow type="variables_get" id="-I]Ygb)de^w7OS$.h2`j"><field name="VAR">ble_x</field></shadow></value><value name="METHOD"><shadow type="factory_block_return" id="~?yZLI1aQR^qx?XY{Hg1"><field name="VALUE">ble_method</field></shadow></value><next><block type="controls_whileUntil" id="18#b94zZ`-otWk;C94Zp"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="Hm;OH:wSfQrttYpTiByW"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="controls_if" id="KQhns4Xe_b#?#!FT4?Dt"><mutation else="1"></mutation><value name="IF0"><block type="communicate_bluetooth_is_connected" id="qCB/1#-_)6~.H_cYqlZN"><value name="VAR"><shadow type="variables_get" id="uV+CW#+J1`}A*s@:k[eP"><field name="VAR">ble_x</field></shadow></value></block></value><statement name="DO0"><block type="actuator_onboard_neopixel_rgb_all" id="+B[Y*:J3cr_)2c`Fko+#"><value name="RVALUE"><shadow type="math_number" id="Sso{C0ef.VJYibcx`+qU"><field name="NUM">0</field></shadow></value><value name="GVALUE"><shadow type="math_number" id="WsxENHy/h@qcwk|XZrFe"><field name="NUM">0</field></shadow></value><value name="BVALUE"><shadow type="math_number" id="NkDQxNFRA?BMHV#PJ3)0"><field name="NUM">10</field></shadow></value><next><block type="controls_if" id="b-q3AOg)*4MF6Sa@z!ar"><value name="IF0"><block type="sensor_mixgo_button_was_pressed" id="QX~lW6,4__{^,51Ua!s5"><value name="btn"><shadow type="pins_button" id="=^ixg)s.4VMi#}K*9h!0"><field name="PIN">B1key</field></shadow></value></block></value><statement name="DO0"><block type="communicate_bluetooth_send" id="~;:|MT7)?6rE+R+/bjz,"><value name="VAR"><shadow type="variables_get" id="!R}|HB^L3!$DL(VDVo=o"><field name="VAR">ble_x</field></shadow></value><value name="data"><shadow type="text" id="6InxZm0pqdS`7jU{9-M["><field name="TEXT">B1键</field></shadow></value></block></statement><next><block type="controls_if" id="14x:a`Rih2uF{lmt-B]-"><value name="IF0"><block type="sensor_mixgo_button_was_pressed" id="pp3!E8-]TL~5iUUz*G!*"><value name="btn"><shadow type="pins_button" id="{k:@Fo^6_*|f8g6ngoGi"><field name="PIN">B2key</field></shadow></value></block></value><statement name="DO0"><block type="communicate_bluetooth_send" id="Vycwt9E#$}wiKVA)7ziM"><value name="VAR"><shadow type="variables_get" id=",5e=c?7{Xt.IbhRO=dDy"><field name="VAR">ble_x</field></shadow></value><value name="data"><shadow type="text" id="15F!6iH|-OyH.m?E[/-k"><field name="TEXT">B2键</field></shadow></value></block></statement></block></next></block></next></block></statement><statement name="ELSE"><block type="actuator_onboard_neopixel_rgb_all" id="3~*2)SN1`hpDUo,x;CqB"><value name="RVALUE"><shadow type="math_number" id="i:/,CN/sg{3]n)*D,X[U"><field name="NUM">0</field></shadow></value><value name="GVALUE"><shadow type="math_number" id="]2sGK*#Sfnm;}mR;GRS2"><field name="NUM">0</field></shadow></value><value name="BVALUE"><shadow type="math_number" id="ek7ls0ix68h1utHGYH9r"><field name="NUM">0</field></shadow></value></block></statement><next><block type="actuator_onboard_neopixel_write" id="6tED08.U[)osuJV.R+h!"></block></next></block></statement></block></next></block></next></block><block type="procedures_defnoreturn" id="yyv8+#{qxjqROhMu]mc[" x="-1208" y="-319"><mutation><arg name="data" varid="d$Hz)_vvA0^=g9`rK.n2"></arg></mutation><field name="NAME">ble_method</field><statement name="STACK"><block type="system_print" id="e,AX^S-pDnQf=x^/401N"><value name="VAR"><shadow type="text" id="Vv)(2AM1:cBxm-91Nb#d"><field name="TEXT">Mixly</field></shadow><block type="variables_get" id="9D9gHW--#]XtVX`r.n5)"><field name="VAR">data</field></block></value><next><block type="display_show_image_or_string_delay" id="9QzD0e8.}FG!Kj{FWI}+"><field name="center">True</field><value name="data"><shadow type="text" id="3~5mBA1$#vqdRIaA7`dR"><field name="TEXT">Mixly</field></shadow><block type="variables_get" id="~IPP8TB0A=@{R.1k/2@O"><field name="VAR">data</field></block></value><value name="space"><shadow type="math_number" id="7nv+=);uNGs0c1^WfUwV"><field name="NUM">0</field></shadow></value></block></next></block></statement></block></xml><config>{}</config><code>aW1wb3J0IGJsZV9wZXJpcGhlcmFsCmZyb20gbWl4Z29fY2MgaW1wb3J0IG9uYm9hcmRfcmdiCmltcG9ydCBtaXhnb19jYwppbXBvcnQgbWFjaGluZQpmcm9tIG1peGdvX2NjIGltcG9ydCBvbmJvYXJkX21hdHJpeAoKZGVmIGJsZV9tZXRob2QoZGF0YSk6CiAgICBwcmludChkYXRhKQogICAgb25ib2FyZF9tYXRyaXguc2hvd3MoZGF0YSxzcGFjZSA9IDAsY2VudGVyID0gVHJ1ZSkKCgoKYmxlX3ggPSBibGVfcGVyaXBoZXJhbC5CTEVTaW1wbGVQZXJpcGhlcmFsKCdNaXhseV9TbGF2ZScpCmJsZV94LnJlY3YoYmxlX21ldGhvZCkKd2hpbGUgVHJ1ZToKICAgIGlmIGJsZV94LmlzX2Nvbm5lY3RlZCgpOgogICAgICAgIG9uYm9hcmRfcmdiLmZpbGwoKDAsIDAsIDEwKSkKICAgICAgICBpZiBtaXhnb19jYy5CMWtleS53YXNfcHJlc3NlZCgpOgogICAgICAgICAgICBibGVfeC5zZW5kKCdCMemUricpCiAgICAgICAgaWYgbWl4Z29fY2MuQjJrZXkud2FzX3ByZXNzZWQoKToKICAgICAgICAgICAgYmxlX3guc2VuZCgnQjLplK4nKQogICAgZWxzZToKICAgICAgICBvbmJvYXJkX3JnYi5maWxsKCgwLCAwLCAwKSkKICAgIG9uYm9hcmRfcmdiLndyaXRlKCkK</code>