1 line
17 KiB
XML
1 line
17 KiB
XML
<xml version="Mixly 2.0 Beta11" board="Arduino AVR@Arduino Nano w/ ATmega328P (old bootloader)" xmlns="http://www.w3.org/1999/xhtml"><block type="base_setup" id="3,mGcN99^oDemndzp;vM" x="0" y="0"><statement name="DO"><block type="lists_create_with2" id="DQ:u1H(iB*;[h,VgP$q9"><mutation xmlns="http://www.w3.org/1999/xhtml" items="3"></mutation><field name="TYPE">int</field><field name="VAR">lights</field><value name="ADD0"><block type="math_number" id="VF$x.upZN@sb.,i14/1d"><field name="NUM">3</field></block></value><value name="ADD1"><block type="math_number" id="!qO94(5L)9r)%+ZQ0J4S"><field name="NUM">7</field></block></value><value name="ADD2"><block type="math_number" id="S5[Z%x1TCaA#:j38]lS8"><field name="NUM">13</field></block></value><next><block type="variables_declare" id="rt]+{Ipmv_#jirGwkDv1"><field name="variables_type">global_variate</field><field name="VAR">light</field><field name="TYPE">int</field><value name="VALUE"><block type="math_number" id="dMmyI5Y-@|QzoU`T6K;%"><field name="NUM">0</field></block></value><next><block type="variables_declare" id="0oc~T=rAPb|GhNgl]=oY"><field name="variables_type">global_variate</field><field name="VAR">starttime</field><field name="TYPE">int</field><value name="VALUE"><block type="math_number" id="R~ofBtf?_tkA[Ck(;r`W"><field name="NUM">0</field></block></value><next><block type="variables_declare" id="VR{*Jp{raQ*iVZB-_7j-"><field name="variables_type">global_variate</field><field name="VAR">now</field><field name="TYPE">int</field><value name="VALUE"><block type="math_number" id="S7`GX*luS`Re-ZSdPiK5"><field name="NUM">0</field></block></value><next><block type="variables_declare" id="RB3zkyvB}FRrVz^sa8zI"><field name="variables_type">global_variate</field><field name="VAR">isPressed</field><field name="TYPE">boolean</field><value name="VALUE"><block type="logic_boolean" id="}^b*_2-_Lt,:F{T6ITJz"><field name="BOOL">FALSE</field></block></value><next><block type="variables_declare" id="2z[eku/6alC]8w^6BPsx"><field name="variables_type">global_variate</field><field name="VAR">isRight</field><field name="TYPE">boolean</field><value name="VALUE"><block type="logic_boolean" id="hd8-t?l4SZprU(e8,?m9"><field name="BOOL">FALSE</field></block></value><next><block type="variables_declare" id="O`IpO/[}T,.4vR%TI^W/"><field name="variables_type">global_variate</field><field name="VAR">count</field><field name="TYPE">int</field><value name="VALUE"><block type="math_number" id="#805baZ:O$(ux0%fz@z("><field name="NUM">0</field></block></value><next><block type="variables_declare" id="$2.=Xg@@epBT/+r3?}|;"><field name="variables_type">global_variate</field><field name="VAR">error</field><field name="TYPE">int</field><value name="VALUE"><block type="math_number" id="r7fx{f^UfKf%QuWGyBM("><field name="NUM">0</field></block></value><next><block type="oled_init" id="4V2ZjTUktgcrI:uy}$1e"><field name="OLED_TYPE">SSD1306_128X64_NONAME</field><field name="NAME">u8g2</field><field name="ROTATION">U8G2_R0</field><field name="SCL">A5</field><field name="SDA">A4</field></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block><block type="procedures_defreturn" id="$B7M7621Ey#l:.Z,:NHX" x="0" y="377"><field name="NAME">Press</field><field name="TYPE">boolean</field><statement name="STACK"><block type="controls_if" id="wu+jhNf@F%va$}Eq81K!"><value name="IF0"><block type="logic_operation" id="s{hE_Qb!Hhv[nHNsYo|j"><field name="OP">OR</field><value name="A"><block type="inout_digital_read2" id="1]Tw~rQh/8-UDQ[p|L^K"><value name="PIN"><shadow type="pins_digital" id="mY[+M1.O75]1gGr|+OAK"><field name="PIN">2</field></shadow></value></block></value><value name="B"><block type="logic_operation" id="o,XhhSs6t@:/;!nbjm62"><field name="OP">OR</field><value name="A"><block type="inout_digital_read2" id="NeI6FyKMnfk)VBADA;c["><value name="PIN"><shadow type="pins_digital" id="A*~a*U~t`Rt4B~8^7lNf"><field name="PIN">4</field></shadow></value></block></value><value name="B"><block type="inout_digital_read2" id="1nv232F|`c%O]_#O;6UR"><value name="PIN"><shadow type="pins_digital" id="@/sGeQZ%`T!*[W|OQ?B!"><field name="PIN">12</field></shadow></value></block></value></block></value></block></value><statement name="DO0"><block type="variables_set" id="n=%}w4Ahp=6:W(8hJW`M"><field name="VAR">isPressed</field><value name="VALUE"><block type="logic_boolean" id="=`fRAE[S.TfTbAjQ:G3e"><field name="BOOL">TRUE</field></block></value></block></statement></block></statement><value name="RETURN"><block type="variables_get" id="v?jX6#wwLd~hb#w.!uRA"><field name="VAR">isPressed</field></block></value></block><block type="controls_whileUntil" id="cIC49B:ai!Q]@mhTfu5s" x="0" y="557"><field name="MODE">WHILE</field><value name="BOOL"><shadow xmlns="http://www.w3.org/1999/xhtml" type="logic_boolean" id="7}nnaIlwRd}cepj3$;gS"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="O9m8$c9P6BT97]vU;OSZ"><field name="OP">LT</field><value name="A"><block type="variables_get" id=";6|fFNUbDyBDbAN3HXcT"><field name="VAR">error</field></block></value><value name="B"><block type="math_number" id="!CdY79Y*}6F:f#({2:gV"><field name="NUM">3</field></block></value></block></value><statement name="DO"><block type="variables_set" id="56BK=s1NE$RYlhuwep1["><field name="VAR">light</field><value name="VALUE"><block type="lists_getIndex" id="Gqdt4b?R][;|c!(65iyh"><field name="VAR">lights</field><value name="AT"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="fOHUPot//Yub$2j[GVg%"><field name="NUM">1</field></shadow><block type="math_random_int" id="~d7+}8zjNtR;DyYU,#Y!"><value name="FROM"><shadow type="math_number" id="tG8Zj%LHE@h4bXmBzoq0"><field name="NUM">1</field></shadow></value><value name="TO"><shadow type="math_number" id="{ceQZUmBed1sdzV3fJw-"><field name="NUM">4</field></shadow></value></block></value></block></value><next><block type="inout_digital_write2" id="0KAb/nI%`${p/0=AVn.k"><value name="PIN"><shadow xmlns="http://www.w3.org/1999/xhtml" type="pins_digital" id="O##vAn!,rT07C|pT?]PB"><field name="PIN">0</field></shadow><block type="variables_get" id="nR*VX@[L_s)DC%|aVTkJ"><field name="VAR">light</field></block></value><value name="STAT"><shadow type="inout_highlow" id="N.eDs_zsn+/0FhnYfq#]"><field name="BOOL">HIGH</field></shadow></value><next><block type="variables_set" id="i%r;@(QE9ra8T+pm2Xa7"><field name="VAR">isPressed</field><value name="VALUE"><block type="logic_boolean" id="lyJdX=@*pr87{a_KV$8M"><field name="BOOL">FALSE</field></block></value><next><block type="variables_set" id="sKGa;Qp%,TLC^Z}?5yC="><field name="VAR">isRight</field><value name="VALUE"><block type="logic_boolean" id="{ACgUK@IEvZTl`.su:4!"><field name="BOOL">FALSE</field></block></value><next><block type="variables_set" id="=C*{Q3}Dfgh:mdNQ(BKX"><field name="VAR">starttime</field><value name="VALUE"><block type="controls_millis" id="WzD*]]3on}Hc!dV^25$0"><field name="UNIT">millis</field></block></value><next><block type="controls_whileUntil" id="Sat9;JssFT~ixPK]W9B1"><field name="MODE">WHILE</field><value name="BOOL"><shadow xmlns="http://www.w3.org/1999/xhtml" type="logic_boolean" id=";@MA$IL0tFqp],!eL|d*"><field name="BOOL">TRUE</field></shadow><block type="logic_negate" id="jLerQKp7ERr+y*37nRH_"><value name="BOOL"><block type="procedures_callreturn" id="T{w=Wzunvh%w{Du!@$R|"><mutation xmlns="http://www.w3.org/1999/xhtml" name="Press"></mutation></block></value></block></value><statement name="DO"><block type="variables_set" id="N_;@+lgei]4e()2)s%]A"><field name="VAR">now</field><value name="VALUE"><block type="controls_millis" id="aD_UPd}e`T,/Zq:Qz{#-"><field name="UNIT">millis</field></block></value><next><block type="controls_if" id="N(??@qj2IdV+QMIurlvJ"><value name="IF0"><block type="logic_compare" id="vUD6lU:So~(($1:qt^ur"><field name="OP">GTE</field><value name="A"><block type="math_arithmetic" id="0[{#DAeG~KC-@zKd^M#%"><field name="OP">MINUS</field><value name="A"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="?nu-R0gR;@Bp0uP)RLi0"><field name="NUM">1</field></shadow><block type="variables_get" id="t#d[NGB|cUnT^Xl03uqD"><field name="VAR">now</field></block></value><value name="B"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="Au=luYSuqvsLSFaa%ToG"><field name="NUM">1</field></shadow><block type="variables_get" id="$)uqV{j1ipp1=?-X1Nfu"><field name="VAR">starttime</field></block></value></block></value><value name="B"><block type="math_number" id="/},_x`Th+(f|HSJmo9R7"><field name="NUM">1000</field></block></value></block></value><statement name="DO0"><block type="controls_flow_statements" id="bf{~{fC/.+BhZtOl%sB1"><field name="FLOW">BREAK</field></block></statement></block></next></block></statement><next><block type="controls_if" id="*+{MXc@Nb}K9(L4YOKYJ"><mutation xmlns="http://www.w3.org/1999/xhtml" else="1"></mutation><value name="IF0"><block type="procedures_callreturn" id="Nk+E[;WI(kVrP,;/|af9"><mutation xmlns="http://www.w3.org/1999/xhtml" name="Right"></mutation></block></value><statement name="DO0"><block type="variables_set" id="VN(plPE[[sZfOnn59QPc"><field name="VAR">count</field><value name="VALUE"><block type="math_arithmetic" id="tZ5J^ee}d~T8mxscW9ys"><field name="OP">ADD</field><value name="A"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="VAB6778XLcc)w*s1,%^m"><field name="NUM">1</field></shadow><block type="variables_get" id="N`;4h~f/dmELtz{cO3G-"><field name="VAR">count</field></block></value><value name="B"><shadow type="math_number" id="xz5~RNoA(?cX#uj1,UvF"><field name="NUM">1</field></shadow></value></block></value></block></statement><statement name="ELSE"><block type="variables_set" id="H]FoYc%ooZd2+lWY|x[["><field name="VAR">error</field><value name="VALUE"><block type="math_arithmetic" id="Xjwyk5]f371$U5yV]}rf"><field name="OP">ADD</field><value name="A"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="VAB6778XLcc)w*s1,%^m"><field name="NUM">1</field></shadow><block type="variables_get" id="ir@kb7DhroLw@)3KXyZl"><field name="VAR">error</field></block></value><value name="B"><shadow type="math_number" id="j:5x(O=6+{%(FBT*;e6x"><field name="NUM">1</field></shadow></value></block></value></block></statement><next><block type="oled_page" id="aXu*hy+{/$Dc:r7lC*D}"><field name="NAME">u8g2</field><statement name="DO"><block type="procedures_callnoreturn" id="=T^*2dZ`$g@#preaJ$ss"><mutation xmlns="http://www.w3.org/1999/xhtml" name="page1"></mutation></block></statement><next><block type="inout_digital_write2" id="n(7[:6|$gR)ux%}Uf15L"><value name="PIN"><shadow xmlns="http://www.w3.org/1999/xhtml" type="pins_digital" id="O##vAn!,rT07C|pT?]PB"><field name="PIN">0</field></shadow><block type="variables_get" id="Y|n^K;fBq2@bXNz7_3jx"><field name="VAR">light</field></block></value><value name="STAT"><shadow type="inout_highlow" id="wS$-Xmm7pWP+Zw(z:@kx"><field name="BOOL">LOW</field></shadow></value><next><block type="controls_delay" id=";R}3NnPBjplKJqIv]@__"><field name="UNIT">delay</field><value name="DELAY_TIME"><shadow type="math_number" id=":!M5U~`6ø{PBxk)w2E"><field name="NUM">100</field></shadow></value><next><block type="controls_if" id="e{NwkDz3uP[c@%_Y=Rtz"><value name="IF0"><block type="logic_compare" id="wL{5P988Ftk;bZ@*-I?#"><field name="OP">EQ</field><value name="A"><block type="variables_get" id="yy1@*Zi%m3%V3.vgNXu{"><field name="VAR">error</field></block></value><value name="B"><block type="math_number" id="lk2gcpN`{5|rrR:jEkxl"><field name="NUM">3</field></block></value></block></value><statement name="DO0"><block type="controls_tone_noTimer" id="-il^HsjZwT0ZHn-Evm34"><value name="PIN"><shadow type="pins_digital" id="~SCoK9zseq^plwSg5Us4"><field name="PIN">8</field></shadow></value><value name="FREQUENCY"><shadow type="tone_notes" id="PJZu+g}(S~[0*zDPf@?."><field name="STAT">131</field></shadow></value><value name="DURATION"><shadow type="math_number" id="A6$p,;oh=--U2U[uozRs"><field name="NUM">3000</field></shadow></value></block></statement></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block><block type="procedures_defreturn" id="`RxuWRq-v^_Yz4tu()e6" x="0" y="1300"><field name="NAME">Right</field><field name="TYPE">boolean</field><statement name="STACK"><block type="controls_if" id="`L1c=tS+B/r}2u($n7k("><mutation xmlns="http://www.w3.org/1999/xhtml" elseif="2" else="1"></mutation><value name="IF0"><block type="logic_operation" id="*NU7#da7V5i).wsm@6#2"><field name="OP">AND</field><value name="A"><block type="inout_digital_read2" id="cBf3K1#`sR^Z@*L*Zg^_"><value name="PIN"><shadow type="pins_digital" id="~iw|JaQ,/Km,lI/PlLD#"><field name="PIN">2</field></shadow></value></block></value><value name="B"><block type="inout_digital_read2" id="DZbn=h*kcn,)3:A#+7F6"><value name="PIN"><shadow type="pins_digital" id="-`:Oke(Ind.C+D*0-Cu!"><field name="PIN">3</field></shadow></value></block></value></block></value><statement name="DO0"><block type="variables_set" id="@aa|mjzYw2oRaL^,-aK!"><field name="VAR">isRight</field><value name="VALUE"><block type="logic_boolean" id="g~9:.ffvNpsw,PAyv}+-"><field name="BOOL">TRUE</field></block></value></block></statement><value name="IF1"><block type="logic_operation" id="Wd4c$kTK$SB|cTDmi.TS"><field name="OP">AND</field><value name="A"><block type="inout_digital_read2" id="]x,,;gj,sIXaHi5s~W_#"><value name="PIN"><shadow type="pins_digital" id="sn@o[gS`JR,@l{BX#hoj"><field name="PIN">4</field></shadow></value></block></value><value name="B"><block type="inout_digital_read2" id="A=VUO!acw{yJsZLuwX#s"><value name="PIN"><shadow type="pins_digital" id="`a-MWf^wBm1!ntY[,H4|"><field name="PIN">7</field></shadow></value></block></value></block></value><statement name="DO1"><block type="variables_set" id="dLh1uG(]yh/{czSr//:d"><field name="VAR">isRight</field><value name="VALUE"><block type="logic_boolean" id="6$v):ppoR{v2Ud*LH,8M"><field name="BOOL">TRUE</field></block></value></block></statement><value name="IF2"><block type="logic_operation" id="p,TDI-*9pC$yQC23d2.."><field name="OP">AND</field><value name="A"><block type="inout_digital_read2" id="QiI2tp.]I#IAwpFTxPU]"><value name="PIN"><shadow type="pins_digital" id="d:sR(tT([Vv[r1(BK9KW"><field name="PIN">12</field></shadow></value></block></value><value name="B"><block type="inout_digital_read2" id=";Jn~Rcjv+GF~p!|NHZXk"><value name="PIN"><shadow type="pins_digital" id="p0UX#aqTb5R7m]Gg-2F`"><field name="PIN">13</field></shadow></value></block></value></block></value><statement name="DO2"><block type="variables_set" id=":D~8It:,OAl)GNAdZo}~"><field name="VAR">isRight</field><value name="VALUE"><block type="logic_boolean" id="u9##*k@hqW8=p_hVG$m)"><field name="BOOL">TRUE</field></block></value></block></statement><statement name="ELSE"><block type="variables_set" id="!O}*s/D#uo)wkdb5zL@y"><field name="VAR">isRight</field><value name="VALUE"><block type="logic_boolean" id="VZ*G1p-:Z%Ro{sv~3(1q"><field name="BOOL">FALSE</field></block></value></block></statement></block></statement><value name="RETURN"><block type="variables_get" id="A``:^Q:DgSi63D%!=)3~"><field name="VAR">isRight</field></block></value></block><block type="procedures_defnoreturn" id="`C!nSr1f`iMQ*.aRIZ%q" x="0" y="1663"><field name="NAME">page1</field><statement name="STACK"><block type="oled_set_EN_Font" id="oG=W]*ZU(I`D=9~19DV~"><field name="NAME">u8g2</field><field name="FONT_NAME">tim</field><field name="FONT_SIZE">08</field><field name="FONT_STYLE">R</field><next><block type="oled_print" id="K=DW#FE7z%.;KC,NGJF-"><field name="NAME">u8g2</field><value name="POS_X"><shadow type="math_number" id="8wpugkn7eBl2E,|ABfzs"><field name="NUM">0</field></shadow></value><value name="POS_Y"><shadow type="math_number" id="!mSG_|x0UNg$RM)9vh-W"><field name="NUM">20</field></shadow></value><value name="TEXT"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="_(Lq2%SbI:0okC_Hkc2,"><field name="TEXT">1234</field></shadow><block type="text_join" id="/%4oV/.o;FJxOzZKE0Li"><value name="A"><shadow type="text" id="_OPvNV76uEd5.[]c?i#G"><field name="TEXT">Count </field></shadow></value><value name="B"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="Ej6Fma1+I21Cex)H}e2%"><field name="TEXT">Mixly</field></shadow><block type="variables_get" id="SBTv)dM}dA.?:LyO2T:L"><field name="VAR">count</field></block></value></block></value><next><block type="oled_print" id="e}Su[._DbIFAUj]1$y76"><field name="NAME">u8g2</field><value name="POS_X"><shadow type="math_number" id="50/f`Kvx-?EUoeK-,vM$"><field name="NUM">0</field></shadow></value><value name="POS_Y"><shadow type="math_number" id="zRXggi_9JmNTu(OM[Ee("><field name="NUM">40</field></shadow></value><value name="TEXT"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="R#:Y_?-SmJR%bqVR*7,9"><field name="TEXT">1234</field></shadow><block type="text_join" id="(RNK:sf?+O::R=q=I?.,"><value name="A"><shadow type="text" id="*UD2R(98o8,C=6}~)Tq*"><field name="TEXT">Error </field></shadow></value><value name="B"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="_=iLt-cTO)R0P8eolsFR"><field name="TEXT">Mixly</field></shadow><block type="variables_get" id="-geLAcw];#;jWp|e{J4m"><field name="VAR">error</field></block></value></block></value></block></next></block></next></block></statement></block></xml> |