Files
mixly3/boards/default/arduino_avr/examples/10-传感器/12-DS1302液晶时钟.mix
2024-07-19 10:16:00 +08:00

1 line
15 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="wW~HB.uP7}M-QoxlMuT5" x="-206" y="-149"><field name="VALUE">用DS1302在LCD1602上显示实时时钟\nLCD1602接线SCL--D12,SDA——D11\nDS102接线RST-D2,DAT-D3,CLK-D4</field></block><block type="base_setup" id="7/sl^n3Jm;VkfU@^h,q`" x="-208" y="-59"><statement name="DO"><block type="group_lcd_init2" id="%kBef!Gc$!O%vWB6kYc4"><field name="TYPE">16,2</field><field name="VAR">mylcd</field><field name="SCL">12</field><field name="SDA">11</field><value name="device"><shadow type="math_number" id="YmDdqxf!,4?|dX]O,br7"><field name="NUM">0x3f</field></shadow></value><next><block type="serial_begin" id="t^$cE8-n1WmX#_ETL55,"><field name="serial_select">Serial</field><value name="CONTENT"><shadow type="math_number" id="X`5+?[@[g;cjix8dXyXJ"><field name="NUM">9600</field></shadow></value><next><block type="variables_declare" id="DPkc)f~}XaWNN!rNK7$Z"><field name="variables_type">global_variate</field><field name="VAR">:LsTime</field><field name="TYPE">String</field><value name="VALUE"><block type="text" id="`%jbWl]P}Hse[?ogzC]?"><field name="TEXT"> </field></block></value><next><block type="DS1302_init" id="K~9::`zX(qR(~Co6U.qF"><value name="RST"><shadow type="pins_digital" id="O}KibXsCQrvA_*!lWy0#"><field name="PIN">2</field></shadow></value><value name="DAT"><shadow type="pins_digital" id="yG)1rqR)o.u?G4B9215P"><field name="PIN">3</field></shadow></value><value name="CLK"><shadow type="pins_digital" id=",3.J[l|{ru_vTgMz^SbP"><field name="PIN">4</field></shadow></value><next><block type="RTC_set_time" id="N}Ms4YX]|f.tRl8a1!|("><value name="date"><block type="get_system_date_time" id="@,8hQV{^lA/nPflK`w=?"><field name="type">DATE</field></block></value><value name="time"><block type="get_system_date_time" id="]z_W7o}D7g@iXpD,nH^*"><field name="type">TIME</field></block></value></block></next></block></next></block></next></block></next></block></statement></block><block type="simple_timer" id="WMB|U?2dA_^OqEc?Gn@=" x="-206" y="246"><field name="NO">1</field><value name="timein"><shadow type="math_number" id="kX-)i]RYS4XexlgIv@S@"><field name="NUM">1000</field></shadow></value><statement name="zxhs"><block type="folding_block" id="xq{9z;C#`V;wET~.nX?F"><field name="peien">用逻辑运算符组合条件判断时、分、秒是否为个位数如果是0-9的个位数修改输出格式否则直接输出。</field><statement name="DO"><block type="variables_set" id="lFY0Afx-2DOFNJjT^,V}"><field name="VAR">:LsTime</field><value name="VALUE"><block type="text" id="SdPeuNqrw:+}Kraj|u2%"><field name="TEXT"> </field></block></value><next><block type="controls_if" id="3{@,}W}|C7|`fwYySgJ]"><mutation xmlns="http://www.w3.org/1999/xhtml" else="1"></mutation><value name="IF0"><block type="logic_operation" id="~A=#ZT[yqijf(Zlr^9IQ"><field name="OP">AND</field><value name="A"><block type="logic_compare" id="LKBKf9JV=bvQ-{DUa5@n"><field name="OP">GTE</field><value name="A"><block type="RTC_get_time" id="^S:n~6UYHqtWDPKtb`Js"><field name="TIME_TYPE">Hour</field></block></value><value name="B"><block type="math_number" id="f=7T7q46J{fw5D(SatCW"><field name="NUM">0</field></block></value></block></value><value name="B"><block type="logic_compare" id="dnSo[Wi]#qY#D6/%cwd("><field name="OP">LTE</field><value name="A"><block type="RTC_get_time" id="p]5}NV*#xQ3H1#;GC/rz"><field name="TIME_TYPE">Hour</field></block></value><value name="B"><block type="math_number" id="fkrI4inAz_xHIsso]{`r"><field name="NUM">9</field></block></value></block></value></block></value><statement name="DO0"><block type="variables_set" id="s,t-gXVYHWQ4xP$5r6*j"><field name="VAR">:LsTime</field><value name="VALUE"><block type="text_join" id="2FO$RFY3zOS4Mhl-{PjM"><value name="A"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="mPBZ|uJ@Lu5q=cy|VtVr"><field name="TEXT">0</field></shadow><block type="text_join" id="7CMp|uywRt/k@N$l@cD@"><value name="A"><shadow type="text" id="yMAk#h[-rIx|@Vl#Dn,V"><field name="TEXT">0</field></shadow></value><value name="B"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="Idkkl-HWu?WY.?*#Ou,M"><field name="TEXT">:</field></shadow><block type="RTC_get_time" id="5z4c4K_yQMDBxBSyqWJM"><field name="TIME_TYPE">Hour</field></block></value></block></value><value name="B"><shadow type="text" id="Idkkl-HWu?WY.?*#Ou,M"><field name="TEXT">:</field></shadow></value></block></value></block></statement><statement name="ELSE"><block type="variables_set" id="Wf1?G0CF4~Tfd(:k9T7O"><field name="VAR">:LsTime</field><value name="VALUE"><block type="variables_change" id="J{Q##Y(92y}yU`gueC+l"><field name="OP">String</field><value name="MYVALUE"><block type="text_join" id="`^HlRGcPPhn?G~UMv:15"><value name="A"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="Kyr%y?|gEgq0f`9}ySoM"><field name="TEXT">0</field></shadow><block type="RTC_get_time" id="SoHnYLr@q@Mkwn41LhN^"><field name="TIME_TYPE">Hour</field></block></value><value name="B"><shadow type="text" id="={a3-Em}Gb7`AQrJ3]/)"><field name="TEXT">:</field></shadow></value></block></value></block></value></block></statement><next><block type="controls_if" id="dQGx3dMdFs5q0]tsQ??`"><mutation xmlns="http://www.w3.org/1999/xhtml" else="1"></mutation><value name="IF0"><block type="logic_operation" id="$|NK@^U;)9XUV[_3LTay"><field name="OP">AND</field><value name="A"><block type="logic_compare" id="@VvbQYb4q7HQVfL4)|,l"><field name="OP">GTE</field><value name="A"><block type="RTC_get_time" id="di?hj}Q/EQ)ZU:(zl5]z"><field name="TIME_TYPE">Minute</field></block></value><value name="B"><block type="math_number" id="UMP._8Cb.+IG9)mfdO,I"><field name="NUM">0</field></block></value></block></value><value name="B"><block type="logic_compare" id="7]6|#=HH#VF)`q%L2z)}"><field name="OP">LTE</field><value name="A"><block type="RTC_get_time" id="-h5GgMtg75s$r91OM^aa"><field name="TIME_TYPE">Minute</field></block></value><value name="B"><block type="math_number" id="NgMPU/nab?K8RaBg_-R1"><field name="NUM">9</field></block></value></block></value></block></value><statement name="DO0"><block type="variables_set" id="T#@qI[(9Z}l5ib][D4)B"><field name="VAR">:LsTime</field><value name="VALUE"><block type="text_join" id="tI;E(OGi5?TX!ilT/V96"><value name="A"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="Kyr%y?|gEgq0f`9}ySoM"><field name="TEXT">0</field></shadow><block type="variables_get" id="eH}sS7^?Bl[Lf9,grW"><field name="VAR">:LsTime</field></block></value><value name="B"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="~:`a*.|N?G+EfZ~yh,M@"><field name="TEXT">:</field></shadow><block type="text_join" id="!;ABfU759.YpLz?_q0Nm"><value name="A"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="mPBZ|uJ@Lu5q=cy|VtVr"><field name="TEXT">0</field></shadow><block type="text_join" id="J,$cm!~K(PP#xhLe:Aj*"><value name="A"><shadow type="text" id="(f;[k9y0,g[pyK8`wohe"><field name="TEXT">0</field></shadow></value><value name="B"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="Idkkl-HWu?WY.?*#Ou,M"><field name="TEXT">:</field></shadow><block type="RTC_get_time" id="2~hAPT%ArD9pl;3Kyu8o"><field name="TIME_TYPE">Minute</field></block></value></block></value><value name="B"><shadow type="text" id="u}4ky]f6^`~F5^@Q,Iil"><field name="TEXT">:</field></shadow></value></block></value></block></value></block></statement><statement name="ELSE"><block type="variables_set" id=":n4k4uCHYX82-P!B[$+9"><field name="VAR">:LsTime</field><value name="VALUE"><block type="variables_change" id="Cbw^N^sks*oLUkAKGnx-"><field name="OP">String</field><value name="MYVALUE"><block type="text_join" id="D+eh}FWzh9P}:)zXp55U"><value name="A"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="Kyr%y?|gEgq0f`9}ySoM"><field name="TEXT">0</field></shadow><block type="variables_get" id="u}PWrRjKIO2u(`zk~]6T"><field name="VAR">:LsTime</field></block></value><value name="B"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="j]u@3a;y`{m32)rI.?YW"><field name="TEXT">:</field></shadow><block type="text_join" id="8L}zX*U=0Ep,!o`HzO^8"><value name="A"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="Kyr%y?|gEgq0f`9}ySoM"><field name="TEXT">0</field></shadow><block type="RTC_get_time" id="a@t-iUv^}nC0vq.Q%R!G"><field name="TIME_TYPE">Minute</field></block></value><value name="B"><shadow type="text" id="W6BS`sp6x7db6e;C@!ke"><field name="TEXT">:</field></shadow></value></block></value></block></value></block></value></block></statement><next><block type="controls_if" id="}?S,+y,]Y3M;IkfsOV!p"><mutation xmlns="http://www.w3.org/1999/xhtml" else="1"></mutation><value name="IF0"><block type="logic_operation" id="W!5moWRA#.15EY12T4aH"><field name="OP">AND</field><value name="A"><block type="logic_compare" id=")H.XSm)paP`o6dLwRx~B"><field name="OP">GTE</field><value name="A"><block type="RTC_get_time" id=";jsYtc:gz!12TkpHj4(#"><field name="TIME_TYPE">Second</field></block></value><value name="B"><block type="math_number" id="qw.y-*UX[4gn7xq}o0l@"><field name="NUM">0</field></block></value></block></value><value name="B"><block type="logic_compare" id="L0]bbmO3j5Zoyz8{E,^/"><field name="OP">LTE</field><value name="A"><block type="RTC_get_time" id="d$GIV6HTa8BJTva:%zQD"><field name="TIME_TYPE">Second</field></block></value><value name="B"><block type="math_number" id="?tD5Pw0}^+eKdB]K-zJq"><field name="NUM">9</field></block></value></block></value></block></value><statement name="DO0"><block type="variables_set" id="`3e!E*mdkRIhpeUk^F,G"><field name="VAR">:LsTime</field><value name="VALUE"><block type="text_join" id="=[1hqiUd@rP]FIUB3p3q"><value name="A"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="Kyr%y?|gEgq0f`9}ySoM"><field name="TEXT">0</field></shadow><block type="variables_get" id="E)dr!.do2458DGq.r=r3"><field name="VAR">:LsTime</field></block></value><value name="B"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="~:`a*.|N?G+EfZ~yh,M@"><field name="TEXT">:</field></shadow><block type="text_join" id="j}^n:8MBI=K}jw;aHVVF"><value name="A"><shadow type="text" id="YsJJPFJImIPE@6*^?-to"><field name="TEXT">0</field></shadow></value><value name="B"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="Idkkl-HWu?WY.?*#Ou,M"><field name="TEXT">:</field></shadow><block type="RTC_get_time" id="!$W^@ZxbHQPu(~pbV#j%"><field name="TIME_TYPE">Second</field></block></value></block></value></block></value></block></statement><statement name="ELSE"><block type="variables_set" id="3x=]HGxgIR+DkIwi*lYf"><field name="VAR">:LsTime</field><value name="VALUE"><block type="variables_change" id="_jWtJJcpJg}X2O5U3PY`"><field name="OP">String</field><value name="MYVALUE"><block type="text_join" id="g7VoMRYW]mz.4i8L#%mM"><value name="A"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="Kyr%y?|gEgq0f`9}ySoM"><field name="TEXT">0</field></shadow><block type="variables_get" id="QTqHP]CgfX7@u#hV2A/1"><field name="VAR">:LsTime</field></block></value><value name="B"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="~:`a*.|N?G+EfZ~yh,M@"><field name="TEXT">:</field></shadow><block type="RTC_get_time" id="zRB=dz~{V/dgXz3zvZg["><field name="TIME_TYPE">Second</field></block></value></block></value></block></value></block></statement></block></next></block></next></block></next></block></statement><next><block type="serial_println" id=".c;{)9GPMjj)!O8XeA}{"><field name="serial_select">Serial</field><field name="new_line">println</field><value name="CONTENT"><block type="text_join" id="ZziyttvH!J|xa?;QsFF{"><value name="A"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="K;n.pVN;P,tpEpxM+JsA"><field name="TEXT">Hello</field></shadow><block type="text_join" id="Xzh5)|!t)^-mN.;@HEF@"><value name="A"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="K;n.pVN;P,tpEpxM+JsA"><field name="TEXT">Hello</field></shadow><block type="RTC_get_time" id="=TOmJ:|M|%I{E%iC.zFK"><field name="TIME_TYPE">Year</field></block></value><value name="B"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="!#6E1093)^n$e5-4O=DG"><field name="TEXT">Mixly</field></shadow><block type="text_join" id="BQrWQ.R+`QdE:2x!{GyN"><value name="A"><shadow type="text" id="v3S:[_pnfOz#HY#7^6OQ"><field name="TEXT">/</field></shadow></value><value name="B"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="~R+VNrbI}@)!mvM)k.QY"><field name="TEXT">Mixly</field></shadow><block type="RTC_get_time" id="#9YAoc%Dt*T%N6`lo]_S"><field name="TIME_TYPE">Month</field></block></value></block></value></block></value><value name="B"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="~R+VNrbI}@)!mvM)k.QY"><field name="TEXT">Mixly</field></shadow><block type="text_join" id="{`JY]a+Aj*9.na{0sM-3"><value name="A"><shadow type="text" id="*1k%?@eWf+7!:go@R=?O"><field name="TEXT">/</field></shadow></value><value name="B"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="~R+VNrbI}@)!mvM)k.QY"><field name="TEXT">Mixly</field></shadow><block type="RTC_get_time" id="[Pa~,mSbD@hQW4iM`%Oj"><field name="TIME_TYPE">Day</field></block></value></block></value></block></value><next><block type="serial_println" id="+}kClbqhOYf2}Hu:qXhW"><field name="serial_select">Serial</field><field name="new_line">println</field><value name="CONTENT"><block type="variables_get" id="3qc(g@Hsmu$#i8ZP@{4F"><field name="VAR">:LsTime</field></block></value><next><block type="group_lcd_print" id="Ep15.gkif~n_N?B;jNV,"><field name="VAR">mylcd</field><value name="TEXT"><block type="text_join" id="~H=Xiin-0MxyGm;)]c+O"><value name="A"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="K;n.pVN;P,tpEpxM+JsA"><field name="TEXT">Hello</field></shadow><block type="text_join" id="$?5]?JSXxFlLoK.Ap;4~"><value name="A"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="K;n.pVN;P,tpEpxM+JsA"><field name="TEXT">Hello</field></shadow><block type="RTC_get_time" id="OMpc8Fw6g`7Z|}qg1lu^"><field name="TIME_TYPE">Year</field></block></value><value name="B"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="!#6E1093)^n$e5-4O=DG"><field name="TEXT">Mixly</field></shadow><block type="text_join" id="X=x@Ea4iblq[(9P%Na[?"><value name="A"><shadow type="text" id="lHOFvj6Nsxn[yEHUYepj"><field name="TEXT">/</field></shadow></value><value name="B"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="~R+VNrbI}@)!mvM)k.QY"><field name="TEXT">Mixly</field></shadow><block type="RTC_get_time" id="(jp9zFiFm6+0,VwUmODK"><field name="TIME_TYPE">Month</field></block></value></block></value></block></value><value name="B"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="~R+VNrbI}@)!mvM)k.QY"><field name="TEXT">Mixly</field></shadow><block type="text_join" id="WuAA2+~@,^URIk/F(yIO"><value name="A"><shadow type="text" id="m?kK:5yZvDLmT#R+$ko_"><field name="TEXT">/</field></shadow></value><value name="B"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="~R+VNrbI}@)!mvM)k.QY"><field name="TEXT">Mixly</field></shadow><block type="RTC_get_time" id="^1}3`iC]((J,v{r!Zg++"><field name="TIME_TYPE">Day</field></block></value></block></value></block></value><value name="TEXT2"><block type="variables_get" id="y|fW=_2(92pWWl{FVX{~"><field name="VAR">:LsTime</field></block></value></block></next></block></next></block></next></block></statement></block></xml>