-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.blocks
More file actions
1 lines (1 loc) · 16.7 KB
/
main.blocks
File metadata and controls
1 lines (1 loc) · 16.7 KB
1
<xml xmlns="https://developers.google.com/blockly/xml"><variables><variable id="2Hc1w[/0#QIgGw-WvsK)">sprite</variable><variable id=":/*$?V7nCQiQvgM.,m8K">ultraDistance</variable><variable id="X}Yn#*BP|+ukGUG)vJ%}">numProgram</variable></variables><comment id="S^Ap6UW;m8oB_Nu(Ia7a" x="1497" y="0" h="99" w="289">Control which program to run</comment><comment id="vm8Ir4m%7Cp#{xPm99lE" x="46" y="429" h="94" w="195">Infra-red Control Mode</comment><comment id="DKrl[$y:1sDkEi.vZvwl" x="1943" y="589" h="117" w="186">Ultra sonic Robot sumo mode</comment><block type="device_button_event" id="zli{sweYNn-5azhngDqn" x="1497" y="112"><field name="NAME">Button.A</field><statement name="HANDLER"><block type="variables_set" id=")kl/R=;i0[7nLjqu!EA~"><field name="VAR" id="X}Yn#*BP|+ukGUG)vJ%}">numProgram</field><value name="VALUE"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="math_modulo" id="gb3$|oIhg48I8/leE7;]"><value name="DIVIDEND"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="math_arithmetic" id="rP{A4SyAN129l)),wX1K"><field name="OP">ADD</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="6~!/P(~x5u;fj[n}CZuo"><field name="VAR" id="X}Yn#*BP|+ukGUG)vJ%}">numProgram</field></block></value><value name="B"><shadow type="math_number" id="c2/SlB.aMg7mKLyD.X9|"><field name="NUM">1</field></shadow></value></block></value><value name="DIVISOR"><shadow type="math_number" id="ibt~nf0pg{rXaTn%0:L+"><field name="NUM">3</field></shadow></value></block></value><next><block type="magicbit_motor_dual" id="AaEioHhLPX20kBMKi_%K"><field name="motor1">magicbit.Motors.M1</field><field name="motor2">magicbit.Motors.M4</field><value name="speed1"><shadow type="math_number_minmax" id="iIB87,})-D,|i(;MS3ZE"><mutation min="-255" max="255" label="Speed1" precision="0"/><field name="SLIDER">0</field></shadow></value><value name="speed2"><shadow type="math_number_minmax" id="9U+rGPP:3`)9;#Nt_xNV"><mutation min="-255" max="255" label="Speed2" precision="0"/><field name="SLIDER">0</field></shadow></value><next><block type="device_print_message" id="(nmjcj:Oy-.d9X(Ulu!O"><value name="text"><shadow type="text"><field name="TEXT">Hello!</field></shadow><block type="variables_get" id="aZ4~7BH|V5v#])bHZ]04"><field name="VAR" id="X}Yn#*BP|+ukGUG)vJ%}">numProgram</field></block></value><next><block type="device_pause" id="+*_#!?Yu#kLD4Rnl8EW?"><value name="pause"><shadow type="timePicker" id="{9293Nk;.yab`0R9YQ!S"><field name="ms">1000</field></shadow></value><next><block type="magicbit_motor_dual" id="KY}k/}Vb|Z480GP,-Eb$"><field name="motor1">magicbit.Motors.M1</field><field name="motor2">magicbit.Motors.M4</field><value name="speed1"><shadow type="math_number_minmax" id="`wz1D.0[E6S6g9}v8$pE"><mutation min="-255" max="255" label="Speed1" precision="0"/><field name="SLIDER">0</field></shadow></value><value name="speed2"><shadow type="math_number_minmax" id="[`!ZBo;%x{z%F#%N:IhY"><mutation min="-255" max="255" label="Speed2" precision="0"/><field name="SLIDER">0</field></shadow></value></block></next></block></next></block></next></block></next></block></statement></block><block type="pxt-on-start" id=",s`9HX%vHdm=*3C^VJeO" x="936" y="179"><statement name="HANDLER"><block type="synth_set_volume" id="/V4;@cv)*Y|rw9;H/+8L"><value name="volume"><shadow type="math_number_minmax" id="}G5D-,XTjyATgMt:aQxU"><mutation min="0" max="255" label="Volume" precision="0"/><field name="SLIDER">135</field></shadow></value><next><block type="variables_set" id="GU2d?sFYY8JKTmQAgI=r"><field name="VAR" id="X}Yn#*BP|+ukGUG)vJ%}">numProgram</field><value name="VALUE"><shadow type="math_number" id="OQ|`rHabBCg)::l!8ArI"><field name="NUM">0</field></shadow></value><next><block type="ir_init" id="((*MWjswI5dbo?Yp=PL6"><field name="pin">Pins.P1</field></block></next></block></next></block></statement></block><block type="ir_received_left_event" id="kka^*ul[IUhG|BeR)VW5" x="472" y="332"><field name="btn">RemoteButton.A</field><statement name="HANDLER"><block type="device_show_leds" id="jmj{(]XY!P|oLWr[w}[}"><field name="LEDS">` . . # . . . # # # . # . # . # . . # . . . . # . . `</field><next><block type="magicbit_motor_dual" id="43BSvKOFF(R93B$;L67C"><field name="motor1">magicbit.Motors.M1</field><field name="motor2">magicbit.Motors.M4</field><value name="speed1"><shadow type="math_number_minmax" id="G}XhEtr];HH]1#ne=!n@"><mutation min="-255" max="255" label="Speed1" precision="0"/><field name="SLIDER">150</field></shadow></value><value name="speed2"><shadow type="math_number_minmax" id="FZS;z5$%~GFz9|-BxTEj"><mutation min="-255" max="255" label="Speed2" precision="0"/><field name="SLIDER">150</field></shadow></value></block></next></block></statement></block><block type="device_forever" id="Te{yIBPl^gVaOe,zQ*W8" x="1491" y="528"><statement name="HANDLER"><block type="controls_if" id="eIa.*9Gc?lAzbe`/x.fg"><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="V:e!uq.49%Bt0K!B3@:|"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="vhwc2rI@*Pe[:Bil6u+p"><field name="VAR" id="X}Yn#*BP|+ukGUG)vJ%}">numProgram</field></block></value><value name="B"><shadow type="math_number" id="(ClJPGr5@A?*i23y.[JB"><field name="NUM">0</field></shadow></value></block></value><statement name="DO0"><block type="device_set_digital_pin" id="38w;:|q+Oa1C*qG%(%x0"><field name="name">DigitalPin.P12</field><value name="value"><shadow type="math_number_minmax" id="?KV(jZpoV0tEZh:~C$`3"><mutation min="0" max="1" label="Value" precision="0"/><field name="SLIDER">1</field></shadow></value><next><block type="device_pause" id="FGJkIIz~W:Y@9U}Q%cvL"><value name="pause"><shadow type="timePicker" id="n;xpD;|)i@XKC{n~Pkr5"><field name="ms">100</field></shadow></value><next><block type="device_set_digital_pin" id="+V3{5w`:elu`ea4{Plj?"><field name="name">DigitalPin.P12</field><value name="value"><shadow type="math_number_minmax" id=",HjQv7{rIA#Px0yws*Qa"><mutation min="0" max="1" label="Value" precision="0"/><field name="SLIDER">0</field></shadow></value><next><block type="variables_set" id="s4G6b/Tg!*VxNoJ$dqAY"><field name="VAR" id=":/*$?V7nCQiQvgM.,m8K">ultraDistance</field><value name="VALUE"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="math_arithmetic" id="bXm2s:5%xBYZ^%R|q%8+"><field name="OP">DIVIDE</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="pins_pulse_in" id="os+5LmEY$vuZ_F9L`^N!"><field name="name">DigitalPin.P2</field><field name="value">PulseValue.High</field></block></value><value name="B"><shadow type="math_number" id="ELAx}qO4fDAOfZ(}f[C;"><field name="NUM">58</field></shadow></value></block></value><next><block type="controls_if" id="Us9Nk9lm1XAzPZT;@OD["><mutation elseif="1" else="1"/><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="GWX`@]6m+KTOY{{ScChT"><field name="OP">GT</field><value name="A"><shadow type="math_number"><field name="NUM">20</field></shadow><block type="variables_get" id=",#n1w+Hc+^4?ms`}gYUY"><field name="VAR" id=":/*$?V7nCQiQvgM.,m8K">ultraDistance</field></block></value><value name="B"><shadow type="math_number" id="IbN{3`bu$BA|QE_iQ~}u"><field name="NUM">20</field></shadow></value></block></value><statement name="DO0"><block type="controls_if" id="gUR?ZD)ytz-Xnav]Y]Li"><mutation else="1"/><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="WUKO+WUo{7+Qjz_USEp$"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="device_random" id="|%3U#~.V5Qwy^sq=2,c6"><value name="min"><shadow type="math_number" id="m};f_^:6qJyl1uYXKi!F"><field name="NUM">0</field></shadow></value><value name="limit"><shadow type="math_number" id="J~Z/8b]jC~}B9aiiT(XI"><field name="NUM">1</field></shadow></value></block></value><value name="B"><shadow type="math_number" id=")W!cNIXlS-f3$G_`Pu9F"><field name="NUM">0</field></shadow></value></block></value><statement name="DO0"><block type="magicbit_motor_dual" id="tmni;HvuvKDte,d1*3Nl"><field name="motor1">magicbit.Motors.M1</field><field name="motor2">magicbit.Motors.M4</field><value name="speed1"><shadow type="math_number_minmax" id="wr7j$%k=K=dCrEmb2L/Y"><mutation min="-255" max="255" label="Speed1" precision="0"/><field name="SLIDER">120</field></shadow></value><value name="speed2"><shadow type="math_number_minmax" id="Nb2-iu69Zn^C?0JG!Y9,"><mutation min="-255" max="255" label="Speed2" precision="0"/><field name="SLIDER">-120</field></shadow></value><next><block type="magicbit_servo" id="c-XH0ecg5E%VNMR@!0v/"><field name="index">magicbit.Servos.S1</field><value name="degree"><shadow type="math_number_minmax" id="?DTxEx;T`/_%9/qz+WDQ"><mutation min="0" max="180" label="Degree" precision="0"/><field name="SLIDER">0</field></shadow></value></block></next></block></statement><statement name="ELSE"><block type="magicbit_servo" id="7P/VfjbL-os:.nK3~Q_8"><field name="index">magicbit.Servos.S1</field><value name="degree"><shadow type="math_number_minmax" id=",zdPD}Q5P}ewf*t{_99L"><mutation min="0" max="180" label="Degree" precision="0"/><field name="SLIDER">180</field></shadow></value><next><block type="magicbit_motor_dual" id="54};K9^#lI+JqqRAm,[y"><field name="motor1">magicbit.Motors.M1</field><field name="motor2">magicbit.Motors.M4</field><value name="speed1"><shadow type="math_number_minmax" id="gYLR_yoGfu40rA)@IZEk"><mutation min="-255" max="255" label="Speed1" precision="0"/><field name="SLIDER">-120</field></shadow></value><value name="speed2"><shadow type="math_number_minmax" id="LE(eMD7LPsbb.|yU^yr?"><mutation min="-255" max="255" label="Speed2" precision="0"/><field name="SLIDER">120</field></shadow></value></block></next></block></statement></block></statement><value name="IF1"><block type="logic_compare" id="`j(U3T3H))whSt4m|v}5"><field name="OP">LT</field><value name="A"><shadow type="math_number"><field name="NUM">20</field></shadow><block type="variables_get" id="`S=#x?[Bx|l@!pMZG1oQ"><field name="VAR" id=":/*$?V7nCQiQvgM.,m8K">ultraDistance</field></block></value><value name="B"><shadow type="math_number" id="HFo)E.Ou(%z{*(*F1tZj"><field name="NUM">5</field></shadow></value></block></value><statement name="DO1"><block type="magicbit_motor_dual" id="ceHOPX@11vfmxP]KEU(Z"><field name="motor1">magicbit.Motors.M1</field><field name="motor2">magicbit.Motors.M4</field><value name="speed1"><shadow type="math_number_minmax" id="J[!URqTY=m`IVN,(umxS"><mutation min="-255" max="255" label="Speed1" precision="0"/><field name="SLIDER">-150</field></shadow></value><value name="speed2"><shadow type="math_number_minmax" id="{biA]wp!@^HFu(p2VbT)"><mutation min="-255" max="255" label="Speed2" precision="0"/><field name="SLIDER">-130</field></shadow></value><next><block type="device_pause" id="/G*l[9{kQB.Dz2kUS_{p"><value name="pause"><shadow type="timePicker" id="I)(vRG#%]j*,HwAPD1}e"><field name="ms">100</field></shadow></value><next><block type="magicbit_motor_dual" id="SKCRt}7zsH90Bj*6b_Yh"><field name="motor1">magicbit.Motors.M1</field><field name="motor2">magicbit.Motors.M4</field><value name="speed1"><shadow type="math_number_minmax" id="=zICZ9_d76UM06BQ-?fE"><mutation min="-255" max="255" label="Speed1" precision="0"/><field name="SLIDER">-120</field></shadow></value><value name="speed2"><shadow type="math_number_minmax" id="c??a9E./:KZq-uN9MkD8"><mutation min="-255" max="255" label="Speed2" precision="0"/><field name="SLIDER">120</field></shadow></value><next><block type="device_pause" id="SXx{[ENH*.*fLfH{ilWm"><value name="pause"><shadow type="timePicker"><field name="ms">100</field></shadow><block type="device_random" id="1Kr_d5:?d,jb{Mv+b$IC"><value name="min"><shadow type="math_number" id="0v4Y^n%~Rx2C7Vt#)L0N"><field name="NUM">200</field></shadow></value><value name="limit"><shadow type="math_number" id="%)iy0aB_BQ0Q[r:985`;"><field name="NUM">1000</field></shadow></value></block></value></block></next></block></next></block></next></block></statement><statement name="ELSE"><block type="magicbit_servo" id="Uxf++2o%gT-Mp)#--XH!"><field name="index">magicbit.Servos.S1</field><value name="degree"><shadow type="math_number_minmax" id="De`dTYC^},KWfe|C-tDy"><mutation min="0" max="180" label="Degree" precision="0"/><field name="SLIDER">90</field></shadow></value><next><block type="magicbit_motor_dual" id="Lu0GUNob:mnNW{hMaapM"><field name="motor1">magicbit.Motors.M1</field><field name="motor2">magicbit.Motors.M4</field><value name="speed1"><shadow type="math_number_minmax" id="e)TLO$3x|apo4uT:${hs"><mutation min="-255" max="255" label="Speed1" precision="0"/><field name="SLIDER">150</field></shadow></value><value name="speed2"><shadow type="math_number_minmax" id="%pjjd#`hfCSgZN#d:KN["><mutation min="-255" max="255" label="Speed2" precision="0"/><field name="SLIDER">150</field></shadow></value></block></next></block></statement></block></next></block></next></block></next></block></next></block></statement></block></statement></block><block type="ir_received_left_event" id="jBpFlLn@9BUVDYFPhxlc" x="0" y="755"><field name="btn">RemoteButton.C</field><statement name="HANDLER"><block type="device_show_leds" id="Qe/IxWEN5KPlca7IU`ZR"><field name="LEDS">` . . # . . . . . # . # # # # # . . . # . . . # . . `</field><next><block type="magicbit_motor_dual" id="^nB={RQt$f6lg!So,d?z"><field name="motor1">magicbit.Motors.M1</field><field name="motor2">magicbit.Motors.M4</field><value name="speed1"><shadow type="math_number_minmax" id="N_B]O{C0hbZt,RO{g2zm"><mutation min="-255" max="255" label="Speed1" precision="0"/><field name="SLIDER">-150</field></shadow></value><value name="speed2"><shadow type="math_number_minmax" id="vKZ!1A_hNIr~GbI-waLO"><mutation min="-255" max="255" label="Speed2" precision="0"/><field name="SLIDER">150</field></shadow></value></block></next></block></statement></block><block type="ir_received_left_event" id="lN{1a2OE@{e4?frAN+P`" x="474" y="752"><field name="btn">RemoteButton.UP</field><statement name="HANDLER"><block type="device_show_leds" id="}yaz9MvyvCtC:W)pWL9@"><field name="LEDS">` . . . . . . . . . . # # # # # . . . . . . . . . . `</field><next><block type="magicbit_motor_dual" id="qu?QJEOBj{XVb`@g]V9H"><field name="motor1">magicbit.Motors.M1</field><field name="motor2">magicbit.Motors.M4</field><value name="speed1"><shadow type="math_number_minmax" id="7h#~!Z+/AWi/+cq+s/)k"><mutation min="-255" max="255" label="Speed1" precision="0"/><field name="SLIDER">0</field></shadow></value><value name="speed2"><shadow type="math_number_minmax" id="b=0x`M9QtH,q/oc^(H.5"><mutation min="-255" max="255" label="Speed2" precision="0"/><field name="SLIDER">0</field></shadow></value></block></next></block></statement></block><block type="ir_received_left_event" id="7DZxujnROEwP#..Jk;k2" x="925" y="752"><field name="btn">RemoteButton.D</field><statement name="HANDLER"><block type="device_show_leds" id="0*qw{j(xoSx6auE55;Z7"><field name="LEDS">` . . # . . . # . . . # # # # # . # . . . . . # . . `</field><next><block type="magicbit_motor_dual" id="Gmi/)PrgzJngX-F*$L@B"><field name="motor1">magicbit.Motors.M1</field><field name="motor2">magicbit.Motors.M4</field><value name="speed1"><shadow type="math_number_minmax" id="[n/,*i)GmvUxw=sdF/5X"><mutation min="-255" max="255" label="Speed1" precision="0"/><field name="SLIDER">150</field></shadow></value><value name="speed2"><shadow type="math_number_minmax" id="flZ9:ZboYNYvifor=}Gk"><mutation min="-255" max="255" label="Speed2" precision="0"/><field name="SLIDER">-150</field></shadow></value></block></next></block></statement></block><block type="ir_received_left_event" id="d_K*,*1%VH@3F?8`j5Hi" x="481" y="1182"><field name="btn">RemoteButton.B</field><statement name="HANDLER"><block type="device_show_leds" id="`u];b_W~[)l{8]aL01!g"><field name="LEDS">` . . # . . . . # . . # . # . # . # # # . . . # . . `</field><next><block type="magicbit_motor_dual" id="s/mIsQMJ^zgUTFY43XTp"><field name="motor1">magicbit.Motors.M1</field><field name="motor2">magicbit.Motors.M4</field><value name="speed1"><shadow type="math_number_minmax" id="n5wQl0pBa0uk@CHl+!~;"><mutation min="-255" max="255" label="Speed1" precision="0"/><field name="SLIDER">-150</field></shadow></value><value name="speed2"><shadow type="math_number_minmax" id="$G_839s(FfX64~1uz#O1"><mutation min="-255" max="255" label="Speed2" precision="0"/><field name="SLIDER">-150</field></shadow></value></block></next></block></statement></block></xml>