Files
mixly3/boards/default/micropython_esp32c2/examples/MixGo MINI/外设使用示例/02-倒车雷达-超声波测距.mix
2025-01-24 15:22:04 +08:00

1 line
4.0 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<xml version="Mixly 3.0 rc0" board="Python ESP32-C2@MixGo MINI" shown="block"><comment id="iy}8.+GVZ^*}Fk=UzQMN" x="-554" y="-540" w="166.811767578125" h="100">超声波测距连接到U2IO3,IO4管脚</comment><block type="variables_set" id="PYf^)$#*n``A+r0_G8NS" x="-614" y="-390"><field name="VAR">距离</field><value name="VALUE"><block type="math_number" id="b#|h[#-2N9|]=N;~lgnk"><field name="NUM">0</field></block></value><next><block type="controls_whileUntil" id="/SD7~hCa`6vRx?$bkj`f"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="xc+jlEYz/jo--I0OZbbv"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="variables_set" id="hTX66zDpZ8-$_o!!0^QF"><field name="VAR">距离</field><value name="VALUE"><block type="math_to_int" id="MBJgF*L+E#.ndra@f|w7"><field name="OP">round</field><value name="A"><shadow type="math_number" id="o}7{J`QBZDSMA,?0_64#"><field name="NUM">0.998</field></shadow><block type="HCSR04" id="0^AF*rb+pK4Oo$l`fLIn"><value name="PIN1"><shadow type="pins_digital_pin" id="m8KesG+klw=unUJs})k?"><field name="PIN">3</field></shadow></value><value name="PIN2"><shadow type="pins_digital_pin" id="~9`|T~?ro@a||JgOXKx="><field name="PIN">4</field></shadow></value></block></value></block></value><next><block type="display_show_image_or_string_delay" id=";HMtu98NA@ZF,V?kTh+k"><field name="center">True</field><value name="data"><shadow type="text" id="3_r@~A=KkoliFowUNvD/"><field name="TEXT">Mixly</field></shadow><block type="variables_get" id="X9h:u#`#tCs$G!4FKaij"><field name="VAR">距离</field></block></value><value name="space"><shadow type="math_number" id="9^Rs1]/rpy_UM(H_n{a."><field name="NUM">0</field></shadow></value><next><block type="controls_if" id="@[F])ms$9-HF:.(JvOPD"><value name="IF0"><block type="logic_compare" id="[zUUq$S],1Eq^_l|S~V2"><field name="OP">LTE</field><value name="A"><block type="variables_get" id="Cav75PX).rC$qSdc6Tgn"><field name="VAR">距离</field></block></value><value name="B"><block type="math_number" id="},Dx7},it#*Cno5|U6c["><field name="NUM">50</field></block></value></block></value><statement name="DO0"><block type="esp32_onboard_music_pitch_with_time" id="vK!-Ing=TRD0dhtiPn0}"><value name="pitch"><shadow type="pins_tone_notes" id="?{^Gid$~Z;C1jlQx})j+"><field name="PIN">659</field></shadow></value><value name="time"><shadow type="math_number" id="05$P`dUyzP4jYXw}cBc1"><field name="NUM">1000</field></shadow><block type="math_arithmetic" id=",;*1HJOvd+dMeQOYY5]D"><field name="OP">MULTIPLY</field><value name="A"><shadow type="math_number" id="D|t$/X(WEy-8-{SK_L)t"><field name="NUM">1</field></shadow><block type="variables_get" id="`lG$ACocr|mXRb4`z#~*"><field name="VAR">距离</field></block></value><value name="B"><shadow type="math_number" id="K|kH3d9,PD}U:=3mkz+$"><field name="NUM">20</field></shadow></value></block></value><next><block type="controls_delay_new" id="wmT`6keF@Zf~]/L8ku:v"><field name="Time">ms</field><value name="DELAY_TIME"><shadow type="math_number" id="{L3-/mDG`~EB?Zh@6{XI"><field name="NUM">1</field></shadow><block type="math_arithmetic" id="E2ywN?`?hC[L[Yt2:is/"><field name="OP">MULTIPLY</field><value name="A"><shadow type="math_number" id="S=8S/acO8~qf@xhX~!mv"><field name="NUM">1</field></shadow><block type="variables_get" id="4D+mma3j/eXpAO_-n|sr"><field name="VAR">距离</field></block></value><value name="B"><shadow type="math_number" id=";h;}Fe4fKChr(aJxFmOM"><field name="NUM">20</field></shadow></value></block></value></block></next></block></statement></block></next></block></next></block></statement></block></next></block></xml><config>{}</config><code>aW1wb3J0IHNvbmFyCmZyb20gbWl4Z29fbWluaSBpbXBvcnQgb25ib2FyZF9tYXRyaXgKZnJvbSBtaXhnb19taW5pIGltcG9ydCBvbmJvYXJkX211c2ljCmltcG9ydCB0aW1lCgoK6Led56a7ID0gMAp3aGlsZSBUcnVlOgogICAg6Led56a7ID0gcm91bmQoc29uYXIuU29uYXIoMyw0KS5jaGVja2Rpc3QoKSkKICAgIG9uYm9hcmRfbWF0cml4LnNob3dzKOi3neemuyxzcGFjZSA9IDAsY2VudGVyID0gVHJ1ZSkKICAgIGlmIOi3neemuyA8PSA1MDoKICAgICAgICBvbmJvYXJkX211c2ljLnBpdGNoX3RpbWUoNjU5LCAo6Led56a7ICogMjApKQogICAgICAgIHRpbWUuc2xlZXBfbXMoKOi3neemuyAqIDIwKSkK</code>