-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.blocks
More file actions
13 lines (13 loc) · 17.1 KB
/
main.blocks
File metadata and controls
13 lines (13 loc) · 17.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
<xml xmlns="https://developers.google.com/blockly/xml"><variables><variable id="nX}OKF-4h1yxxG24!!d|">Ultra</variable><variable id="%9kK8if3bkD!c:A7ri~T">Line</variable><variable id="sCX[CL/oWJ/y{/~.!!~R">Chosen</variable></variables><block type="pxt-on-start" id="3vJS(vkri;p#NwrQ*,HU" x="0" y="0"><statement name="HANDLER"><block type="Trace_Sensor_init" id="d%EeiHcjL-;T)J;oReBQ"><field name="rpin">AnalogReadPin.P0</field><field name="mpin">AnalogReadPin.P2</field><field name="lpin">AnalogReadPin.P1</field><next><block type="variables_set" id="lwV}92e(fz$;N{;ZL=wR"><field name="VAR" id="sCX[CL/oWJ/y{/~.!!~R">Chosen</field><value name="VALUE"><shadow type="math_number" id="f$yUSmjtK;2oI.8g!Q]U"><field name="NUM">0</field></shadow></value><next><block type="variables_set" id="zF{3wmgXk5{+.:Ltb~lM"><field name="VAR" id="%9kK8if3bkD!c:A7ri~T">Line</field><value name="VALUE"><shadow type="math_number" id="4~6CtSibgvi;`Ip4]Z;]"><field name="NUM">0</field></shadow></value><next><block type="variables_set" id="6dIE0l.01gmuXIm-4#Ii"><field name="VAR" id="nX}OKF-4h1yxxG24!!d|">Ultra</field><value name="VALUE"><shadow type="math_number" id="RQP~Bzd]yB}RqOXXq.9)"><field name="NUM">0</field></shadow></value><next><block type="stopcar" id="[ONUE759=kBgnrrL,~MJ"><next><block type="device_while" id="Nha[Kr-WGU+57nU]Q_PN"><value name="COND"><shadow type="logic_boolean" id="E@NPiWyX$]=K(LcA!R6X"><field name="BOOL">FALSE</field></shadow><block type="logic_compare" id="Arjbun6!MjvUe21_])E("><field name="OP">EQ</field><value name="A"><shadow type="math_number" id="O%RMQPUh+M@|`AM(4@AN"><field name="NUM">0</field></shadow><block type="variables_get" id="f;gb=P{DufYvfi|)#d*X"><field name="VAR" id="sCX[CL/oWJ/y{/~.!!~R">Chosen</field></block></value><value name="B"><shadow type="math_number" id="0yIwaU*yOj:.h6dmW|Ak"><field name="NUM">0</field></shadow></value></block></value><statement name="DO"><block type="colorLight" id="+P[A36qkK4w40}vhi9J$"><field name="light">Acebott.RGBLights.ALL</field><value name="color"><shadow type="colorNumberPicker" id="2#6XEnwdEm{rF^a|R8#U"><field name="value">0x7f00ff</field></shadow></value><next><block type="controls_if" id="xM1YKow|cx!UGx([SK9e"><value name="IF0"><shadow type="logic_boolean" id="6i~6z+(~_5(r~ATPJrW~"><field name="BOOL">TRUE</field></shadow><block type="device_get_button2" id="EDumh;_#z3H{CQLGMilq"><field name="NAME">Button.A</field></block></value><statement name="DO0"><block type="variables_set" id="b9LV{1G1XZTTnF:LYZhH"><field name="VAR" id="sCX[CL/oWJ/y{/~.!!~R">Chosen</field><value name="VALUE"><shadow type="math_number" id="%e~hDna$5fde%CvhQdy}"><field name="NUM">1</field></shadow></value><next><block type="variables_set" id="d=8^5IhYc`L^W^PuJ*Ki"><field name="VAR" id="nX}OKF-4h1yxxG24!!d|">Ultra</field><value name="VALUE"><shadow type="math_number" id="II_jMRinctILTNlx//-F"><field name="NUM">1</field></shadow></value></block></next></block></statement><next><block type="controls_if" id="(3qzfQ{SfNMe:]ta:j|E"><value name="IF0"><shadow type="logic_boolean" id="_Zu^]qf]^TZ7F4~U8*F="><field name="BOOL">TRUE</field></shadow><block type="device_get_button2" id="KPxJ4@?J]h;K+q5a1)C$"><field name="NAME">Button.B</field></block></value><statement name="DO0"><block type="variables_set" id="y1~pNxnE?g@^w}U2tS5@"><field name="VAR" id="sCX[CL/oWJ/y{/~.!!~R">Chosen</field><value name="VALUE"><shadow type="math_number" id="W1e`Z4cCf2:/|0dDU]ru"><field name="NUM">1</field></shadow></value><next><block type="variables_set" id="S_g$w0989C-]Nw9^8Y?+"><field name="VAR" id="%9kK8if3bkD!c:A7ri~T">Line</field><value name="VALUE"><shadow type="math_number" id="jF[o0N$P#pf@Y8}GkEvn"><field name="NUM">1</field></shadow></value></block></next></block></statement></block></next></block></next></block></statement></block></next></block></next></block></next></block></next></block></next></block></statement></block><block type="device_show_leds" id="Vz%MAE~YN(SI}).?RC6t" disabled-reasons="pxt_automatic_disabled" x="885" y="54"><field name="LEDS">`
# . . # .
# . # . #
# . # . #
# . # . #
. # . . #
`</field></block><block type="device_forever" id="YaBED7HN_)sPQ=!Sg+Z0" x="474" y="268"><statement name="HANDLER"><block type="device_show_leds" id="G9qiz6E5vX-A6,n4LixT"><field name="LEDS">`
. # # # .
# . . . #
. # # # .
# . . . #
. . # . .
`</field><next><block type="controls_if" id="Il}lDTvvS|~0%/+P[Q~`"><value name="IF0"><shadow type="logic_boolean" id="bSwp2jkDFtg4g}6`,zS{"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="yW:R4Y5YWIU?;*+5mj2z"><field name="OP">EQ</field><value name="A"><shadow type="math_number" id="pWli6_yu840qk6,UAU,*"><field name="NUM">0</field></shadow><block type="variables_get" id="VmkdTiRW);GCh|`_.u@;"><field name="VAR" id="nX}OKF-4h1yxxG24!!d|">Ultra</field></block></value><value name="B"><shadow type="math_number" id="-YL+6aE#(^eX)81$IW+,"><field name="NUM">1</field></shadow></value></block></value><statement name="DO0"><block type="controls_if" id="TmK]F9I4.|zlSk:leo{H"><mutation else="1"></mutation><value name="IF0"><shadow type="logic_boolean" id="f@vxmqGwP-Q[Mdfgo-U9"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="DBz5L8`aj{_fzD7Vi,zn"><field name="OP">LT</field><value name="A"><shadow type="math_number" id="b6GK)HfjU(BfhlcXx!Ft"><field name="NUM">0</field></shadow><block type="ultrasonic_distance" id="/+m8unO,]0E4.{/[{JQy"><field name="echo">DigitalPin.P15</field><field name="trig">DigitalWritePin.P14</field><field name="unit">DistanceUnit.CM</field></block></value><value name="B"><shadow type="math_number" id="R(qhl}CdX=@8|_.`g:)2"><field name="NUM">25</field></shadow></value></block></value><statement name="DO0"><block type="basic_show_icon" id="mK.vrpBQZV1[v-[kF]l8"><field name="i">IconNames.No</field><next><block type="colorLight" id="GlucIUA10q=oDrT8]m4]"><field name="light">Acebott.RGBLights.ALL</field><value name="color"><shadow type="colorNumberPicker" id="lppQ`hn6t(07hn4:]V$A"><field name="value">0xff0000</field></shadow></value><next><block type="c" id="Dp*Re(i7X-CXr(q^oSE*"><field name="dir">Acebott.Direction.backward</field><value name="speed"><shadow type="math_number_minmax" id="v65[xd^0EO=)At+]:x7}"><mutation min="0" max="100" precision="0"></mutation><field name="SLIDER">50</field></shadow></value><next><block type="device_pause" id="LvCY47L]_TbI;VNZZ4+b"><value name="pause"><shadow type="timePicker" id="JjWV{G?0kz`^|+V]8h,*"><field name="ms">500</field></shadow></value><next><block type="c" id="3^4JjWs71ly9#n*#(q|E"><field name="dir">Acebott.Direction.right</field><value name="speed"><shadow type="math_number_minmax" id="ISaH1_~@BjcnE;(L*#s`"><mutation min="0" max="100" precision="0"></mutation><field name="SLIDER">50</field></shadow></value></block></next></block></next></block></next></block></next></block></statement><statement name="ELSE"><block type="basic_show_icon" id="@Yy.]P$@c4cpcx6dl~xZ"><field name="i">IconNames.Happy</field><next><block type="colorLight" id="QhC*(}K-*Ejx1d9$,Gvl"><field name="light">Acebott.RGBLights.ALL</field><value name="color"><shadow type="colorNumberPicker" id="FRu4jux4OUU}#P`nbdE="><field name="value">0x00ff00</field></shadow></value><next><block type="c" id="vfW2eO6Kl%2#!e.izJS/"><field name="dir">Acebott.Direction.forward</field><value name="speed"><shadow type="math_number_minmax" id="mffiK{?|Hf|yAt(ObuWf"><mutation min="0" max="100" precision="0"></mutation><field name="SLIDER">50</field></shadow></value></block></next></block></next></block></statement><next><block type="controls_if" id="U3,50Ce8SA#9paI7ylCY"><value name="IF0"><shadow type="logic_boolean" id="l0FpxIv*nh#C9(wv2ySH"><field name="BOOL">TRUE</field></shadow><block type="input_logo_is_pressed" id="tIUgu%:?Uqc:xe8Q48lz"></block></value><statement name="DO0"><block type="variables_set" id="2A=iV~JY^zIw]!n!sd6+"><field name="VAR" id="sCX[CL/oWJ/y{/~.!!~R">Chosen</field><value name="VALUE"><shadow type="math_number" id=";P6kAt7AY[rU]e@Pc805"><field name="NUM">0</field></shadow></value><next><block type="variables_set" id="VBZK##p=^SR8xbSE.^{,"><field name="VAR" id="%9kK8if3bkD!c:A7ri~T">Line</field><value name="VALUE"><shadow type="math_number" id="9=z|tT:jfK^fR@s%gtyu"><field name="NUM">0</field></shadow></value><next><block type="variables_set" id="+MVoTzn6O4e|ZMKk(y]c"><field name="VAR" id="nX}OKF-4h1yxxG24!!d|">Ultra</field><value name="VALUE"><shadow type="math_number" id="+H;U%i:NKhh.i)Bs!J`("><field name="NUM">0</field></shadow></value><next><block type="stopcar" id="@?9414bI}AH@xIv_%nXs"><next><block type="device_while" id="vASAElqn[vt29F2f`@=W"><value name="COND"><shadow type="logic_boolean" id="E{E)Qg!AqYL8R9I|s9`%"><field name="BOOL">FALSE</field></shadow><block type="logic_compare" id="w(tUyz-Mhq*@Qem=zya+"><field name="OP">EQ</field><value name="A"><shadow type="math_number" id="i-DN%dwjdoIBHn:^Wc`N"><field name="NUM">0</field></shadow><block type="variables_get" id="cQ1mOeQobUbV(JD?0Tvf"><field name="VAR" id="sCX[CL/oWJ/y{/~.!!~R">Chosen</field></block></value><value name="B"><shadow type="math_number" id="b[(;h!hv}O#JMY)#96`c"><field name="NUM">0</field></shadow></value></block></value><statement name="DO"><block type="colorLight" id="W]+xdB{U]RW60(vtZDTJ"><field name="light">Acebott.RGBLights.ALL</field><value name="color"><shadow type="colorNumberPicker" id="Kz#+^F)fxU%-A::nNiPY"><field name="value">0x7f00ff</field></shadow></value><next><block type="controls_if" id="pu]|c}E}+}73HvgQ]6N!"><value name="IF0"><shadow type="logic_boolean" id="#p+~B[*v,cvt;G@-W$/l"><field name="BOOL">TRUE</field></shadow><block type="device_get_button2" id="g17P8Tk)WTBE_7saC18d"><field name="NAME">Button.A</field></block></value><statement name="DO0"><block type="variables_set" id="h|CZm_tq-69ku0;+mBzj"><field name="VAR" id="sCX[CL/oWJ/y{/~.!!~R">Chosen</field><value name="VALUE"><shadow type="math_number" id="8V{n@8`+?vy!qFEVDpvs"><field name="NUM">1</field></shadow></value><next><block type="variables_set" id="9$O]qI]fEdCGyxE*lvS#"><field name="VAR" id="nX}OKF-4h1yxxG24!!d|">Ultra</field><value name="VALUE"><shadow type="math_number" id="]z;RyfRZwt$8kk5rS%TM"><field name="NUM">1</field></shadow></value></block></next></block></statement><next><block type="controls_if" id="/v98@:jN]`L.Rpk-._4m"><value name="IF0"><shadow type="logic_boolean" id="2kv^Sn#XK(hiEPg3+Xj."><field name="BOOL">TRUE</field></shadow><block type="device_get_button2" id="]oq*P8S$sC(2~:a4)!5G"><field name="NAME">Button.B</field></block></value><statement name="DO0"><block type="variables_set" id="GFeGmt_CFX92:xE`Ej]Z"><field name="VAR" id="sCX[CL/oWJ/y{/~.!!~R">Chosen</field><value name="VALUE"><shadow type="math_number" id=":g4pMc1iI$907)Vwah^v"><field name="NUM">1</field></shadow></value><next><block type="variables_set" id="_7?yQx3xWwZnx{A]^D?j"><field name="VAR" id="%9kK8if3bkD!c:A7ri~T">Line</field><value name="VALUE"><shadow type="math_number" id=".wdk[N}7kH3:d!@~%jkn"><field name="NUM">1</field></shadow></value></block></next></block></statement></block></next></block></next></block></statement></block></next></block></next></block></next></block></next></block></statement></block></next></block></statement></block></next></block></statement></block><block type="device_forever" id="%+h1;J[(4b[N-PN%w@am" x="1634" y="379"><statement name="HANDLER"><block type="controls_if" id="k}Y/EsL`iv-06;Z%|-1j"><value name="IF0"><shadow type="logic_boolean" id=".X?aLJ+8}#`CZJHy=t@4"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="v(oE]?;SP3%.V,lzBw9I"><field name="OP">EQ</field><value name="A"><shadow type="math_number" id="3$9n:UQ|w-3xf@9IhO9z"><field name="NUM">0</field></shadow><block type="variables_get" id="J(J{uJI~D^kJj}u3*XO="><field name="VAR" id="%9kK8if3bkD!c:A7ri~T">Line</field></block></value><value name="B"><shadow type="math_number" id="w.SF!%yOI$OX:?3CA^Y`"><field name="NUM">1</field></shadow></value></block></value><statement name="DO0"><block type="basic_show_icon" id="Z?UOuCtFB$FgwYRU^Xdk"><field name="i">IconNames.Sad</field></block></statement><next><block type="controls_if" id="++3frc0[HSdF?:|0e`,o"><value name="IF0"><shadow type="logic_boolean" id="MT`nW~|B$g$8ADz!-O7y"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="ZNPCpcFM#%Ia:LMMOOst"><field name="OP">EQ</field><value name="A"><shadow type="math_number" id="dwOT|^$-g1JGXd$naoa("><field name="NUM">0</field></shadow><block type="variables_get" id="D!o^Xdzl0*Ovisxh~sU3"><field name="VAR" id="%9kK8if3bkD!c:A7ri~T">Line</field></block></value><value name="B"><shadow type="math_number" id="BwTXpXH0yX+FVGl`jY%y"><field name="NUM">1</field></shadow></value></block></value><next><block type="controls_if" id="wgD$D$rGtk~xiSCeW;U`"><value name="IF0"><shadow type="logic_boolean" id="5gg*dXY~5=I1t(6o/EJu"><field name="BOOL">TRUE</field></shadow><block type="input_logo_is_pressed" id="dq(+3e=p{2yW=WO%f9~!"></block></value><statement name="DO0"><block type="variables_set" id="MvJL%70=HVPWHS}wjUFl"><field name="VAR" id="sCX[CL/oWJ/y{/~.!!~R">Chosen</field><value name="VALUE"><shadow type="math_number" id="C`U--uJ5XgBF0ll((qA+"><field name="NUM">0</field></shadow></value><next><block type="variables_set" id="Gq3!^]Jm[3UYvv0ysBVR"><field name="VAR" id="%9kK8if3bkD!c:A7ri~T">Line</field><value name="VALUE"><shadow type="math_number" id="3PP-Mn*u{Y9Y(t@f+*ds"><field name="NUM">0</field></shadow></value><next><block type="variables_set" id="*kUx%DKwjbo0KPSgL5m)"><field name="VAR" id="nX}OKF-4h1yxxG24!!d|">Ultra</field><value name="VALUE"><shadow type="math_number" id="G=638bW29m;9IGH5L$Xg"><field name="NUM">0</field></shadow></value><next><block type="stopcar" id="~jeT7],dht#ccL~:O~%g"><next><block type="device_while" id="RShW%4x,QmF~?4Hpm_;r"><value name="COND"><shadow type="logic_boolean" id="(rM?y:-[XlsxoZA:D~.S"><field name="BOOL">FALSE</field></shadow><block type="logic_compare" id="iWf.{.es5eBXJVH$4);y"><field name="OP">EQ</field><value name="A"><shadow type="math_number" id="R5fzBx;}8O}mA7BcVpu]"><field name="NUM">0</field></shadow></value><value name="B"><shadow type="math_number" id="e(Ee4HW.h?*vBiQM*Q?|"><field name="NUM">0</field></shadow></value></block></value><statement name="DO"><block type="colorLight" id="|]Iq*QQxgA0hL(_eX)yI"><field name="light">Acebott.RGBLights.ALL</field><value name="color"><shadow type="colorNumberPicker" id="opTY~BQpS;FpPto]uOyE"><field name="value">0x7f00ff</field></shadow></value><next><block type="controls_if" id="O2)fV0lVe(@i/ZWp`rCQ"><value name="IF0"><shadow type="logic_boolean" id="cx:e2BXW^n4W?TnvI|m#"><field name="BOOL">TRUE</field></shadow><block type="device_get_button2" id="NG3QqtAAnXSaA9b|,$~O"><field name="NAME">Button.A</field></block></value><statement name="DO0"><block type="variables_set" id="Jia)|jn#OoV]#TokzyEi"><field name="VAR" id="sCX[CL/oWJ/y{/~.!!~R">Chosen</field><value name="VALUE"><shadow type="math_number" id="[TV_D~w;dCMOnC~[(iY."><field name="NUM">1</field></shadow></value><next><block type="variables_set" id="5nVrCqdmEX.42qf3OU/e"><field name="VAR" id="nX}OKF-4h1yxxG24!!d|">Ultra</field><value name="VALUE"><shadow type="math_number" id="a%w!{O?GKX|bQA^DVbXU"><field name="NUM">1</field></shadow></value></block></next></block></statement><next><block type="controls_if" id="A)k8}KZcXa@pTgl$:5B{"><value name="IF0"><shadow type="logic_boolean" id="pyV:Q?51=Z=G/;Qh|fsf"><field name="BOOL">TRUE</field></shadow><block type="device_get_button2" id="FQmo|Qc,5Ms}1D]+GN42"><field name="NAME">Button.B</field></block></value><statement name="DO0"><block type="variables_set" id="VXxd_bG;],Hl*SD|MF.Z"><field name="VAR" id="sCX[CL/oWJ/y{/~.!!~R">Chosen</field><value name="VALUE"><shadow type="math_number" id=".E%F*xrcfle+JTDs@h=H"><field name="NUM">1</field></shadow></value><next><block type="variables_set" id="3y8t3PJ7RB.c_L?/^_-I"><field name="VAR" id="%9kK8if3bkD!c:A7ri~T">Line</field><value name="VALUE"><shadow type="math_number" id="HX/zhu;v!9:t{H~}v[tO"><field name="NUM">1</field></shadow></value></block></next></block></statement></block></next></block></next></block></statement></block></next></block></next></block></next></block></next></block></statement></block></next></block></next></block></statement></block><block type="device_forever" id="jnFc!Aza,zcCa--LBs/K" x="2244" y="687"><statement name="HANDLER"><block type="Trace_Sensor_init" id="|ph{gX-WAD2eR=It?8,W"><field name="rpin">AnalogReadPin.P0</field><field name="mpin">AnalogReadPin.P1</field><field name="lpin">AnalogReadPin.P2</field><next><block type="controls_if" id="h2#e?R$wxSJGLxhT;CpB"><value name="IF0"><shadow type="logic_boolean" id="XKo`3As=Jr|h9~X.6!I,"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="kFNVQS_F70$h7Dt+`$H]"><field name="OP">LT</field><value name="A"><shadow type="math_number" id="j=Zm{VZfo,M}-9HxNylo"><field name="NUM">0</field></shadow><block type="Trace_Sensor_getValue" id="KQ?z/jyZVSH3bbf_r8B3"><field name="index">Trace_Sensor_Index.R</field></block></value><value name="B"><shadow type="math_number" id="CPz#hRDe`c^6+M7}B|F."><field name="NUM">900</field></shadow></value></block></value></block></next></block></statement></block><block type="variables_get" id="]DGe]rZfz?nVeG~?p7GM" disabled-reasons="pxt_automatic_disabled" x="1801" y="989"><field name="VAR" id="sCX[CL/oWJ/y{/~.!!~R">Chosen</field></block></xml>