fix buzzer

This commit is contained in:
fredqian
2024-07-23 20:47:22 +08:00
parent 37f53a66e3
commit 43caecbae6
1189 changed files with 1948 additions and 1946 deletions

View File

@@ -0,0 +1 @@
<xml version="Mixly 2.0 Beta11" board="Arduino AVR@Arduino/Genuino Uno" xmlns="http://www.w3.org/1999/xhtml"><block type="factory_notes" id="U!}rzzjaD144`qFiFf8V" x="-6" y="30"><field name="VALUE">用蜂鸣器模拟SOS信号\n蜂鸣器D3\n</field><next><block type="procedures_callnoreturn" id="kGH:veFvE|.q5Zfut]3."><mutation xmlns="http://www.w3.org/1999/xhtml" name="3短"></mutation><next><block type="controls_delay" id="|}x(Mw#b[XL3YUsQ.W@8"><field name="UNIT">delay</field><value name="DELAY_TIME"><shadow type="math_number" id="om4NWt%zt_fXtgk)]:1/"><field name="NUM">500</field></shadow></value><next><block type="procedures_callnoreturn" id="]~1y#Urjn~G23MT$zrCo"><mutation xmlns="http://www.w3.org/1999/xhtml" name="3长"></mutation><next><block type="controls_delay" id="31LWlNs)0?{HHLT2t@66"><field name="UNIT">delay</field><value name="DELAY_TIME"><shadow type="math_number" id="2R=7qPg@;]1r^J${1w/:"><field name="NUM">500</field></shadow></value><next><block type="procedures_callnoreturn" id="9o%{a8YH[u`I{~||[d.%"><mutation xmlns="http://www.w3.org/1999/xhtml" name="3短"></mutation><next><block type="controls_delay" id="MO2fNfEQdeY6G%2s[u3("><field name="UNIT">delay</field><value name="DELAY_TIME"><shadow type="math_number" id="#;,u=x!a6aC=wYjYFPV^"><field name="NUM">500</field></shadow></value></block></next></block></next></block></next></block></next></block></next></block></next></block><block type="procedures_defnoreturn" id="2)kk9Cy7(xMt%qc`%*QC" x="0" y="320"><field name="NAME">3短</field><statement name="STACK"><block type="controls_for" id=",`TXaiY0ep:KBX;U*n~F"><field name="VAR">i</field><value name="FROM"><shadow type="math_number" id="};G?omQFe6Om}pQ]G4@g"><field name="NUM">1</field></shadow></value><value name="TO"><shadow type="math_number" id=":6CmR(9C4z)kM$uZX1a5"><field name="NUM">3</field></shadow></value><value name="STEP"><shadow type="math_number" id="J*lO(sg_4B%X~P)G0,!Q"><field name="NUM">1</field></shadow></value><statement name="DO"><block type="inout_digital_write2" id="cV%X*KHKn5M-!}E.vf=$"><value name="PIN"><shadow type="pins_digital" id="F8_O;CwF~hzx+q=B,o!b"><field name="PIN">3</field></shadow></value><value name="STAT"><shadow type="inout_highlow" id="0AWh|Zu@yZ;aXuBR.sR["><field name="BOOL">HIGH</field></shadow></value><next><block type="controls_delay" id="M^!QCJ^WLFRof=IOea6?"><field name="UNIT">delay</field><value name="DELAY_TIME"><shadow type="math_number" id="zPzG#)er_l;Hpnsb{2ko"><field name="NUM">200</field></shadow></value><next><block type="inout_digital_write2" id="IPQ{DI|!4h{0wf/-EuZ+"><value name="PIN"><shadow type="pins_digital" id="mK)*P;%]S-csLT^V}[`B"><field name="PIN">3</field></shadow></value><value name="STAT"><shadow type="inout_highlow" id="S8Ph3TE=o;/aFkHJ5![*"><field name="BOOL">LOW</field></shadow></value><next><block type="controls_delay" id="9zm[{VWAo;wz}H,@qFP."><field name="UNIT">delay</field><value name="DELAY_TIME"><shadow type="math_number" id="iQ?QsTYfpHZ{DlzTd::@"><field name="NUM">200</field></shadow></value></block></next></block></next></block></next></block></statement></block></statement></block><block type="procedures_defnoreturn" id="%Xob#e#pHi,[h|59$Z8J" x="0" y="585"><field name="NAME">3长</field><statement name="STACK"><block type="controls_for" id="YfPIn`mAE)/bo*N~|M`G"><field name="VAR">i</field><value name="FROM"><shadow type="math_number" id="prEu1eZ+?tCdPB5bg]nT"><field name="NUM">1</field></shadow></value><value name="TO"><shadow type="math_number" id="ia6bKGupXy;ldBxND/Un"><field name="NUM">3</field></shadow></value><value name="STEP"><shadow type="math_number" id="*~.b76r]1IAmPv?O1?pA"><field name="NUM">1</field></shadow></value><statement name="DO"><block type="inout_digital_write2" id="=r1UQ52c{kR*ntNcbVf5"><value name="PIN"><shadow type="pins_digital" id="GgEE8Iz6Pf?uSyx40-cn"><field name="PIN">3</field></shadow></value><value name="STAT"><shadow type="inout_highlow" id="A%j]%.MsST*Qd]tle.Pi"><field name="BOOL">HIGH</field></shadow></value><next><block type="controls_delay" id="dT+iStE1u!*@[]SY/=*X"><field name="UNIT">delay</field><value name="DELAY_TIME"><shadow type="math_number" id="JN7??BVG#Ow}4tr{rbn["><field name="NUM">400</field></shadow></value><next><block type="inout_digital_write2" id="bDY/.mM%g)iy[B5?7Cr}"><value name="PIN"><shadow type="pins_digital" id=")ztBG@~!lg$b|sK$:VR5"><field name="PIN">3</field></shadow></value><value name="STAT"><shadow type="inout_highlow" id="?LIYeJ8-F8pCE]Yw,76p"><field name="BOOL">LOW</field></shadow></value><next><block type="controls_delay" id="?pa%Ljs(i@#mFlGU^eCB"><field name="UNIT">delay</field><value name="DELAY_TIME"><shadow type="math_number" id="],H{UQcAup1k9A`]{XRX"><field name="NUM">200</field></shadow></value></block></next></block></next></block></next></block></statement></block></statement></block></xml>

View File

@@ -0,0 +1 @@
<xml version="Mixly 2.0 Beta11" board="Arduino AVR@Arduino/Genuino Uno" xmlns="http://www.w3.org/1999/xhtml"><block type="factory_notes" id="}:v6ZCs~`1msnWI@%UHE" x="-4" y="-41"><field name="VALUE">D10接LED\n通过函数的参数传入呼吸灯一个周期的总时长</field><next><block type="procedures_callnoreturn" id="A?.8X`N3OJr7^p|{2?ih" inline="true"><mutation xmlns="http://www.w3.org/1999/xhtml" name="fade"><arg name="time"></arg></mutation><value name="ARG0"><block type="math_number" id="]b=*s~pihHyk=;V-iTCQ"><field name="NUM">1000</field></block></value></block></next></block><block type="procedures_defnoreturn" id="m}^NDuct,Rizb2lv5qAp" x="0" y="66"><mutation xmlns="http://www.w3.org/1999/xhtml"><arg name="time" vartype="long"></arg></mutation><field name="NAME">fade</field><statement name="STACK"><block type="controls_for" id="sUA{zk!J!WI|s@]5aEy]"><field name="VAR">brightness</field><value name="FROM"><shadow type="math_number" id=":W{~M4=_7x^Wv/,zxmjp"><field name="NUM">0</field></shadow></value><value name="TO"><shadow type="math_number" id="FO6SXAPG9~x6kV3gRfnk"><field name="NUM">255</field></shadow></value><value name="STEP"><shadow type="math_number" id="r`07Wo~p|3i@+FS7oM%C"><field name="NUM">1</field></shadow></value><statement name="DO"><block type="inout_analog_write" id="+h1n7Xm(vDP{ohNP3:{["><value name="PIN"><shadow type="pins_pwm" id="kz~}@^(ONV4kJ:x5E5lD"><field name="PIN">10</field></shadow></value><value name="NUM"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="nLk7hpvhA}k,8Tg^v0~%"><field name="NUM">0</field></shadow><block type="variables_get" id="ZviJN%j^;a?vt64,KND|"><field name="VAR">brightness</field></block></value><next><block type="base_delay" id="Y}@(iS)J-ZBhmx@I%M(^"><field name="UNIT">delay</field><value name="DELAY_TIME"><shadow xmlns="" type="math_number"><field xmlns="" name="NUM">1000</field></shadow><block type="math_arithmetic" id="1A,zZqh.P6yr.|#z!eq+"><field name="OP">DIVIDE</field><value name="A"><shadow xmlns="" type="math_number"><field xmlns="" name="NUM">1</field></shadow><block type="variables_get" id="ki`Xy9QoOd/NaK;Zh,~-"><field name="VAR">time</field></block></value><value name="B"><shadow xmlns="" type="math_number"><field xmlns="" name="NUM">1</field></shadow><block type="math_number" id="+U5@0ie0[P=mjqkxMUsb"><field name="NUM">512</field></block></value></block></value></block></next></block></statement><next><block type="controls_for" id="[)pW5jd(udb4RWQ]q/^:"><field name="VAR">brightness</field><value name="FROM"><shadow type="math_number" id="L8bplE~M6BnZP2yGQ#rQ"><field name="NUM">255</field></shadow></value><value name="TO"><shadow type="math_number" id="9#1)Nwx*Lc4:3(¤x(%"><field name="NUM">0</field></shadow></value><value name="STEP"><shadow type="math_number" id="]P~Gx_0X7eNQ{D*{H4^W"><field name="NUM">-1</field></shadow></value><statement name="DO"><block type="inout_analog_write" id="K,BpJqiIFeLNZr5l)3(%"><value name="PIN"><shadow type="pins_pwm" id="]VW@_sk@^lY1hX7qm])0"><field name="PIN">10</field></shadow></value><value name="NUM"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="nLk7hpvhA}k,8Tg^v0~%"><field name="NUM">0</field></shadow><block type="variables_get" id="_Mj.lXX`y{QdPA6hi+1i"><field name="VAR">brightness</field></block></value><next><block type="base_delay" id="6U==,-5R!o6)v7}W}woT"><field name="UNIT">delay</field><value name="DELAY_TIME"><shadow xmlns="" type="math_number"><field xmlns="" name="NUM">1000</field></shadow><block type="math_arithmetic" id="E@J1KBXMxAC.oG~foy_K"><field name="OP">DIVIDE</field><value name="A"><shadow xmlns="" type="math_number"><field xmlns="" name="NUM">1</field></shadow><block type="variables_get" id="8/5zL{3![:zo|=`l-4|k"><field name="VAR">time</field></block></value><value name="B"><shadow xmlns="" type="math_number"><field xmlns="" name="NUM">1</field></shadow><block type="math_number" id="CV)isag5M?;;|R9?7x@J"><field name="NUM">512</field></block></value></block></value></block></next></block></statement></block></next></block></statement></block></xml>