Files
mixly3/boards/default/arduino_avr/examples/01-输入输出/07-声控灯.mix
2024-07-19 10:16:00 +08:00

1 line
2.5 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 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>