-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.blocks
25 lines (25 loc) · 9.96 KB
/
main.blocks
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<xml xmlns="https://developers.google.com/blockly/xml"><variables><variable id="{}1=UXxxVgd=HVr[S8R6">top_angle</variable><variable id="hXL:KY6q!q;/*5~bJ[W/">bottom_angle</variable><variable id="BiBZ)wZ,?Y]ms3_D.Lt+">fan_time</variable><variable id="lj?X+W_KK{]|@31aj1Cf">fan_power</variable><variable id="a:CKDCA5[oWFrxn+dH1Y">running</variable><variable id="?YLv1-s;Po;v1x#(kcy%">list</variable></variables><block type="pxt-on-start" id="[%vx+w^w+LT`#5()I*Cf" x="0" y="0"><statement name="HANDLER"><block type="variables_set" id="IxUvDS8+3(vdN+gEsQ.:"><field name="VAR" id="{}1=UXxxVgd=HVr[S8R6">top_angle</field><value name="VALUE"><shadow type="math_number" id="`eLgnDq91@M?=_)Dek*H"><field name="NUM">70</field></shadow></value><next><block type="variables_set" id="am]9I0Xnnm(rsU*Pq8(V"><field name="VAR" id="hXL:KY6q!q;/*5~bJ[W/">bottom_angle</field><value name="VALUE"><shadow type="math_number" id="kyF_]}v*bVm*PJh/}Fxu"><field name="NUM">120</field></shadow></value><next><block type="variables_set" id=",tgGQSqJ[b.mi.S3xTjl"><field name="VAR" id="BiBZ)wZ,?Y]ms3_D.Lt+">fan_time</field><value name="VALUE"><shadow type="math_number" id="LFR/`qK$Wr]46`poD=!8"><field name="NUM">1</field></shadow></value><next><block type="variables_set" id="[`;FOUkw;K8KkicxgCtf"><field name="VAR" id="lj?X+W_KK{]|@31aj1Cf">fan_power</field><value name="VALUE"><shadow type="math_number" id="1O$(N}tY38Sw6:9~$RkB"><field name="NUM">150</field></shadow></value></block></next></block></next></block></next></block></statement></block><block type="device_button_event" id="LoLa:5~Hl6sQ`[3ZB]V," x="430" y="50"><field name="NAME">Button.B</field><statement name="HANDLER"><block type="variables_set" id="1kM2K$$F|DilfWVCn/i8"><field name="VAR" id="a:CKDCA5[oWFrxn+dH1Y">running</field><value name="VALUE"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="logic_boolean" id="TpcHjO/QOSUDiF49_}S}"><field name="BOOL">TRUE</field></block></value></block></statement></block><block type="device_forever" id="J~/w$K+4i!`[1n)Fai?k" x="1015" y="71"><statement name="HANDLER"><block type="controls_if" id="K4vvPGmW#LH[jtj|m[D:"><mutation else="1"></mutation><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="variables_get" id="VJs9[:TI|{:E?9!FKT,R"><field name="VAR" id="a:CKDCA5[oWFrxn+dH1Y">running</field></block></value><statement name="DO0"><block type="device_show_leds" id="591EWc]2vzQ$=#zV@]bv"><field name="LEDS">`
. . . . .
. . . . .
. . # . .
. . . . .
. . . . .
`</field><next><block type="device_show_leds" id="Qrp)6gGW+v(z[z882HG^"><field name="LEDS">`
. . . . .
. . # . .
. # . # .
. . # . .
. . . . .
`</field><next><block type="device_show_leds" id="yTr5Z6N|ReX=1IeW)ab]"><field name="LEDS">`
. . # . .
. # . # .
# . . . #
. # . # .
. . # . .
`</field><next><block type="device_show_leds" id="AQ;]oadN06xI|A~1QLcx"><field name="LEDS">`
. # . # .
# . . . #
. . . . .
# . . . #
. # . # .
`</field></block></next></block></next></block></next></block></statement><statement name="ELSE"><block type="device_print_message" id="MQN,tTWe7n7pu9|*syRI"><value name="text"><shadow type="text" id="TQuDK@ApP`Ixp7l{0Qz|"><field name="TEXT">PRESS</field></shadow></value><next><block type="basic_show_arrow" id="a6JBKsHu`Pz!JBqLtuxR"><value name="i"><shadow type="device_arrow" id="rzTD(L[YiY=^UKW*gDF9"><field name="arrow">ArrowNames.East</field></shadow></value></block></next></block></statement></block></statement></block><block type="device_button_event" id="7SOx-+[ffLA}!(LjV9RM" x="429" y="254"><field name="NAME">Button.A</field><statement name="HANDLER"><block type="variables_set" id="fw~^gJSM|bdmlRlX.Ow;"><field name="VAR" id="a:CKDCA5[oWFrxn+dH1Y">running</field><value name="VALUE"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="logic_boolean" id="lfBb#Y#*Cxv[fYj0B481"><field name="BOOL">FALSE</field></block></value></block></statement></block><block type="device_forever" id="0|x-A+iS.Z4ak(3ASAR*" x="-3" y="334"><statement name="HANDLER"><block type="controls_if" id=".LGJJ+5^pS!9^KwcPlS+"><mutation else="1"></mutation><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="variables_get" id="qk5|BwGg3mcIe,dCD9X)"><field name="VAR" id="a:CKDCA5[oWFrxn+dH1Y">running</field></block></value><statement name="DO0"><block type="device_set_digital_pin" id="+V3)4S6}|j)yl+s,%a36"><field name="name">DigitalPin.P1</field><value name="value"><shadow type="math_number_minmax" id="o,C3G$AB!|_#}xX-hmMs"><mutation min="0" max="1" label="Value" precision="0"></mutation><field name="SLIDER">1</field></shadow></value><next><block type="device_pause" id="W@Y!_}10Zi$.QSSE(=PB"><value name="pause"><shadow type="timePicker" id="nsclhh;IeYJ;xsui3v+="><field name="ms">500</field></shadow></value><next><block type="device_set_digital_pin" id="aLhAtJl^+Cn0EGLkqbm+"><field name="name">DigitalPin.P1</field><value name="value"><shadow type="math_number_minmax" id="H8v;;2;|mk+_/puFkf~6"><mutation min="0" max="1" label="Value" precision="0"></mutation><field name="SLIDER">0</field></shadow></value><next><block type="device_pause" id="bhkYm|wD*K!JHiNl?LNP"><value name="pause"><shadow type="timePicker" id="mqy^DIBP6HpWeoADaK/d"><field name="ms">500</field></shadow></value></block></next></block></next></block></next></block></statement><statement name="ELSE"><block type="device_set_digital_pin" id="@U|h06j`IJU{Ru$A0/|q"><field name="name">DigitalPin.P1</field><value name="value"><shadow type="math_number_minmax" id="|lu}kRbVKF5l;!OvHT3)"><mutation min="0" max="1" label="Value" precision="0"></mutation><field name="SLIDER">1</field></shadow></value><next><block type="device_pause" id="wnUfG??y+v-.iXS2r@o0"><value name="pause"><shadow type="timePicker" id="Dx17w./)#HO#nJaEwa9*"><field name="ms">50</field></shadow></value><next><block type="device_set_digital_pin" id="#m#`^ZakHQ-hHNQE1`Q0"><field name="name">DigitalPin.P1</field><value name="value"><shadow type="math_number_minmax" id="VsLDg2ti~#T*?:RkSbgB"><mutation min="0" max="1" label="Value" precision="0"></mutation><field name="SLIDER">0</field></shadow></value><next><block type="device_pause" id="YzYr:cdcqN|+x)l/uVw+"><value name="pause"><shadow type="timePicker" id="E}6!=~@Mq3D!Fn,}x*ou"><field name="ms">1000</field></shadow></value></block></next></block></next></block></next></block></statement></block></statement></block><block type="device_forever" id="|?ZV#S5C8%cJ10B;+ufJ" x="439" y="525"><statement name="HANDLER"><block type="controls_if" id="Ipa*@:wj*,tA/OI/p!Oc"><mutation else="1"></mutation><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="variables_get" id="@kz5/DOKi.z4x4wi0`D_"><field name="VAR" id="a:CKDCA5[oWFrxn+dH1Y">running</field></block></value><statement name="DO0"><block type="device_set_servo_pin" id="tEky0Qlul}Uam;D,PIsp"><field name="name">AnalogPin.P2</field><value name="value"><shadow type="math_number_minmax"><mutation min="0" max="180" label="Value" precision="0"></mutation><field name="SLIDER">180</field></shadow><block type="variables_get" id="btJo|1R7z?A5qQ/`VE5!"><field name="VAR" id="hXL:KY6q!q;/*5~bJ[W/">bottom_angle</field></block></value><next><block type="device_set_analog_pin" id="~Lor~cq)WErBk(vznZ2g"><field name="name">AnalogPin.P0</field><value name="value"><shadow type="math_number_minmax" id="xu_y_3oQ*1JqPr#JVAP."><mutation min="0" max="1023" label="Value" precision="0"></mutation><field name="SLIDER">0</field></shadow></value><next><block type="device_pause" id="oFro+eVOIn3neo@ukbuV"><value name="pause"><shadow type="timePicker" id="Gr6!J,a78:4lY;exYv_y"><field name="ms">1000</field></shadow></value><next><block type="device_set_servo_pin" id="6=Wex9,d3JPy/BBAQ.3@"><field name="name">AnalogPin.P2</field><value name="value"><shadow type="math_number_minmax"><mutation min="0" max="180" label="Value" precision="0"></mutation><field name="SLIDER">180</field></shadow><block type="variables_get" id="i(v9zgzA]mxE!?i!fC9k"><field name="VAR" id="{}1=UXxxVgd=HVr[S8R6">top_angle</field></block></value><next><block type="device_set_analog_pin" id="S=-IvPVF7|_3cdsA%5WF"><field name="name">AnalogPin.P0</field><value name="value"><shadow type="math_number_minmax"><mutation min="0" max="1023" label="Value" precision="0"></mutation><field name="SLIDER">1023</field></shadow><block type="variables_get" id="``ID+cu3u4rNtsX~gp1-"><field name="VAR" id="lj?X+W_KK{]|@31aj1Cf">fan_power</field></block></value><next><block type="device_pause" id="obBS$+F2.9}zTIbDRNtG"><value name="pause"><shadow type="timePicker"><field name="ms">100</field></shadow><block type="math_arithmetic" id="@6Lv|-Mc7p05s=yE4,@c"><field name="OP">MULTIPLY</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="mr9,53w~EtAzP37n?AQ5"><field name="VAR" id="BiBZ)wZ,?Y]ms3_D.Lt+">fan_time</field></block></value><value name="B"><shadow type="math_number" id="M!Ox#(^Qd5/BFgG4s8%`"><field name="NUM">1000</field></shadow></value></block></value></block></next></block></next></block></next></block></next></block></next></block></statement><statement name="ELSE"><block type="device_set_servo_pin" id="b|rEZO`Xft{+NeU(+Khp"><field name="name">AnalogPin.P2</field><value name="value"><shadow type="math_number_minmax"><mutation min="0" max="180" label="Value" precision="0"></mutation><field name="SLIDER">180</field></shadow><block type="variables_get" id="%[=TM6c`G}D0`y]j6;R`"><field name="VAR" id="{}1=UXxxVgd=HVr[S8R6">top_angle</field></block></value><next><block type="device_set_analog_pin" id="5h+o$BdIh:vqfgOc)YG_"><field name="name">AnalogPin.P0</field><value name="value"><shadow type="math_number_minmax" id="?TR8$UFf2E4ghtD#`^/{"><mutation min="0" max="1023" label="Value" precision="0"></mutation><field name="SLIDER">0</field></shadow></value></block></next></block></statement></block></statement></block></xml>