-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.blocks
1 lines (1 loc) · 16.9 KB
/
main.blocks
1
<xml xmlns="https://developers.google.com/blockly/xml"><variables><variable id="dhD/v8BQNn^wg:Wiw5IR">_inMotion_F</variable><variable id="px|AdURU,/X|,@Dys*Js">_inMotion_R</variable><variable id=":f}X{(j8wbs{^,m1E*@5">_wheel_min_threshold</variable><variable id="`L+E+2+vt73]A,CKxk{|">_wheel_max_speed</variable><variable id="U-l8oBribgA9VmG9l4uK">_speed</variable><variable id="NeWWHIKyw=I#u7Af^$lS">_collision</variable></variables><block type="pxt-on-start" id="*Vo#KToFePjPD`+ZPVlm" x="0" y="0"><statement name="HANDLER"><block type="motor_motorStopAll" id="7e]]Xt7npFLj`U7I4]0z"><next><block type="variables_set" id="ow%pa!|0|~$(-px-|^l$"><field name="VAR" id="`L+E+2+vt73]A,CKxk{|">_wheel_max_speed</field><value name="VALUE"><shadow type="math_number" id="5e;^PrxwLo:ri.[{qC}3"><field name="NUM">150</field></shadow></value><next><block type="variables_set" id="[VWjbh^t|krf71qUK3.W"><field name="VAR" id=":f}X{(j8wbs{^,m1E*@5">_wheel_min_threshold</field><value name="VALUE"><shadow type="math_number" id="GMgEhm2@I;zehJeaIho#"><field name="NUM">50</field></shadow></value><next><block type="variables_set" id="ZkjKi|nH.G+w@?#F:2!v"><field name="VAR" id="dhD/v8BQNn^wg:Wiw5IR">_inMotion_F</field><value name="VALUE"><shadow type="math_number" id="1c+sGwP,ZWsHU`IO=y?E"><field name="NUM">0</field></shadow></value><next><block type="variables_set" id="Vsec?r_?vcpHg@cz5CVn"><field name="VAR" id="px|AdURU,/X|,@Dys*Js">_inMotion_R</field><value name="VALUE"><shadow type="math_number" id="-Ma$DReegWbfo2,oO]59"><field name="NUM">0</field></shadow></value><next><block type="basic_show_icon" id="X:018faTN$:t4,/l.NE."><field name="i">IconNames.Heart</field></block></next></block></next></block></next></block></next></block></next></block></statement></block><block type="device_button_event" id="C4F:veDQMVd7?jXWP(e)" x="747" y="-14"><field name="NAME">Button.A</field><statement name="HANDLER"><block type="variables_set" id="lzQ=cz/xw9k}%%#E=T`P"><field name="VAR" id="U-l8oBribgA9VmG9l4uK">_speed</field><value name="VALUE"><shadow type="math_number" id="gK5LO9(4?}q8-1eKQX$^"><field name="NUM">40</field></shadow></value><next><block type="function_call" id="n!P{O(UWN?.qmz{Oq-}7"><mutation name="move_F" functionid="yMi%m1`_6chIfel^YW/n"></mutation></block></next></block></statement></block><block type="input_logo_event" id="}~1wa+[)lVznL!+,SwJa" x="412" y="20"><field name="action">TouchButtonEvent.Touched</field><statement name="HANDLER"><block type="motor_motorStopAll" id="/q4{iM~fk5^=c;bQKa,_"><next><block type="variables_set" id="E_)UEzF(A),}oJcY9=GF"><field name="VAR" id="dhD/v8BQNn^wg:Wiw5IR">_inMotion_F</field><value name="VALUE"><shadow type="math_number" id="]p?Ac/;@/PN`-UnWK/.r"><field name="NUM">0</field></shadow></value><next><block type="variables_set" id="#^vB5C`G04CE-.o4`|Nk"><field name="VAR" id="px|AdURU,/X|,@Dys*Js">_inMotion_R</field><value name="VALUE"><shadow type="math_number" id="Cfhdvu2H7E2t%E;@*XwW"><field name="NUM">0</field></shadow></value></block></next></block></next></block></statement></block><block type="device_button_event" id="l*S#q5d/lfR1jOV1ir95" x="1116" y="-16"><field name="NAME">Button.B</field><statement name="HANDLER"><block type="variables_set" id="Gk|veO)JR-0W500UMCM."><field name="VAR" id="U-l8oBribgA9VmG9l4uK">_speed</field><value name="VALUE"><shadow type="math_number" id="KW$ILjQ8G7#?Rlz7y){("><field name="NUM">40</field></shadow></value><next><block type="function_call" id="6O#!InD@$(YZ]S1O$YO%"><mutation name="move_R" functionid="k9KgDr/XlOGhC~DAAfg4"></mutation></block></next></block></statement></block><block type="function_definition" id="[email protected]*M(kDlDh.(k72" x="737" y="166"><mutation name="avoidCollision_F" functionid="e065FJ#j{P+V[|tR{u%k"></mutation><field name="function_name">avoidCollision_F</field></block><block type="function_definition" id="9qm#3+q4n~=r|ks58#T#" x="736" y="326"><mutation name="avoidCollision_R" functionid="*FyXcaD;Xjd?|KkkQv}Y"></mutation><field name="function_name">avoidCollision_R</field></block><block type="device_forever" id="^)!.2/D)RM@Gr)/*@(Oi" x="-132" y="450"><statement name="HANDLER"><block type="serial_writevalue" id="-kMkl%@rDSf!#QqlA.}P"><value name="name"><shadow type="text" id="BEAbSc(#||Ui:9A8$KKz"><field name="TEXT">_speed</field></shadow></value><value name="value"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="$n)O1%hpTXk84uPr6?.Z"><field name="VAR" id="U-l8oBribgA9VmG9l4uK">_speed</field></block></value><next><block type="serial_writevalue" id="*;LDH6dw#@voYSD4N|X{"><value name="name"><shadow type="text" id="|q=JedSpQ+x$m!K=)s]K"><field name="TEXT">_inMotion_F</field></shadow></value><value name="value"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="]RmW?%weX+Z-/Po!6Y-Y"><field name="VAR" id="dhD/v8BQNn^wg:Wiw5IR">_inMotion_F</field></block></value><next><block type="controls_if" id="z[F^~5Y!rSX~d!]$|B^n"><mutation else="1"></mutation><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="variables_get" id="revtUQWEH[)hLh`~b)e,"><field name="VAR" id="NeWWHIKyw=I#u7Af^$lS">_collision</field></block></value><statement name="DO0"><block type="controls_if" id="uPC(L03W4SRtwc)ofW:4"><mutation elseif="1"></mutation><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="variables_get" id=")Zu/fF2:LU=t];AKY,P_"><field name="VAR" id="dhD/v8BQNn^wg:Wiw5IR">_inMotion_F</field></block></value><statement name="DO0"><block type="function_call" id="GgU,OFZxP(zH3j6jQall"><mutation name="avoidCollision_F" functionid="e065FJ#j{P+V[|tR{u%k"></mutation></block></statement><value name="IF1"><block type="variables_get" id="%1uqcuip9Qyd{b@^Xyo/"><field name="VAR" id="px|AdURU,/X|,@Dys*Js">_inMotion_R</field></block></value><statement name="DO1"><block type="function_call" id="kVC!b^~:iqT*b1dEQWXL"><mutation name="avoidCollision_R" functionid="*FyXcaD;Xjd?|KkkQv}Y"></mutation></block></statement></block></statement><statement name="ELSE"><block type="controls_if" id=")E*oCjdF4U;H`BgtJjbj"><mutation elseif="1"></mutation><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="variables_get" id="lex]6tCEc0z0db$kG,Fr"><field name="VAR" id="dhD/v8BQNn^wg:Wiw5IR">_inMotion_F</field></block></value><statement name="DO0"><block type="function_call" id=".JPtOOHzMEMYUMyM3/##"><mutation name="move_F" functionid="yMi%m1`_6chIfel^YW/n"></mutation></block></statement><value name="IF1"><block type="variables_get" id="e)a+bz{99t.j)8WF*^T!"><field name="VAR" id="px|AdURU,/X|,@Dys*Js">_inMotion_R</field></block></value></block></statement></block></next></block></next></block></statement></block><block type="function_definition" id="a#pM4#-!ObN:H0H+urIx" x="496" y="460"><mutation name="forward_L" functionid="$wM:%x@](L]$Chh#~Uh}"></mutation><field name="function_name">forward_L</field></block><block type="function_definition" id="_{-P!W/qY0vUwx{+2gC`" x="787" y="527"><mutation name="move_F" functionid="yMi%m1`_6chIfel^YW/n"></mutation><field name="function_name">move_F</field><statement name="STACK"><block type="variables_set" id="t~%n+x7/V1~HvssnZ5Ts"><field name="VAR" id="dhD/v8BQNn^wg:Wiw5IR">_inMotion_F</field><value name="VALUE"><shadow type="math_number" id="sfqJ`Zh1e,+GipAHpu{V"><field name="NUM">1</field></shadow></value><next><block type="variables_set" id="Wmd3U[.k.xV@q#u~xSEK"><field name="VAR" id="px|AdURU,/X|,@Dys*Js">_inMotion_R</field><value name="VALUE"><shadow type="math_number" id="OUe6--ukdk}%m+j[x)!7"><field name="NUM">0</field></shadow></value><next><block type="controls_if" id="?R|s~1@ud@Uyfcm=Uw9s"><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="eCC?`7HYS@+jUI_oE~c}"><field name="OP">GT</field><value name="A"><shadow type="math_number" disabled="true"><field name="NUM">0</field></shadow><block type="variables_get" id="F:jE*9_KTL=gX#E+0,B-"><field name="VAR" id="U-l8oBribgA9VmG9l4uK">_speed</field></block></value><value name="B"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id=";uzUVy@R/wpM#VKJ(~};"><field name="VAR" id="`L+E+2+vt73]A,CKxk{|">_wheel_max_speed</field></block></value></block></value><statement name="DO0"><block type="variables_set" id=";!gnnW6a9:#9dg%zk}_Q"><field name="VAR" id="U-l8oBribgA9VmG9l4uK">_speed</field><value name="VALUE"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id=":~NIwp/?{q8)~SpQZ^y|"><field name="VAR" id="`L+E+2+vt73]A,CKxk{|">_wheel_max_speed</field></block></value></block></statement><next><block type="controls_if" id=",FVPqH-.`PSxgp^{WDmA"><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="O_oNCKsI%8-+jWdOH0LC"><field name="OP">LT</field><value name="A"><shadow type="math_number" disabled="true"><field name="NUM">0</field></shadow><block type="variables_get" id=";}bAHk#VB$:2KB3i*isS"><field name="VAR" id="U-l8oBribgA9VmG9l4uK">_speed</field></block></value><value name="B"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="7/*7h:LoyX,-Pb][A?sI"><field name="VAR" id=":f}X{(j8wbs{^,m1E*@5">_wheel_min_threshold</field></block></value></block></value><statement name="DO0"><block type="variables_set" id="KgyyRA=jDJk^BBK1WQ7X"><field name="VAR" id="U-l8oBribgA9VmG9l4uK">_speed</field><value name="VALUE"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="CthnbjPe},yz#)Ub;.w."><field name="VAR" id=":f}X{(j8wbs{^,m1E*@5">_wheel_min_threshold</field></block></value></block></statement><next><block type="motor_MotorRun" id="(#{37HB;R1]9RDuOJt:b"><field name="index">motor.Motors.M1</field><field name="Dir">motor.Dir.CCW</field><value name="speed"><shadow type="math_number_minmax"><mutation min="0" max="255" label="Speed" precision="0"></mutation><field name="SLIDER">150</field></shadow><block type="variables_get" id="5faGQ)7.vM#VR.lx0ivL"><field name="VAR" id="U-l8oBribgA9VmG9l4uK">_speed</field></block></value><next><block type="motor_MotorRun" id="}T(i]|y{+2hm3UQ9K~+Y"><field name="index">motor.Motors.M2</field><field name="Dir">motor.Dir.CCW</field><value name="speed"><shadow type="math_number_minmax"><mutation min="0" max="255" label="Speed" precision="0"></mutation><field name="SLIDER">150</field></shadow><block type="variables_get" id="A{CkaU_OJ*I-x#79a-_I"><field name="VAR" id="U-l8oBribgA9VmG9l4uK">_speed</field></block></value><next><block type="motor_MotorRun" id="EctfER+MW!~pjo7,G$$y"><field name="index">motor.Motors.M3</field><field name="Dir">motor.Dir.CW</field><value name="speed"><shadow type="math_number_minmax"><mutation min="0" max="255" label="Speed" precision="0"></mutation><field name="SLIDER">150</field></shadow><block type="variables_get" id="VEvwW;f@O{WqTbLLMjNB"><field name="VAR" id="U-l8oBribgA9VmG9l4uK">_speed</field></block></value><next><block type="motor_MotorRun" id="*5Rs(9!J)lDPT?N;%a)S"><field name="index">motor.Motors.M4</field><field name="Dir">motor.Dir.CW</field><value name="speed"><shadow type="math_number_minmax"><mutation min="0" max="255" label="Speed" precision="0"></mutation><field name="SLIDER">150</field></shadow><block type="variables_get" id="$Hn=bng_fUkn)}=31ABV"><field name="VAR" id="U-l8oBribgA9VmG9l4uK">_speed</field></block></value><next><block type="device_pause" id="mcnP0]y~@ApjRr5R+Fx}"><value name="pause"><shadow type="timePicker" id="R,ABnMDehHhVGC$5Qcc("><field name="ms">2000</field></shadow></value></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block><block type="function_definition" id="f6GwKR!*Ic02pML^vJ-r" x="1388" y="546"><mutation name="move_R" functionid="k9KgDr/XlOGhC~DAAfg4"></mutation><field name="function_name">move_R</field><statement name="STACK"><block type="variables_set" id="vqg0E~YmE.mCl))4Rt|t"><field name="VAR" id="dhD/v8BQNn^wg:Wiw5IR">_inMotion_F</field><value name="VALUE"><shadow type="math_number" id="~a%|byU!W*7P`8?A0o]}"><field name="NUM">0</field></shadow></value><next><block type="variables_set" id="kv?}GWe)VRgai^6_DO@q"><field name="VAR" id="px|AdURU,/X|,@Dys*Js">_inMotion_R</field><value name="VALUE"><shadow type="math_number" id="d5[X{sl68Im8%ln71]ez"><field name="NUM">1</field></shadow></value><next><block type="controls_if" id="ECu$.L9~+En]mIfSjBcs"><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="nqLMPl=|i$Fu~k[)8NuZ"><field name="OP">GT</field><value name="A"><shadow type="math_number" disabled="true"><field name="NUM">0</field></shadow><block type="variables_get" id="P!@D{cPsY*xCAx]Lt!91"><field name="VAR" id="U-l8oBribgA9VmG9l4uK">_speed</field></block></value><value name="B"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="lbW3|TNa:uVc@77%`_Zo"><field name="VAR" id="`L+E+2+vt73]A,CKxk{|">_wheel_max_speed</field></block></value></block></value><statement name="DO0"><block type="variables_set" id="J#i|SLkYO:G^SJb+fcaI"><field name="VAR" id="U-l8oBribgA9VmG9l4uK">_speed</field><value name="VALUE"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id=";3b[d@GsObBUtuiHuJup"><field name="VAR" id="`L+E+2+vt73]A,CKxk{|">_wheel_max_speed</field></block></value></block></statement><next><block type="controls_if" id="DQ|j;o6yn/Kl6j/T,~2B"><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="~R8e$EHPD9G?DU`TG.@u"><field name="OP">LT</field><value name="A"><shadow type="math_number" disabled="true"><field name="NUM">0</field></shadow><block type="variables_get" id="UNkXGcSCbPU!.g0BXm.L"><field name="VAR" id="U-l8oBribgA9VmG9l4uK">_speed</field></block></value><value name="B"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="49U#Qx0?1y8Bv-]B8DlD"><field name="VAR" id=":f}X{(j8wbs{^,m1E*@5">_wheel_min_threshold</field></block></value></block></value><statement name="DO0"><block type="variables_set" id="~Q0E6^FgXDCI#prc/Qfs"><field name="VAR" id="U-l8oBribgA9VmG9l4uK">_speed</field><value name="VALUE"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="+ZKYZC+M2YlU!Yrx;uxX"><field name="VAR" id=":f}X{(j8wbs{^,m1E*@5">_wheel_min_threshold</field></block></value></block></statement><next><block type="motor_MotorRun" id=".8/a}]L|RweF^72`feo,"><field name="index">motor.Motors.M1</field><field name="Dir">motor.Dir.CW</field><value name="speed"><shadow type="math_number_minmax"><mutation min="0" max="255" label="Speed" precision="0"></mutation><field name="SLIDER">150</field></shadow><block type="variables_get" id="=v|$PDwW3jG3/2|wW}U+"><field name="VAR" id="U-l8oBribgA9VmG9l4uK">_speed</field></block></value><next><block type="motor_MotorRun" id="k2TN%Jw2z}yD4pOIQ6_X"><field name="index">motor.Motors.M2</field><field name="Dir">motor.Dir.CW</field><value name="speed"><shadow type="math_number_minmax"><mutation min="0" max="255" label="Speed" precision="0"></mutation><field name="SLIDER">150</field></shadow><block type="variables_get" id="p+0#ykUfl4H;oG[bt:os"><field name="VAR" id="U-l8oBribgA9VmG9l4uK">_speed</field></block></value><next><block type="motor_MotorRun" id="Qr.xSHPgyY,90=T6J:Wp"><field name="index">motor.Motors.M3</field><field name="Dir">motor.Dir.CCW</field><value name="speed"><shadow type="math_number_minmax"><mutation min="0" max="255" label="Speed" precision="0"></mutation><field name="SLIDER">150</field></shadow><block type="variables_get" id="WO(j{OY3~9BbO_U=qzCO"><field name="VAR" id="U-l8oBribgA9VmG9l4uK">_speed</field></block></value><next><block type="motor_MotorRun" id="JHd/Pl(7HxA%(Y~mZ.:7"><field name="index">motor.Motors.M4</field><field name="Dir">motor.Dir.CCW</field><value name="speed"><shadow type="math_number_minmax"><mutation min="0" max="255" label="Speed" precision="0"></mutation><field name="SLIDER">150</field></shadow><block type="variables_get" id="!lxLGV^9Milpdl%HLjxi"><field name="VAR" id="U-l8oBribgA9VmG9l4uK">_speed</field></block></value><next><block type="device_pause" id="dbW#:bg$LMlae$=9e)O_"><value name="pause"><shadow type="timePicker" id="LA5Vu.Cx6J7f^*M)UxA,"><field name="ms">2000</field></shadow></value></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block><block type="function_definition" id="S;bM?3(uL+H{6}KK)xCN" x="494" y="627"><mutation name="forward_R" functionid="+4lB=,sb+Jj(SvRx[~{/"></mutation><field name="function_name">forward_R</field></block><block type="function_definition" id="|4kXca)N{vDh8EA8#WXN" x="489" y="807"><mutation name="reverse_L" functionid="?1L-#tH`JW]G%CQkczxV"></mutation><field name="function_name">reverse_L</field></block><block type="function_definition" id="M#qG%u)NRx:S@RJjt]M}" x="490" y="1037"><mutation name="reverse_R" functionid="`tqA.7ak329mc4+.-Yvb"></mutation><field name="function_name">reverse_R</field></block></xml>