Files
mixly3/boards/default/arduino_avr/examples/08-通信/02-IICSlave_字符串.mix
2024-07-19 10:16:00 +08:00

1 line
6.2 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="j+($DmLkE]t$lW.l~_QC" x="0" y="0"><field name="VALUE">IIC通信:当接收到ON时点亮D13当打开OFF时熄灭D13\n\nUNO1(A4)-UNO2(A4)\nUNO1(A5)-UNO2(A5)\nUNO1(GND)-UNO2(GND)</field></block><block type="base_setup" id="4FBZOZL{:[|H*HfRTWCb" x="0" y="145"><statement name="DO"><block type="i2c_slave_Init" id="L80dE_GW!0w6F7[E*nzm"><value name="i2c_address"><shadow type="math_number" id="_!:rEG-pwM8FC/#kd`nz"><field name="NUM">4</field></shadow></value><next><block type="variables_declare" id="PKvntp.S=7v+8Ik0F`?Y"><field name="variables_type">global_variate</field><field name="VAR">ReceiveString</field><field name="TYPE">String</field><value name="VALUE"><block type="text" id="Gx{0v^F$P8op}u3rGB%a"><field name="TEXT"></field></block></value><next><block type="variables_declare" id="`}3cEx-v1t$7tRLn79je"><field name="variables_type">global_variate</field><field name="VAR">LED_STA</field><field name="TYPE">boolean</field><value name="VALUE"><block type="math_number" id="hMst*NEBxsRF]@|2xo)o"><field name="NUM">0</field></block></value></block></next></block></next></block></statement></block><block type="variables_set" id="NE!tHzJ3aH)IjKGRe:7z" x="0" y="300"><field name="VAR">ReceiveString</field><value name="VALUE"><block type="text" id="6w+}$!1jWHL1F?MrGAB5"><field name="TEXT"></field></block></value><next><block type="i2c_slave_onreceive" id="_xA*,*COvF8:#ol0:K]/"><statement name="DO"><block type="controls_whileUntil" id="MEaF?D]2U~?H2aZ)`c,2"><field name="MODE">WHILE</field><value name="BOOL"><shadow xmlns="http://www.w3.org/1999/xhtml" type="logic_boolean" id="kbtnu9`@b%^9DhiHA!ib"><field name="BOOL">TRUE</field></shadow><block type="i2c_available" id="twPd}/RSpFf]Fbdg-:bo"></block></value><statement name="DO"><block type="variables_operation" id="6]Y`(jN+w~Y*IjP6R]NR"><field name="type">+</field><value name="variables"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="b9GTZ*cK`;f4;rX!2|,_"><field name="NUM">item</field></shadow><block type="variables_get" id="yATvhd,.POwj@bnMhY{n"><field name="VAR">ReceiveString</field></block></value><value name="data"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="y?}fReoA.1!Kx2CbYKYy"><field name="NUM">1</field></shadow><block type="variables_change" id="!51`9jsdUC|thr7S:,2L"><field name="OP">char</field><value name="MYVALUE"><block type="i2c_read" id="WCBRvyMQEEO2dS0RdmsE"></block></value></block></value></block></statement><next><block type="serial_println" id=")/`dP,UHSH?Gzc}F%@VE"><field name="serial_select">Serial</field><field name="new_line">println</field><value name="CONTENT"><block type="variables_get" id="!96juH;qfFfhwe;wCAI,"><field name="VAR">ReceiveString</field></block></value><next><block type="controls_if" id="p*Bm+`K,!7~v,5yjqM#o"><value name="IF0"><block type="logic_compare" id="~F_Hx9:V-TG6B(r%by^/"><field name="OP">EQ</field><value name="A"><block type="variables_get" id="~:#xdgg~InH/UfB{;kJO"><field name="VAR">ReceiveString</field></block></value><value name="B"><block type="text" id="J%t,0Gt~+b3IMeD)-UYG"><field name="TEXT">ON</field></block></value></block></value><statement name="DO0"><block type="inout_digital_write2" id="0v3C8(^?5{8|SZJ!HDmk"><value name="PIN"><shadow type="pins_digital" id="X^M~IL1M%;Uo^3kL#$16"><field name="PIN">13</field></shadow></value><value name="STAT"><shadow type="inout_highlow" id="g{BzrK=iSd;lI^[Utu++"><field name="BOOL">HIGH</field></shadow></value><next><block type="variables_set" id="mN8@e#+_^:VHDuQn$CH{"><field name="VAR">LED_STA</field><value name="VALUE"><block type="math_number" id="GJ`sek(Uq8v^)ptfG[b*"><field name="NUM">1</field></block></value><next><block type="controls_delay" id="Mtw`#3O{cm5Hc]A|H|b$"><field name="UNIT">delay</field><value name="DELAY_TIME"><shadow type="math_number" id="bb=x~spv!h4Kd#iY5Rif"><field name="NUM">2000</field></shadow></value></block></next></block></next></block></statement><next><block type="controls_if" id="X0S!;rkjC(3bzpS,?Ax."><value name="IF0"><block type="logic_compare" id="#iVBOh`e9zGyq;C4!mAy"><field name="OP">EQ</field><value name="A"><block type="variables_get" id="?NAWZE)?.Bu_;K~hWhm@"><field name="VAR">ReceiveString</field></block></value><value name="B"><block type="text" id="po5-CsI3qar(|qGZ2ZtM"><field name="TEXT">OFF</field></block></value></block></value><statement name="DO0"><block type="inout_digital_write2" id="WwTf#fk]])ED~gA{IIb5"><value name="PIN"><shadow type="pins_digital" id="!OBE[sRQqHi!UcGx~K5P"><field name="PIN">13</field></shadow></value><value name="STAT"><shadow type="inout_highlow" id="O~W(~3xirv!.gdlBmFp~"><field name="BOOL">LOW</field></shadow></value><next><block type="variables_set" id="2{^R%g`u~X2[/5eIi`CR"><field name="VAR">LED_STA</field><value name="VALUE"><block type="math_number" id=",vldp_(LUNB=BQWjB#{C"><field name="NUM">0</field></block></value><next><block type="controls_delay" id="a/MxtAFE!DtL/;eK;;bW"><field name="UNIT">delay</field><value name="DELAY_TIME"><shadow type="math_number" id="3lZGuC!UJm9{!Tbb;B8t"><field name="NUM">2000</field></shadow></value></block></next></block></next></block></statement></block></next></block></next></block></next></block></statement><next><block type="i2c_slave_onrequest" id="wZN@+^ZAhH+?cC@MQAY3"><statement name="DO"><block type="controls_switch_case" id="Gn|-`H7f5rmo7,m^TZ9`"><mutation xmlns="http://www.w3.org/1999/xhtml" elseif="2"></mutation><value name="IF0"><block type="variables_get" id="u6,,RD3q/.Wb_cjoGRd9"><field name="VAR">LED_STA</field></block></value><value name="IF1"><block type="math_number" id=")!Q@10D]fD:=|=^=^6hD"><field name="NUM">1</field></block></value><statement name="DO1"><block type="i2c_write" id="[}QLVCyI?PIbw/G^Lr(G"><value name="i2c_write_data"><shadow type="text" id="o$}_Q3[RT~0LnAE{Fj/J"><field name="TEXT">YES</field></shadow></value></block></statement><value name="IF2"><block type="math_number" id="SA/jKen2@amVCN$wIFXP"><field name="NUM">0</field></block></value><statement name="DO2"><block type="i2c_write" id="4P,IeM@o|``3[LlR7/g,"><value name="i2c_write_data"><shadow type="text" id="#~P~keP6WW!pYAX*R*cK"><field name="TEXT">NO</field></shadow></value></block></statement></block></statement></block></next></block></next></block></xml>