Files
mixly3/boards/default/micropython_esp32s3/examples/MixGo Sant/学期3/4-1-2 蓝牙通讯-无线透传主机.mix

1 line
4.8 KiB
XML

<xml version="Mixly 3.0 rc0" board="Python ESP32-S3@元控自强" shown="block"><variables><variable id="*5WT[`,Lbe5En3jd}uUk">data</variable></variables><block type="communicate_bluetooth_central_init" id="ux]4m9KBflE]2~wgvdKZ" x="-871" y="-463"><value name="VAR"><shadow type="variables_get" id="bWJU}u}gSg=NuH1n6pxm"><field name="VAR">ble_c</field></shadow></value><next><block type="communicate_bluetooth_recv" id="xv5FL9EErWfq+D2kvTvC"><value name="VAR"><shadow type="variables_get" id="ThhZhW@z1XJ$dHuy]q{a"><field name="VAR">ble_c</field></shadow></value><value name="METHOD"><shadow type="factory_block_return" id="9IttHXUiXbPPMqRujI/f"><field name="VALUE">ble_method</field></shadow></value><next><block type="controls_whileUntil" id="O:{Gd(65B$,pPI3PQs({"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="I:1VaoXjoj/q,u^[s::!"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="controls_if" id="pQ3k.9ICu?Kc$Jzz#G$i"><mutation else="1"></mutation><value name="IF0"><block type="communicate_bluetooth_is_connected" id="q=9YlwiUH)gPYRRyEUNW"><value name="VAR"><shadow type="variables_get" id="{Vmd1Da|5iC_oY{!P3=I"><field name="VAR">ble_c</field></shadow></value></block></value><statement name="DO0"><block type="controls_if" id="oIw[hSNy:)t9LP)|/[zM"><value name="IF0"><block type="sensor_mixgo_button_was_pressed" id="1;Z)j67{be$hDrl1xaY+"><value name="btn"><shadow type="pins_button" id="]_j03YlZXH40j`iX;2cO"><field name="PIN">B1key</field></shadow></value></block></value><statement name="DO0"><block type="communicate_bluetooth_send" id="M@vJ@*Y-)T0}at,N|PxU"><value name="VAR"><shadow type="variables_get" id="3~vOi#JD]e_mOw#gq=bV"><field name="VAR">ble_c</field></shadow></value><value name="data"><shadow type="text" id="4kMj4p/q;:r~`TZiI|}."><field name="TEXT">test</field></shadow></value></block></statement><next><block type="display_show_image_or_string_delay" id="$W2H}xmg1DU^Ib^z;RM@"><field name="center">True</field><value name="data"><shadow type="text" id="]T{ZQ{W$(ywxVY.u7/?Q"><field name="TEXT">OK</field></shadow></value><value name="space"><shadow type="math_number" id="Qd,#~PUj,}Rf1j7I(3DH"><field name="NUM">0</field></shadow></value><value name="boolean"><shadow type="logic_boolean" id="Yn4mjx6VKMqT4e_c./d9"><field name="BOOL">TRUE</field></shadow></value></block></next></block></statement><statement name="ELSE"><block type="display_show_image_or_string_delay" id="o]Zgj~Dm2[AhHK.ytbFg"><field name="center">True</field><value name="data"><shadow type="text" id="Jn2lM[3rn8{OgH3V|(iQ"><field name="TEXT">==</field></shadow></value><value name="space"><shadow type="math_number" id="j*8;iOJ@S.WAi(1DbH{m"><field name="NUM">0</field></shadow></value><value name="boolean"><shadow type="logic_boolean" id="}P?D~pA=V+{q823S#aAH"><field name="BOOL">TRUE</field></shadow></value><next><block type="controls_try_finally" id="@EItd^RXt?d?65bsg9;-"><mutation elseif="1"></mutation><statement name="try"><block type="communicate_bluetooth_connect" id="f:Y:?cB6YY/uNoNyT99C"><field name="mode">name</field><value name="VAR"><shadow type="variables_get" id="vrul(qczEX#0T6:|+C1Q"><field name="VAR">ble_c</field></shadow></value><value name="data"><shadow type="text" id="#BF2HlC{@wjW6v@}|+=X"><field name="TEXT">Mixly_Slave</field></shadow></value></block></statement><value name="IF1"><shadow type="factory_block_return" id="s5Z13zb1es9lvBo=g*A*"><field name="VALUE">Exception as e</field></shadow></value></block></next></block></statement></block></statement></block></next></block></next></block><block type="procedures_defnoreturn" id="zmxbAvI:!vLXa$#ODpO0" x="-860" y="72"><mutation><arg name="data" varid="*5WT[`,Lbe5En3jd}uUk"></arg></mutation><field name="NAME">ble_method</field><statement name="STACK"><block type="system_print" id="AhNJ5yfs[g/z^Kk@(!U["><value name="VAR"><shadow type="text" id="xm_AbEgzqc{I]?);X.2;"><field name="TEXT">Mixly</field></shadow><block type="variables_get" id="1[y?am(bG8(uSt{)G~8f"><field name="VAR">data</field></block></value></block></statement></block></xml><config>{}</config><code>aW1wb3J0IGJsZV9jZW50cmFsCmltcG9ydCBtaXhnb19zYW50CmZyb20gbWl4Z29fc2FudCBpbXBvcnQgb25ib2FyZF90ZnQKaW1wb3J0IG1hY2hpbmUKCmRlZiBibGVfbWV0aG9kKGRhdGEpOgogICAgcHJpbnQoZGF0YSkKCgpibGVfYyA9IGJsZV9jZW50cmFsLkJMRVNpbXBsZUNlbnRyYWwoKQpibGVfYy5yZWN2KGJsZV9tZXRob2QpCndoaWxlIFRydWU6CiAgICBpZiBibGVfYy5pc19jb25uZWN0ZWQoKToKICAgICAgICBpZiBtaXhnb19zYW50LkIxa2V5Lndhc19wcmVzc2VkKCk6CiAgICAgICAgICAgIGJsZV9jLnNlbmQoJ3Rlc3QnKQogICAgICAgIG9uYm9hcmRfdGZ0LnNob3dzKCdPSycsIHNwYWNlPTAsIGNlbnRlcj1UcnVlLHN5bmM9VHJ1ZSkKICAgIGVsc2U6CiAgICAgICAgb25ib2FyZF90ZnQuc2hvd3MoJz09Jywgc3BhY2U9MCwgY2VudGVyPVRydWUsc3luYz1UcnVlKQogICAgICAgIHRyeToKICAgICAgICAgICAgYmxlX2MuY29ubmVjdChuYW1lPSdNaXhseV9TbGF2ZScpCiAgICAgICAgZXhjZXB0IEV4Y2VwdGlvbiBhcyBlOgogICAgICAgICAgICBwYXNzCg==</code>