Files
mixly3/boards/default/micropython_esp32/examples/MixGo/23-1-蓝牙通讯-从机模式.mix
王立帮 f4bcc9166c Revert "update examples"
This reverts commit af3e64a06d.
2025-03-09 10:50:41 +08:00

1 line
4.6 KiB
XML

<xml version="Mixly 2.0 rc4" board="Python ESP32-C3@MixGo ME"><variables><variable id="d$Hz)_vvA0^=g9`rK.n2">data</variable></variables><block type="communicate_bluetooth_peripheral_init" id="hQ-[7#Gh.c]9SKrCXwaO" x="-1213" y="-853"><value name="VAR"><shadow type="variables_get" id="UpowlDu$DX-mBM964aN3"><field name="VAR">ble_x</field></shadow></value><value name="data"><shadow type="text" id="F6Q[$2br?,;zG764}yL+"><field name="TEXT">Mixly_Slave</field></shadow></value><next><block type="communicate_bluetooth_recv" id="aHQn*cI9^QP5:4ItL;){"><value name="VAR"><shadow type="variables_get" id="@a^I{D4pDPg6g)bsLT2y"><field name="VAR">ble_x</field></shadow></value><value name="METHOD"><shadow type="factory_block_return" id="C2/Kqb.(Ij,-*|IMw4Wo"><field name="VALUE">ble_method</field></shadow></value><next><block type="controls_whileUntil" id="|+f*lJaYS#Exbb?*5x(n"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="=Br}LQ;{QE1a{fy15dEk"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="controls_if" id="VBk6We_zfLGv/_-VMQ_*"><mutation else="1"></mutation><value name="IF0"><block type="communicate_bluetooth_is_connected" id="o4s!lK3j4@{EwZqikQs,"><value name="VAR"><shadow type="variables_get" id="ccNwXMCD+J?`dyhZ?:WL"><field name="VAR">ble_x</field></shadow></value></block></value><statement name="DO0"><block type="display_show_image_or_string_delay" id=":EM,twV{8YH!9$J|}X#h"><field name="center">True</field><value name="data"><shadow type="text" id="@T!IgR-}BLe!B47p-X(V"><field name="TEXT">OK</field></shadow></value><value name="space"><shadow type="math_number" id="5O~EKvg6wHe(6@yk+PQr"><field name="NUM">0</field></shadow></value><next><block type="controls_if" id=",}4;w3pz1)_)]YW$5VpP"><value name="IF0"><block type="sensor_mixgo_button_was_pressed" id="AKhM(j)IXg`m0V2.|r7f"><value name="btn"><shadow type="pins_button" id="*)Q[0.q`^OO6I^:By^FQ"><field name="PIN">B1key</field></shadow></value></block></value><statement name="DO0"><block type="communicate_bluetooth_send" id="Os[;cbKRVu(O1_KHf;6c"><value name="VAR"><shadow type="variables_get" id="$/MfTsjYU}4Uxzpp92ao"><field name="VAR">ble_x</field></shadow></value><value name="data"><shadow type="text" id="O#$zVkuf;?Mg}y0hald,"><field name="TEXT">B1按键按下</field></shadow></value></block></statement><next><block type="controls_if" id="~j-~?5NlXxavO!l{(l!8"><value name="IF0"><block type="sensor_mixgo_button_was_pressed" id="*eNs!nMRG:rcZ@+FqEtu"><value name="btn"><shadow type="pins_button" id="`7ph#K6a4-Ig*UKwt9To"><field name="PIN">B2key</field></shadow></value></block></value><statement name="DO0"><block type="communicate_bluetooth_send" id="6Z?srXLAA36;H|vS7xc+"><value name="VAR"><shadow type="variables_get" id="C_:Xe/).o!~|/|PDbR]R"><field name="VAR">ble_x</field></shadow></value><value name="data"><shadow type="text" id="7?~RZ*:qD!4b1r(;Gx,W"><field name="TEXT">B2按键按下</field></shadow></value></block></statement></block></next></block></next></block></statement><statement name="ELSE"><block type="display_show_image_or_string_delay" id="YOZBp0!A~@eOp^k{9.WI"><field name="center">True</field><value name="data"><shadow type="text" id="e35?=gwdj4dOEB{5c`#K"><field name="TEXT">==</field></shadow></value><value name="space"><shadow type="math_number" id="i;)KB:Vv~Cwol0^bLxl?"><field name="NUM">0</field></shadow></value></block></statement></block></statement></block></next></block></next></block><block type="procedures_defnoreturn" id="b#hYj{j~Z}w8uj@i8pHx" 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="fb0JMR4ZBy^4?f7BSRwI"><value name="VAR"><shadow type="text" id="DeX=Gmzl~KPb_}v:jD8T"><field name="TEXT">Mixly</field></shadow><block type="variables_get" id="KOn_R=BnF]g!]i(3hJU~"><field name="VAR">data</field></block></value></block></statement></block></xml><config>{}</config><code>aW1wb3J0IGJsZV9wZXJpcGhlcmFsCmZyb20gbWl4Z29fbWUgaW1wb3J0IG9uYm9hcmRfbWF0cml4CmltcG9ydCBtaXhnb19tZQppbXBvcnQgbWFjaGluZQoKZGVmIGJsZV9tZXRob2QoZGF0YSk6CiAgICBwcmludChkYXRhKQoKCgpibGVfeCA9IGJsZV9wZXJpcGhlcmFsLkJMRVNpbXBsZVBlcmlwaGVyYWwoJ01peGx5X1NsYXZlJykKYmxlX3gucmVjdihibGVfbWV0aG9kKQp3aGlsZSBUcnVlOgogICAgaWYgYmxlX3guaXNfY29ubmVjdGVkKCk6CiAgICAgICAgb25ib2FyZF9tYXRyaXguc2hvd3MoJ09LJyxzcGFjZSA9IDAsY2VudGVyID0gVHJ1ZSkKICAgICAgICBpZiBtaXhnb19tZS5CMWtleS53YXNfcHJlc3NlZCgpOgogICAgICAgICAgICBibGVfeC5zZW5kKCdCMeaMiemUruaMieS4iycpCiAgICAgICAgaWYgbWl4Z29fbWUuQjJrZXkud2FzX3ByZXNzZWQoKToKICAgICAgICAgICAgYmxlX3guc2VuZCgnQjLmjInplK7mjInkuIsnKQogICAgZWxzZToKICAgICAgICBvbmJvYXJkX21hdHJpeC5zaG93cygnPT0nLHNwYWNlID0gMCxjZW50ZXIgPSBUcnVlKQo=</code>