-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.blocks
1 lines (1 loc) · 16.5 KB
/
main.blocks
1
<xml xmlns="https://developers.google.com/blockly/xml"><variables><variable id="9z9/3u3B9-Hj?F[sJuIz">state</variable><variable id="b{e[l;N7Xvw_nGAXObH2">red</variable><variable id="gL}~$at@gX)X_{|}6c=H">yellow</variable><variable id="W*j+,uuA3Gh+%m3%%bE(">green</variable><variable id="`J53^GCybnc9H{NTBqN?">button</variable></variables><block type="pxt-on-start" id="@Pg1UtsDPzDviZb_q%O!" x="0" y="0"><statement name="HANDLER"><block type="device_set_digital_pin" id="|(VEM-i+h`sC$1E-m|4p"><field name="name">DigitalPin.P1</field><value name="value"><shadow type="math_number_minmax" id="UX):O4(j}/xk9vcLr-q4"><mutation min="0" max="1" label="Number" precision="0"/><field name="SLIDER">0</field></shadow></value><next><block type="device_set_digital_pin" id="ze%p.~Vjuc5-1)E];1-Q"><field name="name">DigitalPin.P2</field><value name="value"><shadow type="math_number_minmax" id="*Mcg@nYMz=Vay8o`0#_G"><mutation min="0" max="1" label="Number" precision="0"/><field name="SLIDER">0</field></shadow></value><next><block type="device_set_digital_pin" id="/C|dUg2kMp{t!Us5e+eS"><field name="name">DigitalPin.P8</field><value name="value"><shadow type="math_number_minmax" id="EeQB-ag0Wgm}DaTt:s}."><mutation min="0" max="1" label="Number" precision="0"/><field name="SLIDER">0</field></shadow></value><next><block type="variables_set" id="D8g~7SV%qgu2JYT,U5j*"><field name="VAR" id="9z9/3u3B9-Hj?F[sJuIz">state</field><value name="VALUE"><shadow type="math_number" id="71-=BBurvy[8dffC9|`b"><field name="NUM">1</field></shadow></value></block></next></block></next></block></next></block></statement></block><block type="function_definition" id="[rq6P~:mYU-n_6GO}!O;" x="6" y="298"><mutation name="set_colours" functionid="99a1hV{70Sax-b33@uL+"/><field name="function_name">set_colours</field><statement name="STACK"><block type="controls_if" id="Pco3PZxHC.yNn_Ome8g,"><mutation elseif="3"/><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="[S%,_ctra_IW*e%k1ihJ"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="4_PDRuSLrZ%BFcjn-IUp"><field name="VAR" id="9z9/3u3B9-Hj?F[sJuIz">state</field></block></value><value name="B"><shadow type="math_number" id=")(h[Mm)fu[]6XI;xy%x{"><field name="NUM">1</field></shadow></value></block></value><statement name="DO0"><block type="variables_set" id="Zv/+@Vxs8d[:|*Fii0w8"><field name="VAR" id="b{e[l;N7Xvw_nGAXObH2">red</field><value name="VALUE"><shadow type="math_number" id="j@B#-a-vww.+zS$_$d0k"><field name="NUM">1</field></shadow></value><next><block type="variables_set" id="*Gqc#T{n*n=7eD1,I[{7"><field name="VAR" id="gL}~$at@gX)X_{|}6c=H">yellow</field><value name="VALUE"><shadow type="math_number" id="S6cJ?!4YMA$,iX461.y-"><field name="NUM">0</field></shadow></value><next><block type="variables_set" id="$|-*YNF`l[X3tuJIP%7c"><field name="VAR" id="W*j+,uuA3Gh+%m3%%bE(">green</field><value name="VALUE"><shadow type="math_number" id="fo)AXQqq^|S(~g^qSbCd"><field name="NUM">0</field></shadow></value></block></next></block></next></block></statement><value name="IF1"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="UQdgG28Pp6}fT)zuGJw9"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="F[NV+m~y,EqLiiurJ.*l"><field name="VAR" id="9z9/3u3B9-Hj?F[sJuIz">state</field></block></value><value name="B"><shadow type="math_number" id="0mkmI*ewXOz^d8%@;aZJ"><field name="NUM">3</field></shadow></value></block></value><statement name="DO1"><block type="variables_set" id="1hBcv]Vww?w5]dTH]4,x"><field name="VAR" id="b{e[l;N7Xvw_nGAXObH2">red</field><value name="VALUE"><shadow type="math_number" id="RXv-lTVJ0ge^*D3]mXU-"><field name="NUM">1</field></shadow></value><next><block type="variables_set" id="x^f%$AZOL*KT)jw_MUgZ"><field name="VAR" id="gL}~$at@gX)X_{|}6c=H">yellow</field><value name="VALUE"><shadow type="math_number" id="8+{_M+J1rO?+*3F4v=KO"><field name="NUM">1</field></shadow></value><next><block type="variables_set" id="|3#Ny/(zonm$!dac5LM6"><field name="VAR" id="W*j+,uuA3Gh+%m3%%bE(">green</field><value name="VALUE"><shadow type="math_number" id=")HEs3r*4Rr^qHXGYb~`G"><field name="NUM">0</field></shadow></value></block></next></block></next></block></statement><value name="IF2"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="_v739@t*~*xMB0aI][SC"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="1.*3=zp%cO*=8}}s;@#,"><field name="VAR" id="9z9/3u3B9-Hj?F[sJuIz">state</field></block></value><value name="B"><shadow type="math_number" id="7Y@*kYdJ3O]o1T`i(+wY"><field name="NUM">4</field></shadow></value></block></value><statement name="DO2"><block type="variables_set" id="+8{VASrP7,7R/s3PFV%B"><field name="VAR" id="b{e[l;N7Xvw_nGAXObH2">red</field><value name="VALUE"><shadow type="math_number" id="+O;G!0t3WN`2n)(9?Lur"><field name="NUM">0</field></shadow></value><next><block type="variables_set" id="w00I7+(*a%:D7B;KYv4{"><field name="VAR" id="gL}~$at@gX)X_{|}6c=H">yellow</field><value name="VALUE"><shadow type="math_number" id="-wJ9[gQQ,we=4{Mo5o.+"><field name="NUM">0</field></shadow></value><next><block type="variables_set" id=":M3(-}0}c3a}?3V@,E]w"><field name="VAR" id="W*j+,uuA3Gh+%m3%%bE(">green</field><value name="VALUE"><shadow type="math_number" id="xmA^llYg|@rQH+.-Jm%S"><field name="NUM">1</field></shadow></value></block></next></block></next></block></statement><value name="IF3"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="uwJr)-]SIVCG+QAd_vIr"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="rn-|C~+~[4{dGcVr]Up~"><field name="VAR" id="9z9/3u3B9-Hj?F[sJuIz">state</field></block></value><value name="B"><shadow type="math_number" id="_Jb!_=N-4Wr(,blUq?Ac"><field name="NUM">2</field></shadow></value></block></value><statement name="DO3"><block type="variables_set" id="=QWD}$AEodp++VCyIAGp"><field name="VAR" id="b{e[l;N7Xvw_nGAXObH2">red</field><value name="VALUE"><shadow type="math_number" id="OK=4DRPgX1[,bZc{vWLE"><field name="NUM">0</field></shadow></value><next><block type="variables_set" id="N5Ylm7vC]a!WPg*+8;87"><field name="VAR" id="gL}~$at@gX)X_{|}6c=H">yellow</field><value name="VALUE"><shadow type="math_number" id="Xp;WtIzVK@lDCR9bI5PE"><field name="NUM">1</field></shadow></value><next><block type="variables_set" id="l(mdUHo53}[*8hLRquk`"><field name="VAR" id="W*j+,uuA3Gh+%m3%%bE(">green</field><value name="VALUE"><shadow type="math_number" id="s0-sFIj33Zxn7b9;a/*6"><field name="NUM">0</field></shadow></value></block></next></block></next></block></statement></block></statement></block><block type="function_definition" id="icglJB-xA_N8?FA4sShN" x="23" y="1280"><mutation name="write_lights" functionid="e`V._Wx.Sg:zF(-k|+i="/><field name="function_name">write_lights</field><statement name="STACK"><block type="controls_if" id="q6Jo%mBm3VT^mRMvd14h"><mutation elseif="1"/><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="S}f+q#|umM^NjcqX:qe7"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="R*vr)K)FzNqmj.pp^xGo"><field name="VAR" id="b{e[l;N7Xvw_nGAXObH2">red</field></block></value><value name="B"><shadow type="math_number" id=")3=yBCknmX2t@(C.mW-l"><field name="NUM">1</field></shadow></value></block></value><statement name="DO0"><block type="device_set_digital_pin" id="z63g_7=#JB5$*KjZE7Eg"><field name="name">DigitalPin.P1</field><value name="value"><shadow type="math_number_minmax" id=":S~)_,Sq~I9-YniWG5Kd"><mutation min="0" max="1" label="Number" precision="0"/><field name="SLIDER">1</field></shadow></value></block></statement><value name="IF1"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="pu,xYRvOx=!*DLF5Pldb"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="y5d43~wgt+iy:gHa##$k"><field name="VAR" id="b{e[l;N7Xvw_nGAXObH2">red</field></block></value><value name="B"><shadow type="math_number" id="Lzdk3mCv`:PO`Tie%w5?"><field name="NUM">0</field></shadow></value></block></value><statement name="DO1"><block type="device_set_digital_pin" id="$Kxe|Pw);cy1Hz)#*zc~"><field name="name">DigitalPin.P1</field><value name="value"><shadow type="math_number_minmax" id="t+uSB,Q)VBZC_A,twTh-"><mutation min="0" max="1" label="Number" precision="0"/><field name="SLIDER">0</field></shadow></value></block></statement><next><block type="controls_if" id="/kq!^Abv@?{Fyonbg=Fh"><mutation elseif="1"/><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="UKi=`FY*m+4:~Lb;vNDm"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="dvgTxgC%OjV(;e5u{},;"><field name="VAR" id="gL}~$at@gX)X_{|}6c=H">yellow</field></block></value><value name="B"><shadow type="math_number" id="4_@ec-g`jwi])GZj@mK5"><field name="NUM">1</field></shadow></value></block></value><statement name="DO0"><block type="device_set_digital_pin" id=":N*v7n9co$G{hCyT*P]-"><field name="name">DigitalPin.P2</field><value name="value"><shadow type="math_number_minmax" id="U/9Unob!vT09Qst=?!A^"><mutation min="0" max="1" label="Number" precision="0"/><field name="SLIDER">1</field></shadow></value></block></statement><value name="IF1"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="0`(o;ysmJ[]+hvJfCD5u"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="ipv9*jN`z%@l5Vk_IU0J"><field name="VAR" id="gL}~$at@gX)X_{|}6c=H">yellow</field></block></value><value name="B"><shadow type="math_number" id="O!C*~+nU:5$4CGBCPy0r"><field name="NUM">0</field></shadow></value></block></value><statement name="DO1"><block type="device_set_digital_pin" id="EK{~AWC{3o`_lLrASExM"><field name="name">DigitalPin.P2</field><value name="value"><shadow type="math_number_minmax" id="1nTCP`u]GavCIhf#E.Se"><mutation min="0" max="1" label="Number" precision="0"/><field name="SLIDER">0</field></shadow></value></block></statement><next><block type="controls_if" id=":7$4|XMFLhg_h;[c8mZZ"><mutation elseif="1"/><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="GeL%EESq:mXj1B7%4Lp4"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="ay^MnO_0od]PVb]Q``d4"><field name="VAR" id="W*j+,uuA3Gh+%m3%%bE(">green</field></block></value><value name="B"><shadow type="math_number" id="VJu/F?xZ)m2u%Gn;J3CL"><field name="NUM">1</field></shadow></value></block></value><statement name="DO0"><block type="device_set_digital_pin" id="cg|bOHrZ@c:NP|T62nu)"><field name="name">DigitalPin.P8</field><value name="value"><shadow type="math_number_minmax" id="*8Fui{]1}oOVU{{$,L5N"><mutation min="0" max="1" label="Number" precision="0"/><field name="SLIDER">1</field></shadow></value></block></statement><value name="IF1"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="nyeu%M;t*MB[_Cdwp~42"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="WL!mFQ]kIUg]@p.^=CjX"><field name="VAR" id="W*j+,uuA3Gh+%m3%%bE(">green</field></block></value><value name="B"><shadow type="math_number" id="8HR$a+?Y^ZCsxF3YDd0#"><field name="NUM">0</field></shadow></value></block></value><statement name="DO1"><block type="device_set_digital_pin" id="n?4W$*VMNOl]r!ROJ(MM"><field name="name">DigitalPin.P8</field><value name="value"><shadow type="math_number_minmax" id="(X6tI-|Wk,$OxuU,=n;p"><mutation min="0" max="1" label="Number" precision="0"/><field name="SLIDER">0</field></shadow></value></block></statement></block></next></block></next></block></statement></block><block type="function_definition" id="T][email protected]*vAE" x="22" y="2114"><mutation name="change_states" functionid="d2~/Ql)}S{!4xkM7@L^r"/><field name="function_name">change_states</field><statement name="STACK"><block type="controls_if" id="we!Tu#3jsD%RzI[Y;XiO"><mutation elseif="3"/><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="pf6-(TCz0PM%{i]q:^oA"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="i*U+Ryd:NNTNJ`ac/j0/"><field name="VAR" id="9z9/3u3B9-Hj?F[sJuIz">state</field></block></value><value name="B"><shadow type="math_number" id="H5rE+}n}kb_I=,7-==I%"><field name="NUM">1</field></shadow></value></block></value><statement name="DO0"><block type="variables_set" id="Wwn`A4/cXx*+7ySAn!mU"><field name="VAR" id="9z9/3u3B9-Hj?F[sJuIz">state</field><value name="VALUE"><shadow type="math_number" id="(tGq#6Ovl?gQ:4+;N4kh"><field name="NUM">3</field></shadow></value></block></statement><value name="IF1"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="rxM]ix|m=r+%mliWR?l^"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="TV*3#R4`ta`cN^|mrq*["><field name="VAR" id="9z9/3u3B9-Hj?F[sJuIz">state</field></block></value><value name="B"><shadow type="math_number" id="nquL```I0v|?0fr[UzTm"><field name="NUM">3</field></shadow></value></block></value><statement name="DO1"><block type="variables_set" id="3fyi9V3nj)+;eTwT[|Nr"><field name="VAR" id="9z9/3u3B9-Hj?F[sJuIz">state</field><value name="VALUE"><shadow type="math_number" id="[@@AO3GX;B2}+/4JBC_;"><field name="NUM">4</field></shadow></value></block></statement><value name="IF2"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="f5}XDJ{-mGhKN+P.^-2Z"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="MPrl4JM(g(!IWsariC/H"><field name="VAR" id="9z9/3u3B9-Hj?F[sJuIz">state</field></block></value><value name="B"><shadow type="math_number" id="E4#X)S![2|wkE%RwL{p`"><field name="NUM">4</field></shadow></value></block></value><statement name="DO2"><block type="variables_set" id="LFFE?J#-?)j:gwS73q[)"><field name="VAR" id="9z9/3u3B9-Hj?F[sJuIz">state</field><value name="VALUE"><shadow type="math_number" id="4_{+v+(VHS_|Anb?dPO4"><field name="NUM">2</field></shadow></value></block></statement><value name="IF3"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="$[xtC,_}@~XK8u=,.g;!"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="OJpC[$F~j8nPhv?%YQoI"><field name="VAR" id="9z9/3u3B9-Hj?F[sJuIz">state</field></block></value><value name="B"><shadow type="math_number" id="Y0L4S#iO0f({,W6g.QxI"><field name="NUM">2</field></shadow></value></block></value><statement name="DO3"><block type="variables_set" id="J+zaXs04iNmapc!Pu7|{"><field name="VAR" id="9z9/3u3B9-Hj?F[sJuIz">state</field><value name="VALUE"><shadow type="math_number" id="s!q7%*3EyE(d21IW#{|b"><field name="NUM">1</field></shadow></value></block></statement></block></statement></block><block type="device_forever" id="7NmNaf*`C1z2.#(ss%qd" x="22" y="2697"><statement name="HANDLER"><block type="function_call" id="ik:%:xT{LjL^#Jn7b^CG"><mutation name="set_colours" functionid="99a1hV{70Sax-b33@uL+"/><next><block type="function_call" id="5@,~gkCfPeX1T:lKl~UR"><mutation name="write_lights" functionid="e`V._Wx.Sg:zF(-k|+i="/><next><block type="controls_if" id="-8xNn@tH~_EV|P#y/,D."><value name="IF0"><shadow type="logic_boolean" id="uvxg7W!GIDo}qR;V`WMQ"><field name="BOOL">TRUE</field></shadow><block type="device_get_button2" id="Y/p$hq5KWIyy02oZ2eX3"><field name="NAME">Button.A</field></block></value><statement name="DO0"><block type="function_call" id="jkBaLuI!$y|xuiq98et{"><mutation name="change_states" functionid="d2~/Ql)}S{!4xkM7@L^r"/><next><block type="device_pause" id="?O1|=$h6qP#AUO4k]C4~"><value name="pause"><shadow type="timePicker" id="K+Lx!2xV1ngA]BQ0$j,$"><field name="ms">1000</field></shadow></value></block></next></block></statement></block></next></block></next></block></statement></block></xml>