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="base_setup" id="YP:L9EuH64jex9U3d)`N" x="-1136" y="-392"><statement name="DO"><block type="lists_create_with_text2" id="ZC9WyxxooVYf00kr57hU"><field name="TYPE">int</field><field name="VAR">Light</field><field name="SIZE">9</field><field name="TEXT">1,2,4,8,16,32,64,128,256</field></block></statement></block><block type="factory_notes" id="Y$yR`jMTSv7=79lWzOh6" x="-1162" y="-283"><field name="VALUE">D8连接到74HC595芯片的使能引脚\nD12连接到74HC595芯片的时钟引脚\nD11连接到74HC595芯片的数据引脚\n实现8个LED的流水灯效果</field><next><block type="controls_for" id="A[Q3{)XC{j+FQ+J;uHLX"><field name="VAR">i</field><value name="FROM"><shadow type="math_number" id="e)HZZ*.e*Ot?%_.1*?m9"><field name="NUM">1</field></shadow></value><value name="TO"><shadow type="math_number" id="EHXwf@PV;Jy-k)niG*Qd"><field name="NUM">8</field></shadow></value><value name="STEP"><shadow type="math_number" id="~E~~ay{VLSH}.Y%`-Ie6"><field name="NUM">1</field></shadow></value><statement name="DO"><block type="inout_digital_write2" id="aDu?1$]z[K/k,gJUDr]*"><value name="PIN"><shadow type="pins_digital" id="q?NCDdCWCG*H#AWbsbO7"><field name="PIN">8</field></shadow></value><value name="STAT"><shadow type="inout_highlow" id="xkx%pE@=`hDOQaKvwcY("><field name="BOOL">LOW</field></shadow></value><next><block type="inout_shiftout" id="qRvsqRaa!5k(Kv1Q36}T"><field name="ORDER">MSBFIRST</field><value name="PIN1"><shadow type="pins_digital" id="Y!QDa6ioUX!j$nqNzP7i"><field name="PIN">11</field></shadow></value><value name="PIN2"><shadow type="pins_digital" id="]0:V8q]aOqoQPQDaPOeb"><field name="PIN">12</field></shadow></value><value name="DATA"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="P)G,(nMDuuLgcsP;moHX"><field name="NUM">0</field></shadow><block type="lists_getIndex" id="dt]pgJRC{pLRg5=F6MAJ"><field name="VAR">Light</field><value name="AT"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="-iO:-|g;)$PhW!DOQCZ6"><field name="NUM">1</field></shadow><block type="variables_get" id="k|9Hd0SRY~wu8t*EU,gz"><field name="VAR">i</field></block></value></block></value><next><block type="inout_digital_write2" id="Q~k$mlYF82wHK097iy^)"><value name="PIN"><shadow type="pins_digital" id="ia|eO/AW5lMkCl^GYGW+"><field name="PIN">8</field></shadow></value><value name="STAT"><shadow type="inout_highlow" id="_v#G7K{j()ys,O6)O+:Z"><field name="BOOL">HIGH</field></shadow></value><next><block type="controls_delay" id="6Yl^.FmIT^V/r-2mv^Ch"><field name="UNIT">delay</field><value name="DELAY_TIME"><shadow type="math_number" id="LT80mn#mmTCBu1XuJ/9;"><field name="NUM">1000</field></shadow></value><next><block type="inout_digital_write2" id="Az.sB;{S@0,Inlxb{]K9"><value name="PIN"><shadow type="pins_digital" id="VX1s-%z$}/#oa)DV6z)$"><field name="PIN">8</field></shadow></value><value name="STAT"><shadow type="inout_highlow" id="|t=;|*yxVALibLklm9fr"><field name="BOOL">LOW</field></shadow></value><next><block type="inout_shiftout" id="+l2P~Rn)`G}CtvjS_tt*"><field name="ORDER">MSBFIRST</field><value name="PIN1"><shadow type="pins_digital" id="K6n]wf3sWaVP0.ehEB:L"><field name="PIN">11</field></shadow></value><value name="PIN2"><shadow type="pins_digital" id="*jHY5vvRpZx5atF6=ei."><field name="PIN">12</field></shadow></value><value name="DATA"><shadow type="math_number" id="y^3w/eQ+D9YZ5puUo)"><field name="NUM">0</field></shadow></value><next><block type="inout_digital_write2" id="fT=WB[a/L):_jQup3UNC"><value name="PIN"><shadow type="pins_digital" id="Y~)xTCZQ*nFT2sb?6,+E"><field name="PIN">8</field></shadow></value><value name="STAT"><shadow type="inout_highlow" id="uVdxnA/1B:N#Az:DY:ed"><field name="BOOL">HIGH</field></shadow></value></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block></next></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="v)MT}Dct]P130YkSVq3C" x="0" y="0"><field name="VALUE">硬件中断\nD2连接按钮D12连接LED。\n按下按钮LED灯点亮。\n再次按下按钮LED灯熄灭。如此往复。</field></block><block type="base_setup" id="wZXYB!R2R{@1*M1+tdv2" x="0" y="125"><statement name="DO"><block type="controls_attachInterrupt" id="Sr-*1#DV!rHf1nCy6H[Y"><field name="mode">RISING</field><value name="PIN"><shadow type="pins_interrupt" id="13%-H+9.iRg5SEcGMqj6"><field name="PIN">2</field></shadow></value><statement name="DO"><block type="inout_digital_write2" id="gO~;SN|yASiQ=Fde:il@"><value name="PIN"><shadow type="pins_digital" id="D)Xc9*d4kx+^dZ-bYzjb"><field name="PIN">12</field></shadow></value><value name="STAT"><shadow xmlns="http://www.w3.org/1999/xhtml" type="inout_highlow" id=";_4MaL98h]t}2L]!R4S]"><field name="BOOL">HIGH</field></shadow><block type="logic_negate" id="Rqt,xFN-_*uphvdJm~q^"><value name="BOOL"><block type="inout_digital_read2" id="^}U:fN*nYHG1FG51IB[6"><value name="PIN"><shadow type="pins_digital" id="*~`3S%8rfAa!CE9E9Dg7"><field name="PIN">12</field></shadow></value></block></value></block></value></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="controls_for" id="-E|,x{YX(eFJY_#*1Oqj" x="106" y="191"><field name="VAR">i</field><value name="FROM"><shadow type="math_number" id="v1f9r*croH.0u/R5spgD"><field name="NUM">0</field></shadow></value><value name="TO"><shadow type="math_number" id=".P~^60_ED*+r=i}R5g6n"><field name="NUM">255</field></shadow></value><value name="STEP"><shadow type="math_number" id="iY.]4mt)Le~9q53Q1xDv"><field name="NUM">1</field></shadow></value><statement name="DO"><block type="inout_soft_analog_write" id="qEOY2/1t#5b57dB{gXFj"><value name="PIN"><shadow type="pins_digital" id="S]R=WbHh@U3wOk#c%rx*"><field name="PIN">13</field></shadow></value><value name="NUM"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="CKcbol6F,%~M!8RPMV}L"><field name="NUM">255</field></shadow><block type="variables_get" id="7E%YK;VP2-Q:A^-^;{}+"><field name="VAR">i</field></block></value><next><block type="controls_delay" id="%Ov0TG^[M5[a3_[~UzjY"><field name="UNIT">delay</field><value name="DELAY_TIME"><shadow type="math_number" id="Zi0G_I#Rz;L5!#(/Zgc)"><field name="NUM">5</field></shadow></value></block></next></block></statement><next><block type="controls_for" id="Zsu/FwknNHrT~|=76vdg"><field name="VAR">i</field><value name="FROM"><shadow type="math_number" id="(lk31;1-2f|l)70?i2j0"><field name="NUM">254</field></shadow></value><value name="TO"><shadow type="math_number" id="F?,Jb[9!K]*.zI@x-haY"><field name="NUM">1</field></shadow></value><value name="STEP"><shadow type="math_number" id="uFtD43nnp4x`$qi9lX[C"><field name="NUM">-1</field></shadow></value><statement name="DO"><block type="inout_soft_analog_write" id="I0pShU;aE!).n:7$qUD1"><value name="PIN"><shadow type="pins_digital" id="1YPNr#4vxG[=O^lxn@z`"><field name="PIN">13</field></shadow></value><value name="NUM"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="CKcbol6F,%~M!8RPMV}L"><field name="NUM">255</field></shadow><block type="variables_get" id="YbTQ|2ApKlGRm4HV|E:B"><field name="VAR">i</field></block></value><next><block type="controls_delay" id="V[!uU7D[2}M;/tS|(E%;"><field name="UNIT">delay</field><value name="DELAY_TIME"><shadow type="math_number" id="qMVodeJh4]I15AamwsAG"><field name="NUM">5</field></shadow></value></block></next></block></statement></block></next></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="W#8dF_x;U@SNrzk[Cvo-" x="-34" y="150"><field name="VALUE">A1连接声音传感器D11连接LED灯。\n先通过串口输出A1的模拟值观察声音值大小。\n当声音传感器的模拟值大于300时点亮11引脚的LED灯1秒否则熄灭LED。</field><next><block type="serial_begin" id="Cty8^9}RR`Y@%nFE._"><field name="serial_select">Serial</field><value name="CONTENT"><shadow type="math_number" id="gMxFn;x.7JE=5p|eHzX:"><field name="NUM">9600</field></shadow></value><next><block type="serial_println" id="w?w=YA!?eE:J:MfP[Q(u"><field name="serial_select">Serial</field><field name="new_line">println</field><value name="CONTENT"><block type="inout_analog_read" id="wpI69.3FLwHPPZF[#GJe"><value name="PIN"><shadow type="pins_analog" id="e_/?RL!4I=Z#LdrPg~#F"><field name="PIN">A1</field></shadow></value></block></value><next><block type="controls_if" id="dRSIh)3Y+qiuq%tM#^mh"><mutation xmlns="http://www.w3.org/1999/xhtml" else="1"></mutation><value name="IF0"><block type="logic_compare" id=".?my,OTJ`[oF(r+_/L7b"><field name="OP">GT</field><value name="A"><block type="inout_analog_read" id="ktK,]Ti0kB7O#)`]!9rH"><value name="PIN"><shadow type="pins_analog" id="/t2D+DEXcN?hzbed~Ysa"><field name="PIN">A1</field></shadow></value></block></value><value name="B"><block type="math_number" id="`Gr[zml/ltXQEd/H^=Eu"><field name="NUM">300</field></block></value></block></value><statement name="DO0"><block type="inout_digital_write2" id="=b7hlVa9xt{w0F{%Y(d}"><value name="PIN"><shadow type="pins_digital" id="in9dmts4O^L+(DQ1Y4lw"><field name="PIN">11</field></shadow></value><value name="STAT"><shadow type="inout_highlow" id="0WUTA//*3Jt{hm{k|?nf"><field name="BOOL">HIGH</field></shadow></value><next><block type="base_delay" id="CVZ;+|.dn;[QsU4)?=6."><field name="UNIT">delay</field><value name="DELAY_TIME"><shadow type="math_number" id="KWiJwGv5JMTzV1n+uS.H"><field name="NUM">1000</field></shadow></value></block></next></block></statement><statement name="ELSE"><block type="inout_digital_write2" id="wiL0n;#%S¾9t;U##;8"><value name="PIN"><shadow type="pins_digital" id="QkZ^=WxlF-nijDai#=tM"><field name="PIN">11</field></shadow></value><value name="STAT"><shadow type="inout_highlow" id="7/V}@4^8a4_wOq|ei.D}"><field name="BOOL">LOW</field></shadow></value></block></statement></block></next></block></next></block></next></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=".j3YgQW3wV=4`uA`I1Vr" x="0" y="0"><field name="VALUE">软件中断\n\nD4连接按钮D12连接LED。\n将看到按钮被按下LED灯亮灭切换。</field></block><block type="base_setup" id="WuzzT{pjb],,.!#NwDMc" x="0" y="125"><statement name="DO"><block type="controls_attachPinInterrupt" id="`Q`Sq,Y#;DsiRPRa{{qm"><field name="mode">FALLING</field><value name="PIN"><shadow type="pins_digital" id="f6g.$b*FoSiss5`D|SoK"><field name="PIN">4</field></shadow></value><statement name="DO"><block type="inout_digital_write2" id="n!Z0b=b+7rY{We`l8:Qo"><value name="PIN"><shadow type="pins_digital" id="j7NVjtcC2*$J_6A@H!CY"><field name="PIN">12</field></shadow></value><value name="STAT"><shadow xmlns="http://www.w3.org/1999/xhtml" type="inout_highlow" id="{d/Lz+v|.e%/5|AB8Ux="><field name="BOOL">HIGH</field></shadow><block type="logic_negate" id="VLna2#3*e}2[a!oD`Xn0"><value name="BOOL"><block type="inout_digital_read2" id=")9C^/1UhrVNCnd5VXQYE"><value name="PIN"><shadow type="pins_digital" id="kaL#=paLrfn)Z$?8FM+j"><field name="PIN">12</field></shadow></value></block></value></block></value></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="%7/$M@N7uVYD-9;Xoanp" x="87" y="81"><field name="VALUE">D13连接LED\nLED将亮一秒灭一秒</field><next><block type="inout_digital_write2" id="5I?mY;XLB5aG+8WQF0,N"><value name="PIN"><shadow type="pins_digital" id=".u:BArqSJAoy%~)@9e~J"><field name="PIN">13</field></shadow></value><value name="STAT"><shadow type="inout_highlow" id="NgqfKpDv_U+=W,Sq9p8K"><field name="BOOL">HIGH</field></shadow></value><next><block type="base_delay" id="/VC4xT5Q1rM([Y)@cHHB"><field name="UNIT">delay</field><value name="DELAY_TIME"><shadow type="math_number" id="5W.@`n(d/Aaz~aF4tDFo"><field name="NUM">1000</field></shadow></value><next><block type="inout_digital_write2" id="D4AK_(3XazX9:BJJzzQz"><value name="PIN"><shadow type="pins_digital" id="``4Ml5j3KOKJy2fV_0QC"><field name="PIN">13</field></shadow></value><value name="STAT"><shadow type="inout_highlow" id="~;WUPDI?EJdru+wEQ~x6"><field name="BOOL">LOW</field></shadow></value><next><block type="base_delay" id="Mo2XM8LM3X#6c/mAD+TN"><field name="UNIT">delay</field><value name="DELAY_TIME"><shadow type="math_number" id="KGw3x~Ye;u:LqJY4#WsN"><field name="NUM">1000</field></shadow></value></block></next></block></next></block></next></block></next></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="-qABfA./d?eWD(`kIwgp" x="0" y="0"><field name="VALUE">D2上连接按钮\n将看到单击、双击、长按开始、长按中、长按结束在串口输出不同的提示语。</field></block><block type="OneButton_interrupt" id="}f_O5n}224:2XXq|:Nr*" x="0" y="85"><field name="mode">attachClick</field><value name="PIN"><shadow type="pins_digital" id="!oL_(.$Hz6x$Zq/e4LY?"><field name="PIN">2</field></shadow></value><value name="STAT"><shadow type="inout_highlow" id="ECY;UvUV6Ay_NwL8Fv;l"><field name="BOOL">HIGH</field></shadow></value><statement name="DO"><block type="serial_println" id="pc$Q)/3ryJz;.v|%jX2)"><field name="serial_select">Serial</field><field name="new_line">println</field><value name="CONTENT"><block type="text" id=".`^9ZO88n_YCcZwiI[9`"><field name="TEXT">one Click</field></block></value></block></statement></block><block type="OneButton_interrupt" id="^920H]~0ot{VcPzlnA2n" x="0" y="189"><field name="mode">attachDoubleClick</field><value name="PIN"><shadow type="pins_digital" id="^fu}Et-.O2}P)rOr/-0M"><field name="PIN">2</field></shadow></value><value name="STAT"><shadow type="inout_highlow" id="4,h`uVVTpS|$hS%(QCed"><field name="BOOL">HIGH</field></shadow></value><statement name="DO"><block type="serial_println" id="F/OZ|aF#,!+CQ,;xY9[Y"><field name="serial_select">Serial</field><field name="new_line">println</field><value name="CONTENT"><block type="text" id="d+Zse%0=v9;!]N,1Dwco"><field name="TEXT">double Click</field></block></value></block></statement></block><block type="OneButton_interrupt" id="3fNVB6AeS7sH5@ox-uRe" x="0" y="293"><field name="mode">attachLongPressStart</field><value name="PIN"><shadow type="pins_digital" id="H(%2WW:M7:dYa9BltoUJ"><field name="PIN">2</field></shadow></value><value name="STAT"><shadow type="inout_highlow" id="(hH#.Y6jL;5+NZIMu{M^"><field name="BOOL">HIGH</field></shadow></value><statement name="DO"><block type="serial_println" id=";S;y^6kLB#}2BbYiA{y-"><field name="serial_select">Serial</field><field name="new_line">println</field><value name="CONTENT"><block type="text" id="CJ^%VV3DuC=Ov!xGRZ5."><field name="TEXT">longPress Start</field></block></value></block></statement></block><block type="OneButton_interrupt" id="h_yWQeXR~NDsaNMDzwdZ" x="0" y="397"><field name="mode">attachDuringLongPress</field><value name="PIN"><shadow type="pins_digital" id="Lg4txf7TGpE!=A`VcK~%"><field name="PIN">2</field></shadow></value><value name="STAT"><shadow type="inout_highlow" id="}K]z+{et/J[^XW?|4vSv"><field name="BOOL">HIGH</field></shadow></value><statement name="DO"><block type="serial_println" id="FPb~%[z3!hN`[snD,k{k"><field name="serial_select">Serial</field><field name="new_line">println</field><value name="CONTENT"><block type="text" id="tM}AuTQ;INcv9wTZ^Q`M"><field name="TEXT">longPressing</field></block></value></block></statement></block><block type="OneButton_interrupt" id=",FlrUSEXy--7Gv}0+;ur" x="0" y="501"><field name="mode">attachLongPressStop</field><value name="PIN"><shadow type="pins_digital" id="[6,NG[Mb]=fC~q8g~Df+"><field name="PIN">2</field></shadow></value><value name="STAT"><shadow type="inout_highlow" id="bL)4hEJ?JCxG~nA6)Qi4"><field name="BOOL">HIGH</field></shadow></value><statement name="DO"><block type="serial_println" id="$#CS)#.uhGElO*`S^=Yb"><field name="serial_select">Serial</field><field name="new_line">println</field><value name="CONTENT"><block type="text" id="RIXw2g^MtE!YA=K:sQ2_"><field name="TEXT">longPress End</field></block></value></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="}5vt7]DJj#krIVoVW5B}" x="-1151" y="-156"><field name="VALUE">D3连接蜂鸣器\n在串口监视器中将看到高电平的脉冲周期</field><next><block type="serial_begin" id=".{(7Pnc*ml{|WNv4HCpO"><field name="serial_select">Serial</field><value name="CONTENT"><shadow type="math_number" id="ZksQo`sZwdR`sr*rlZS?"><field name="NUM">9600</field></shadow></value><next><block type="controls_tone" id="52%whi3L!R.w]fBL*H^h"><value name="PIN"><shadow type="pins_digital" id="qJ,wHR;1d^VR!P@WW(L_"><field name="PIN">3</field></shadow></value><value name="FREQUENCY"><shadow type="tone_notes" id="=$?8I@M,g+R@DMLsJ]UN"><field name="STAT">131</field></shadow></value><next><block type="serial_println" id="!vwG^kX~|XC-X{G=P+}L"><field name="serial_select">Serial</field><field name="new_line">println</field><value name="CONTENT"><block type="inout_pulseIn" id="}R~xk:5_.~PTs,ZjgL0j"><field name="STAT">HIGH</field><value name="PIN"><shadow type="pins_digital" id="s`zzL!t%x[tn6fBmIYjr"><field name="PIN">3</field></shadow></value></block></value><next><block type="serial_println" id="GEQWh`h|R!u2]5vUiaxe"><field name="serial_select">Serial</field><field name="new_line">println</field><value name="CONTENT"><block type="inout_pulseIn2" id="-Ty%YY%N4YJDT[JjW_2C"><field name="STAT">HIGH</field><value name="PIN"><shadow type="pins_digital" id="Sl.[,qfJXp+.3Me7y1Aa"><field name="PIN">3</field></shadow></value><value name="TIMEOUT"><shadow type="math_number" id="amSJXZ=gZ6lTw7v1m[X0"><field name="NUM">1000000</field></shadow></value></block></value><next><block type="controls_delay" id="}l3b1BL/7lv;e,wLF5Gb"><field name="UNIT">delay</field><value name="DELAY_TIME"><shadow type="math_number" id="$u.`1Fp|m1[4qVN[b2;`"><field name="NUM">1000</field></shadow></value><next><block type="serial_println" id="_q(0F{V[lHEA|$b@W$[m"><field name="serial_select">Serial</field><field name="new_line">println</field><value name="CONTENT"><block type="text" id="37c:[jYF@;w~`rQ$EP(v"><field name="TEXT">***********************************************************</field></block></value><next><block type="controls_notone" id="aE{xg~BN89Nvl7O?Hu)x"><value name="PIN"><shadow type="pins_digital" id="+ou])@MS`EJgKn7c{/37"><field name="PIN">3</field></shadow></value><next><block type="controls_delay" id="O|E@ds]y[eYNkJC.2jeR"><field name="UNIT">delay</field><value name="DELAY_TIME"><shadow type="math_number" id="}%i}Y10l|mbgv2ACz3/Z"><field name="NUM">1000</field></shadow></value></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></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="Za_v4_@(D7[bA+rgal2l" x="-424" y="47"><field name="VALUE">A0接电位器D3接LED。\n调节电位器LED灯随电位器转动改变亮度。</field><next><block type="inout_analog_write" id="P^oj@5C90vJf]vY-=z8?"><value name="PIN"><shadow type="pins_pwm" id="w@V@Vg`3i_L/h{v]ZboN"><field name="PIN">3</field></shadow></value><value name="NUM"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="2gc+GDaPe[T}qXzB1Ha["><field name="NUM">0</field></shadow><block type="math_arithmetic" id="3*E_5tsDr0{qDgQvDY)/"><field name="OP">DIVIDE</field><value name="A"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="-(im|Jt2c0ydUhJl1w/W"><field name="NUM">1</field></shadow><block type="inout_analog_read" id="5WHgd@[1uUXs,$6^lUA7"><value name="PIN"><shadow type="pins_analog" id="`%Z`J/Z:.)IDwf|}F;dt"><field name="PIN">A0</field></shadow></value></block></value><value name="B"><shadow type="math_number" id="C{GMjPoS/hLR6]TatmrE"><field name="NUM">4</field></shadow></value></block></value></block></next></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="base_setup" id="igiz?e):w#HplBjsO%%v" x="-1855" y="-195"><statement name="DO"><block type="lists_create_with_text2" id="L8($P=wD.ArJw|~~C)$;"><field name="TYPE">byte</field><field name="VAR">mylist</field><field name="SIZE">11</field><field name="TEXT">0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90</field></block></statement></block><block type="factory_notes" id="Y$yR`jMTSv7=79lWzOh6" x="-1856" y="-92"><field name="VALUE">D8连接到74HC595芯片的使能引脚\nD3连接到74HC595芯片的时钟引脚\nD9连接到74HC595芯片的数据引脚\n利用ShiftOut模块实现单位数码管的随机数字骰子</field><next><block type="controls_for" id="Q/N_N1AHAckzK[O={l7o"><field name="VAR">i</field><value name="FROM"><shadow type="math_number" id="Cbc;^U3-,~(-H:8_~8yQ"><field name="NUM">1</field></shadow></value><value name="TO"><shadow type="math_number" id="tOu34.?W39C-s,SRSQ[u"><field name="NUM">5</field></shadow></value><value name="STEP"><shadow type="math_number" id="^2a7dFgb;nB2mH#{`E@k"><field name="NUM">1</field></shadow></value><statement name="DO"><block type="inout_digital_write2" id="pT;vH8m#iL]*Rr:n#RX7"><value name="PIN"><shadow type="pins_digital" id="_|@jzNFq+RSAFAy:*qal"><field name="PIN">8</field></shadow></value><value name="STAT"><shadow type="inout_highlow" id="qgd^CoU`o}VkohX}iuVA"><field name="BOOL">LOW</field></shadow></value><next><block type="inout_shiftout" id="bD/r^6^|tfpW^1XU+;r."><field name="ORDER">MSBFIRST</field><value name="PIN1"><shadow type="pins_digital" id="M)[u7CK2rfny|s7R+hnJ"><field name="PIN">9</field></shadow></value><value name="PIN2"><shadow type="pins_digital" id="6D^qh3A/bAU[-uDvE^N}"><field name="PIN">3</field></shadow></value><value name="DATA"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="++{T3frtZU2d1h/7)Bb?"><field name="NUM">0</field></shadow><block type="lists_getIndex" id="zwai_-(Ur0%Nuij{x/3v"><field name="VAR">mylist</field><value name="AT"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="4h8sw|vHIA-Xls;aKniO"><field name="NUM">1</field></shadow><block type="math_random_int" id="EUtItk]X[+N7TIE}rRk`"><value name="FROM"><shadow type="math_number" id="4l`c=][n7P!3Ns(V=9G3"><field name="NUM">1</field></shadow></value><value name="TO"><shadow type="math_number" id="^SCoo7*7YU(Zd4^lsy[c"><field name="NUM">10</field></shadow></value></block></value></block></value><next><block type="inout_digital_write2" id="96IMy*+5{7e*Fs;t51iH"><value name="PIN"><shadow type="pins_digital" id=":ND]MB0O::y_1hoYA+lS"><field name="PIN">8</field></shadow></value><value name="STAT"><shadow type="inout_highlow" id="/5S`OgGs6Pov,x`)~h2a"><field name="BOOL">HIGH</field></shadow></value><next><block type="controls_delay" id="yY}-R/!02GFA`@l-h#?J"><field name="UNIT">delay</field><value name="DELAY_TIME"><shadow type="math_number" id="$ZV/awIZe9=61y(6:!+K"><field name="NUM">1000</field></shadow></value></block></next></block></next></block></next></block></statement></block></next></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="$þi_`;z-VGa+{bL=GH" x="-264" y="115"><field name="VALUE">D2接按钮D13接LED。\n按下按钮产生高电平点亮LED。\n松开按钮产生低电平熄灭LED。</field><next><block type="inout_digital_write2" id="_3sjo{/2bf,.Q)eYm#HU"><value name="PIN"><shadow type="pins_digital" id="jP:`Dt1p)5#wSHC#z@E."><field name="PIN">13</field></shadow></value><value name="STAT"><shadow xmlns="http://www.w3.org/1999/xhtml" type="inout_highlow" id="303~O#-j1HPeBpC!xW3D"><field name="BOOL">HIGH</field></shadow><block type="inout_digital_read2" id="WHcs.@LmLv%Sh70uE+Y?"><value name="PIN"><shadow type="pins_digital" id=";#0I9(~NtIUpU=#FW|lE"><field name="PIN">2</field></shadow></value></block></value></block></next></block></xml>