-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.blocks
1 lines (1 loc) · 13.7 KB
/
main.blocks
1
<xml xmlns="https://developers.google.com/blockly/xml"><variables><variable id="f$ty(N6*VI!6YT(231NP">distance</variable><variable id="URgb)5kvf9*zbGY|1)-2">safe</variable><variable id="_PAeZo5`?FqNy[WXntz`">unsafe</variable><variable id="K;:sXN%Xw^Xi=Kt9Hm4d">text list</variable><variable id=";uiZ0:{[JC#R6iipe5#F">text</variable><variable id="3=SY=5`l3QEb#Jytdei%">list</variable></variables><block type="pxt-on-start" id="Co4=v+P0Gw3}aHXb||tA" x="0" y="0"><statement name="HANDLER"><block type="device_set_analog_pin" id="]^1r}#f5~}~,7Q`K/HOF"><field name="name">AnalogPin.P0</field><value name="value"><shadow type="math_number_minmax" id="8PeqR^MC$H(Yo@z0{M6s"><mutation min="0" max="1023" label="Number" precision="0"/><field name="SLIDER">0</field></shadow></value><next><block type="device_set_analog_pin" id="!|%iI-hyk!7hl{[u*B6/"><field name="name">AnalogPin.P1</field><value name="value"><shadow type="math_number_minmax" id="C6V7Sge5`y3Yepb5K=(-"><mutation min="0" max="1023" label="Number" precision="0"/><field name="SLIDER">0</field></shadow></value><next><block type="device_set_analog_pin" id="Gu=v~.0E02Hxj`[[a8]i"><field name="name">AnalogPin.P2</field><value name="value"><shadow type="math_number_minmax" id="y]T{/F3rgm_1gP3M|9|?"><mutation min="0" max="1023" label="Number" precision="0"/><field name="SLIDER">0</field></shadow></value><next><block type="variables_set" id="IxkLNSyvm9jYd*=];q8g"><field name="VAR" id="URgb)5kvf9*zbGY|1)-2">safe</field><value name="VALUE"><shadow type="math_number" id="^b_J~F,5Y:.Buj9y^(gL"><field name="NUM">175</field></shadow></value><next><block type="variables_set" id=",^[d,4,:BUxx{St2f/cm"><field name="VAR" id="_PAeZo5`?FqNy[WXntz`">unsafe</field><value name="VALUE"><shadow type="math_number" id="Jc[?i?%!-98oVajn~c2-"><field name="NUM">125</field></shadow></value><next><block type="variables_set" id="iNUYU#;:DxuLmbo[_?A}"><field name="VAR" id="K;:sXN%Xw^Xi=Kt9Hm4d">text list</field><value name="VALUE"><block type="lists_create_with" id="0_[d%HK7Lo%/=JT*!()^"><mutation items="5"/><value name="ADD0"><shadow type="text" id="FP@Y$T^*SEc1VDDhKGT3"><field name="TEXT">Uh-oh!</field></shadow></value><value name="ADD1"><shadow type="text" id="A@logw}DH3*hs8HjO;5#"><field name="TEXT">Eeek!</field></shadow></value><value name="ADD2"><shadow type="text" id="%cc)5D_=pXF3GIxu_hH!"><field name="TEXT">Oops!</field></shadow></value><value name="ADD3"><shadow type="text" id="Hq3q~p7%v8AZi;xVc*hk"><field name="TEXT">Eff-off!</field></shadow></value><value name="ADD4"><shadow type="text" id="DH{suZ-wCM)=qERzWg.i"><field name="TEXT">Wibble!</field></shadow></value></block></value></block></next></block></next></block></next></block></next></block></next></block></statement></block><block type="function_definition" id="!d3{/M4U9.9N?!O7_5L$" x="14" y="389"><mutation name="setred" functionid=")WJOwID9O`I9V(S(p9,J"/><field name="function_name">setred</field><statement name="STACK"><block type="device_set_analog_pin" id="0yVi+C|NVhiVa(LuzLaX"><field name="name">AnalogPin.P0</field><value name="value"><shadow type="math_number_minmax" id="Zod_41ktzoTuqb$:-oUz"><mutation min="0" max="1023" label="Number" precision="0"/><field name="SLIDER">511</field></shadow></value><next><block type="device_set_analog_pin" id="SVdAP3l~CK-L,6GUsrqn"><field name="name">AnalogPin.P1</field><value name="value"><shadow type="math_number_minmax" id="|HM_WF,]hp`Gn,ex+9:*"><mutation min="0" max="1023" label="Number" precision="0"/><field name="SLIDER">0</field></shadow></value><next><block type="device_set_analog_pin" id="@e1`HSd)m2SKqhk/E=#b"><field name="name">AnalogPin.P2</field><value name="value"><shadow type="math_number_minmax" id="Y_=tDv+/{AcsZ95=jyM~"><mutation min="0" max="1023" label="Number" precision="0"/><field name="SLIDER">0</field></shadow></value><next><block type="controls_repeat_ext" id="a5(}ctY^T3z5T,jrsBU7"><value name="TIMES"><shadow type="math_whole_number" id="Wuy2`PaPq|3n)47_Ej6k"><field name="NUM">2</field></shadow></value><statement name="DO"><block type="device_pause" id="$RyRni5jy3{~@+bp2(bl"><value name="pause"><shadow type="timePicker" id="VqEKzcci/C2%m5%d(R=!"><field name="ms">100</field></shadow></value></block></statement><next><block type="variables_set" id="^9jGP[`a_|(oLyUJYoJr"><field name="VAR" id=";uiZ0:{[JC#R6iipe5#F">text</field><value name="VALUE"><shadow type="math_number" id="62@L#:7WK#KN!X3%+4ly"><field name="NUM">0</field></shadow><block type="lists_index_get" id="qQ.~er!/Ax)HK(])fb~V"><value name="LIST"><block type="variables_get" id="XqSU/DtW}vXTo!dNTY6("><field name="VAR" id="K;:sXN%Xw^Xi=Kt9Hm4d">text list</field></block></value><value name="INDEX"><shadow type="math_number" id="na2eNc2YLO#NHG]rd.%t"><field name="NUM">0</field></shadow><block type="device_random" id="T55;FXqNXIS=YN*Dq@Jm"><value name="min"><shadow type="math_number" id="$GITKS#et$s,#[0sEFw6"><field name="NUM">0</field></shadow></value><value name="limit"><shadow type="math_number" id="F_Cl98:RDBXm^~NHA7m`"><field name="NUM">10</field></shadow><block type="math_arithmetic" id="-u*s`s2ukuckSRL:]LBc"><field name="OP">MINUS</field><value name="A"><shadow type="math_number" id="}^]3R`nIvKA#lk$[PGi!"><field name="NUM">0</field></shadow><block type="lists_length" id="+U%3Zk#LLQE7{L?U`pJM"><value name="VALUE"><block type="variables_get" id="1wV!jg(Co]x939]1a=(~"><field name="VAR" id="K;:sXN%Xw^Xi=Kt9Hm4d">text list</field></block></value></block></value><value name="B"><shadow type="math_number" id="jHK6@}T1eq)BFANdNP?U"><field name="NUM">1</field></shadow></value></block></value></block></value></block></value><next><block type="device_print_message" id="M[%Ue^gwYZE@4F[ZLuaS"><value name="text"><shadow type="text" id="oRp%_Z).*-mYy%3dkQ4v"><field name="TEXT">Uh-oh!</field></shadow><block type="variables_get" id="W:33pg[AH9bOzV?SvMiV"><field name="VAR" id=";uiZ0:{[JC#R6iipe5#F">text</field></block></value><next><block type="device_show_image_offset" id="SNWDUH=2;4Z}QU@MQ4$5"><mutation xmlns="http://www.w3.org/1999/xhtml" _expanded="0" _input_init="false"></mutation><value name="sprite"><block type="builtin_image" id="sD1w}f+xS}mBt*x9qD6!"><field name="i">IconNames.Skull</field></block></value><value name="offset"><shadow type="math_number" id="=nH%KziVqA{2DC)sE1+|"><field name="NUM">0</field></shadow></value></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block><block type="function_definition" id="a0Tp3eLQ[ijja/m50e5]" x="16" y="1034"><mutation name="setamber" functionid="Z!{Y/{kKIlYdrtmx5-S`"/><field name="function_name">setamber</field><statement name="STACK"><block type="device_set_analog_pin" id="7T9W!|q!Qaz:aaycDQan"><field name="name">AnalogPin.P0</field><value name="value"><shadow type="math_number_minmax" id="95nsf7JLsbCfgT{$|Cg_"><mutation min="0" max="1023" label="Number" precision="0"/><field name="SLIDER">767</field></shadow></value><next><block type="device_set_analog_pin" id="|*G{sA7h8)!^XTh#0h1!"><field name="name">AnalogPin.P1</field><value name="value"><shadow type="math_number_minmax" id="*`ql=f3LsOW7.b]qX#6S"><mutation min="0" max="1023" label="Number" precision="0"/><field name="SLIDER">63</field></shadow></value><next><block type="device_set_analog_pin" id=",#L%P:?:;+kR)s%Z+*@C"><field name="name">AnalogPin.P2</field><value name="value"><shadow type="math_number_minmax" id="`g,nue]q--:1OaBMAG%C"><mutation min="0" max="1023" label="Number" precision="0"/><field name="SLIDER">0</field></shadow></value><next><block type="controls_repeat_ext" id="%GFV%l`KlP~PXJ=Qo=V1"><value name="TIMES"><shadow type="math_whole_number" id="Z#jjC{]/30-!7l~`ms@`"><field name="NUM">1</field></shadow></value><statement name="DO"><block type="device_pause" id="p@v.[|QQTZ)Jkc?`ZxvP"><value name="pause"><shadow type="timePicker" id="E=_^~)g8J,C0s6ok3kCp"><field name="ms">100</field></shadow></value></block></statement><next><block type="device_show_image_offset" id="j%(vhZA:eZXHP4s@O6jV"><mutation xmlns="http://www.w3.org/1999/xhtml" _expanded="0" _input_init="false"></mutation><value name="sprite"><block type="builtin_image" id="S3T_?#ODN8qKDCx/E=K#"><field name="i">IconNames.Sad</field></block></value><value name="offset"><shadow type="math_number" id="bI`h*HQCwDwrDs7BL)h*"><field name="NUM">0</field></shadow></value></block></next></block></next></block></next></block></next></block></statement></block><block type="function_definition" id="$Y~CWkTHP0KFGXtLVgG)" x="21" y="1540"><mutation name="setgreen" functionid="UdpNIHSp{.290IBPA%:q"/><field name="function_name">setgreen</field><statement name="STACK"><block type="device_set_analog_pin" id="byC|d.B$X6km0.]FAZXP"><field name="name">AnalogPin.P0</field><value name="value"><shadow type="math_number_minmax" id="vpM3Npl5aZ]R-W=JEqoh"><mutation min="0" max="1023" label="Number" precision="0"/><field name="SLIDER">0</field></shadow></value><next><block type="device_set_analog_pin" id="u*QUqYo0l!{EQv2YL^z|"><field name="name">AnalogPin.P1</field><value name="value"><shadow type="math_number_minmax" id="WS?PMJBip|og_4$YU]dD"><mutation min="0" max="1023" label="Number" precision="0"/><field name="SLIDER">511</field></shadow></value><next><block type="device_set_analog_pin" id="`(X]h3?*v1$[Roj^xn9R"><field name="name">AnalogPin.P2</field><value name="value"><shadow type="math_number_minmax" id="R@ZS$0_6.S_qOa5KtH=m"><mutation min="0" max="1023" label="Number" precision="0"/><field name="SLIDER">0</field></shadow></value><next><block type="device_show_image_offset" id="eps3y~i%ygd6Zi;qO{TY"><mutation xmlns="http://www.w3.org/1999/xhtml" _expanded="0" _input_init="false"></mutation><value name="sprite"><block type="builtin_image" id="mR3)9fv#iTl$w,q|KUp?"><field name="i">IconNames.Heart</field></block></value><value name="offset"><shadow type="math_number" id="#-F(o*Jy-vV)^fV^b;U%"><field name="NUM">0</field></shadow></value></block></next></block></next></block></next></block></statement></block><block type="device_forever" id="(Gb/.LQYyI-}#_nqsM[[" x="20" y="1889"><statement name="HANDLER"><block type="variables_set" id="uviOXlIm@V`$uOI@9T87"><field name="VAR" id="f$ty(N6*VI!6YT(231NP">distance</field><value name="VALUE"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="sonar_ping" id="FJZ^WU-*zTW~/lG]trP#"><field name="trig">DigitalPin.P8</field><field name="echo">DigitalPin.P16</field><field name="unit">PingUnit.Centimeters</field></block></value><next><block type="device_show_number" id="dN|+I+!izfyCmEjgj2Em"><value name="number"><block type="variables_get" id="Z/o7nokOE{@vpg%[M.@y"><field name="VAR" id="f$ty(N6*VI!6YT(231NP">distance</field></block></value><next><block type="controls_if" id="6S9p[)/id~1:|J#F1^dp"><mutation elseif="2"/><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_operation" id="q{sKEPf%V}W$@DGH~QyF"><field name="OP">OR</field><value name="A"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="QiGe,H}/n=IMgc$e=nM("><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="mW(7o5f$lX1CG]$ezBAS"><field name="VAR" id="f$ty(N6*VI!6YT(231NP">distance</field></block></value><value name="B"><shadow type="math_number" id="3i.KGAz;,iRz@#Lga)aZ"><field name="NUM">0</field></shadow></value></block></value><value name="B"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="_jzpOZYUuFI2bOa/N8bg"><field name="OP">GT</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="Fiw$4|ni!F7BecWIjmLP"><field name="VAR" id="f$ty(N6*VI!6YT(231NP">distance</field></block></value><value name="B"><shadow type="math_number"><field name="NUM">170</field></shadow><block type="variables_get" id="o%2[-|Zw/BP1.`/xhku@"><field name="VAR" id="URgb)5kvf9*zbGY|1)-2">safe</field></block></value></block></value></block></value><statement name="DO0"><block type="function_call" id="]tPMisM{dOyx{/Q=tZvp"><mutation name="setgreen" functionid="UdpNIHSp{.290IBPA%:q"/></block></statement><value name="IF1"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="!M9kvl;7_0r1m3-`d3Qd"><field name="OP">GT</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="0[Vq;I@pJ4)]RVt(sJ$["><field name="VAR" id="f$ty(N6*VI!6YT(231NP">distance</field></block></value><value name="B"><shadow type="math_number"><field name="NUM">125</field></shadow><block type="variables_get" id="v6eza}e|PcQkLc1Lw~#M"><field name="VAR" id="_PAeZo5`?FqNy[WXntz`">unsafe</field></block></value></block></value><statement name="DO1"><block type="function_call" id="FScrBmV;QdaQ)HR+jH*H"><mutation name="setamber" functionid="Z!{Y/{kKIlYdrtmx5-S`"/></block></statement><value name="IF2"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="NQ%mgXv1s)~ELoq~-e*|"><field name="OP">LT</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="CyTLt)*=ne0f6=pDNuO1"><field name="VAR" id="f$ty(N6*VI!6YT(231NP">distance</field></block></value><value name="B"><shadow type="math_number"><field name="NUM">125</field></shadow><block type="variables_get" id="*W|_`IyZEFo#/9P=?({l"><field name="VAR" id="_PAeZo5`?FqNy[WXntz`">unsafe</field></block></value></block></value><statement name="DO2"><block type="function_call" id="46/eBU!l9ZbARxC?5ur4"><mutation name="setred" functionid=")WJOwID9O`I9V(S(p9,J"/></block></statement><next><block type="device_pause" id="xwva|atj5Lw]7$=8{^J3"><value name="pause"><shadow type="timePicker" id="ha_@xBsdaK1$1;4l*uxE"><field name="ms">5000</field></shadow></value></block></next></block></next></block></next></block></statement></block></xml>