-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.blocks
1 lines (1 loc) · 15.4 KB
/
main.blocks
1
<xml xmlns="https://developers.google.com/blockly/xml"><variables><variable id="r~_Q91Q~g/ylYNY|Q1Fi">SerialData</variable><variable id="DYan+KL9Ud1rl0kRS!AP">strip</variable></variables><block type="pxt-on-start" id="H5DB-dywYe78f`{*co-/" x="0" y="0"><statement name="HANDLER"><block type="variables_set" id="+jw4jQi^B7TSbL7(m+XC"><field name="VAR" id="DYan+KL9Ud1rl0kRS!AP">strip</field><value name="VALUE"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number"><field name="NUM">0</field></shadow><block type="neopixel_create" id="Zny;@=F0SU#~:eNEAe`-"><field name="pin">DigitalPin.P6</field><field name="mode">NeoPixelMode.RGB</field><value name="numleds"><shadow type="math_number" id="caE,[HS|n_Z@%aeVrSqc"><field name="NUM">24</field></shadow></value></block></value><next><block type="serial_redirect" id="H[R#C3w,T41DpQkw#:-i"><field name="tx">SerialPin.USB_TX</field><field name="rx">SerialPin.USB_RX</field><field name="rate">BaudRate.BaudRate9600</field><next><block type="servoservosetangle" id="F7|jF/(Rgw=$B[SLC!Gx"><field name="servo">servos.P0</field><value name="degrees"><shadow type="protractorPicker" id="lsji1!-Q=an~4v/*u44l"><field name="angle">40</field></shadow></value><next><block type="servoservosetangle" id="^Sr=sVyN[yFoYpVy$Djx"><field name="servo">servos.P1</field><value name="degrees"><shadow type="protractorPicker" id="`(2C4/CH_%kMH_Bx7(7d"><field name="angle">40</field></shadow></value><next><block type="servoservosetangle" id="]D{=gNn~etvDvI~S#BY^"><field name="servo">servos.P2</field><value name="degrees"><shadow type="protractorPicker" id="YRLq72]])abXsXQq4_iL"><field name="angle">40</field></shadow></value><next><block type="music_playable_play" id="fo5q9./3[59v]hyxS#YF"><field name="playbackMode">music.PlaybackMode.UntilDone</field><value name="toPlay"><shadow type="music_tone_playable" id="?5gMRUhI*5q7RHPcv-Ik"><value name="note"><shadow type="device_note" id="veoq6SZHb`__f!jqE_)B"><field name="name">587</field></shadow></value><value name="duration"><shadow type="device_beat" id="AC7n0x?[bBIp?7+?wCyo"><field name="fraction">BeatFraction.Whole</field></shadow></value></shadow></value><next><block type="neopixel_set_strip_color" id="Z:Mv+%;I;c0@FK3mz:!B"><value name="strip"><block type="variables_get" id="EXn1);NJe={QFVhgXLGY"><field name="VAR" id="DYan+KL9Ud1rl0kRS!AP">strip</field></block></value><value name="rgb"><shadow type="neopixel_colors" id="Wb;zUU~z@pn=}fw/Mxf+"><field name="color">NeoPixelColors.White</field></shadow></value></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block><block type="serial_on_data_received" id="2Q/Hm8npZRe#LIT!y23=" x="749" y="-13"><comment pinned="false" h="80" w="160">This block listens to the website for your class names, and saves them as a variable</comment><value name="delimiters"><shadow type="serial_delimiter_conv" id="UAX{~W{+(PY@T4A]]Mb^"><field name="del">Delimiters.NewLine</field></shadow></value><statement name="HANDLER"><block type="variables_set" id="iOwvWmgb[ps14P0U?SbC"><field name="VAR" id="r~_Q91Q~g/ylYNY|Q1Fi">SerialData</field><value name="VALUE"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="serial_read_until" id="aDAp-+e!15X+WXUR#Qhc"><value name="delimiter"><shadow type="serial_delimiter_conv" id="?3=W@vUD~v}o~%NJ^Uz~"><field name="del">Delimiters.NewLine</field></shadow></value></block></value><next><block type="controls_if" id="#ShRi:KV#@kptLI@#(+_"><mutation elseif="3"></mutation><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="DX45ZuU~M#w}qfz)Xvj~"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="NN.L*W-(wa22|tM]b5O:"><field name="VAR" id="r~_Q91Q~g/ylYNY|Q1Fi">SerialData</field></block></value><value name="B"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="text" id="UTk5eYQtU}HFb{M-C?M9"><field name="TEXT">biowaste</field></block></value></block></value><statement name="DO0"><block type="neopixel_set_strip_color" id="kD.lj%8yjNU!b{ry8@iE"><value name="strip"><block type="variables_get" id="AvXf[r9~Nk$FR.q|0E7W"><field name="VAR" id="DYan+KL9Ud1rl0kRS!AP">strip</field></block></value><value name="rgb"><shadow type="neopixel_colors" id="?a6U@mgFPH,*_V~.L?h9"><field name="color">NeoPixelColors.Green</field></shadow></value><next><block type="device_set_digital_pin" id="}ZcK4Jn0I;4.PGYG!Ai["><field name="name">DigitalPin.P5</field><value name="value"><shadow type="math_number_minmax" id="o.SVq]7(aoVf3:%DSJO~"><mutation min="0" max="1" label="Value" precision="0"></mutation><field name="SLIDER">1</field></shadow></value><next><block type="servoservosetangle" id="pq_YFz7-/@2bwqI.p7l+"><field name="servo">servos.P0</field><value name="degrees"><shadow type="protractorPicker" id="/m!]MbR!ph*UUDJ$sF2Z"><field name="angle">90</field></shadow></value><next><block type="music_playable_play" id="fC|ZwQR.ra_KqMq,J~oi"><field name="playbackMode">music.PlaybackMode.UntilDone</field><value name="toPlay"><shadow type="music_tone_playable" id="=%VaX,{QdCZRQ8@N@C.!"><value name="note"><shadow type="device_note" id="a,vrZ,sFJ:PV_|[3ToBM"><field name="name">262</field></shadow></value><value name="duration"><shadow type="device_beat" id=",ZbeOs`mA{j`JDBxf`QR"><field name="fraction">BeatFraction.Whole</field></shadow></value></shadow></value><next><block type="device_pause" id="bkX?zS{,IEEy`t?w?jdY"><value name="pause"><shadow type="timePicker" id="}QtF8Mf7G|;X%6|7eEOj"><field name="ms">2000</field></shadow></value><next><block type="servoservosetangle" id="qB~t1EtL;^@XkLy=clFG"><field name="servo">servos.P0</field><value name="degrees"><shadow type="protractorPicker" id="{)_LfZcWK$^,ZVr-a(y/"><field name="angle">40</field></shadow></value><next><block type="device_set_digital_pin" id="W{74V~Jw,`yeMPD~@c%3"><field name="name">DigitalPin.P5</field><value name="value"><shadow type="math_number_minmax" id="?[6]6))cySCU-(R6%(E0"><mutation min="0" max="1" label="Value" precision="0"></mutation><field name="SLIDER">0</field></shadow></value><next><block type="neopixel_clear" id="aCS)xAi+V:H)!VI)P2;W"><value name="strip"><block type="variables_get" id="y.-8FYz9?G2D!,GyEG=Q"><field name="VAR" id="DYan+KL9Ud1rl0kRS!AP">strip</field></block></value></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement><value name="IF1"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="._3Fe2Jg,zc~=O0%WN^."><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="rf1XJ|]%{+)SOiPqc+72"><field name="VAR" id="r~_Q91Q~g/ylYNY|Q1Fi">SerialData</field></block></value><value name="B"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="text" id="BAT~aNlE1pKvj$d?2dc@"><field name="TEXT">recycle</field></block></value></block></value><statement name="DO1"><block type="neopixel_set_strip_color" id="#IJbNxc@Oh3pl2SwsA%7"><value name="strip"><block type="variables_get" id="9@qKx|X+@SK5{)Tzy=tZ"><field name="VAR" id="DYan+KL9Ud1rl0kRS!AP">strip</field></block></value><value name="rgb"><shadow type="neopixel_colors" id="ghW)gZvZjG(XBYaEpH*;"><field name="color">NeoPixelColors.Green</field></shadow></value><next><block type="device_set_digital_pin" id="kXc*c8+IrJq+VXHvs97p"><field name="name">DigitalPin.P5</field><value name="value"><shadow type="math_number_minmax" id="GL36xNudF*F;bpm7xpd*"><mutation min="0" max="1" label="Value" precision="0"></mutation><field name="SLIDER">1</field></shadow></value><next><block type="servoservosetangle" id="rV5.xii`h:^A[s}5mRut"><field name="servo">servos.P1</field><value name="degrees"><shadow type="protractorPicker" id="zRZ~w.1Ek]w{Rep5JOp8"><field name="angle">90</field></shadow></value><next><block type="music_playable_play" id="l_o#VXiLb@1{qL0mkDCm"><field name="playbackMode">music.PlaybackMode.UntilDone</field><value name="toPlay"><shadow type="music_tone_playable" id="lqh%GdpaYz`H/ths}l)P"><value name="note"><shadow type="device_note" id="DviD||YD~GXga`Mt5dO)"><field name="name">262</field></shadow></value><value name="duration"><shadow type="device_beat" id="r-%GlAYya%g4T)sLur{."><field name="fraction">BeatFraction.Whole</field></shadow></value></shadow></value><next><block type="device_pause" id="L.y?AN,Uy{^$^]DGiYD4"><value name="pause"><shadow type="timePicker" id="NELgp)5A:.2c~]aO.M4,"><field name="ms">2000</field></shadow></value><next><block type="servoservosetangle" id=")NdY2QEUC{8/;IhbN=/^"><field name="servo">servos.P1</field><value name="degrees"><shadow type="protractorPicker" id="o=-2tDMSolu2mj5Yi{|f"><field name="angle">40</field></shadow></value><next><block type="device_set_digital_pin" id="lD/1$[#eY5.W[M93Rwx:"><field name="name">DigitalPin.P5</field><value name="value"><shadow type="math_number_minmax" id="jfJ[y$iLGpStC%%N^dGQ"><mutation min="0" max="1" label="Value" precision="0"></mutation><field name="SLIDER">0</field></shadow></value><next><block type="neopixel_clear" id="F#t?MF#$l$Tf]ovc+_Ju"><value name="strip"><block type="variables_get" id="bp`J0)h?ebaL(pcbJm6t"><field name="VAR" id="DYan+KL9Ud1rl0kRS!AP">strip</field></block></value></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement><value name="IF2"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="hT([_y:!EI{o{,uO[klc"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="eu-^cF1PSmGN=!:wcL.r"><field name="VAR" id="r~_Q91Q~g/ylYNY|Q1Fi">SerialData</field></block></value><value name="B"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="text" id="0$.D=Eg.M@91bZ?$8AyU"><field name="TEXT">dangerous</field></block></value></block></value><statement name="DO2"><block type="neopixel_set_strip_color" id="m?aQ+M[=Y@a1]mmqwj#?"><value name="strip"><block type="variables_get" id="I;m?Tcvhf=%n0g(!fZ5D"><field name="VAR" id="DYan+KL9Ud1rl0kRS!AP">strip</field></block></value><value name="rgb"><shadow type="neopixel_colors" id=":Yq{yMHKU2Q]:m.OAgj_"><field name="color">NeoPixelColors.Green</field></shadow></value><next><block type="device_set_digital_pin" id="fX$(oSYO}P6mWbJ8Z0+n"><field name="name">DigitalPin.P5</field><value name="value"><shadow type="math_number_minmax" id="CX(+t#0.cKF.%!@DBDQG"><mutation min="0" max="1" label="Value" precision="0"></mutation><field name="SLIDER">1</field></shadow></value><next><block type="servoservosetangle" id="q]]y}HLjl3Iw0TRkS,!_"><field name="servo">servos.P2</field><value name="degrees"><shadow type="protractorPicker" id="ci8}wK[kMj=~/@ALpMU;"><field name="angle">90</field></shadow></value><next><block type="music_playable_play" id="w2R8N|@C$-%1A.r}Y9,^"><field name="playbackMode">music.PlaybackMode.UntilDone</field><value name="toPlay"><shadow type="music_tone_playable" id="ViUe#hGZLmJ,ym{bCKAn"><value name="note"><shadow type="device_note" id="06UH?f26o+9liUXHZow*"><field name="name">262</field></shadow></value><value name="duration"><shadow type="device_beat" id="R8-:Gf!Si-Qne?g6~p$S"><field name="fraction">BeatFraction.Whole</field></shadow></value></shadow></value><next><block type="device_pause" id="[H92LA/A7cP[skZ|pTdO"><value name="pause"><shadow type="timePicker" id="AMG-s)xQcqeLH#Z7zlb?"><field name="ms">2000</field></shadow></value><next><block type="servoservosetangle" id="@oCe,[z@1!}?^wzK;56n"><field name="servo">servos.P2</field><value name="degrees"><shadow type="protractorPicker" id="s!{8#xJ2BXm1Q4@V:4p`"><field name="angle">40</field></shadow></value><next><block type="device_set_digital_pin" id="06LM(O`i@B,MR1oq09F:"><field name="name">DigitalPin.P5</field><value name="value"><shadow type="math_number_minmax" id="CV^#KDxkFPO5d?H9OMXr"><mutation min="0" max="1" label="Value" precision="0"></mutation><field name="SLIDER">0</field></shadow></value><next><block type="neopixel_clear" id="Sc=T%8NU)V=0qFK,~[Bt"><value name="strip"><block type="variables_get" id="})v-(?S7`]H-Fe2a:vC+"><field name="VAR" id="DYan+KL9Ud1rl0kRS!AP">strip</field></block></value></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement><value name="IF3"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="JWhrdI7xn7zK=kMPZ8FC"><field name="OP">EQ</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="JI(p/b=-!]Y80jP3(IXP"><field name="VAR" id="r~_Q91Q~g/ylYNY|Q1Fi">SerialData</field></block></value><value name="B"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="text" id="uU1}a{l;w`EE7E]fxNvw"><field name="TEXT">normalwaste</field></block></value></block></value><statement name="DO3"><block type="neopixel_set_strip_color" id="@KiPGpIs9Yo}/B*d%4eh"><value name="strip"><block type="variables_get" id="CHVBVmt*_vJkHPBr?!IJ"><field name="VAR" id="DYan+KL9Ud1rl0kRS!AP">strip</field></block></value><value name="rgb"><shadow type="neopixel_colors" id="NZO0I_*VUVW]ePU0imY_"><field name="color">NeoPixelColors.Green</field></shadow></value><next><block type="device_set_digital_pin" id=":b-Khet.}bu4i)O0*Qgd"><field name="name">DigitalPin.P5</field><value name="value"><shadow type="math_number_minmax" id="hYI6xX~:RS6l^=p71N%y"><mutation min="0" max="1" label="Value" precision="0"></mutation><field name="SLIDER">1</field></shadow></value><next><block type="device_set_digital_pin" id="JuD]4r7ogJGnLHLU);aQ"><field name="name">DigitalPin.P3</field><value name="value"><shadow type="math_number_minmax" id="IVrL,Ah^A{aW3?Ye`bUY"><mutation min="0" max="1" label="Number" precision="0"></mutation><field name="SLIDER">1</field></shadow></value><next><block type="music_playable_play" id="Bwx;Kr:KG?tr[#=));N="><field name="playbackMode">music.PlaybackMode.UntilDone</field><value name="toPlay"><shadow type="music_tone_playable" id="LV/Eq?d_{*$Qd|737|3R"><value name="note"><shadow type="device_note" id=",~ngk#JOM}4,/y?c:.up"><field name="name">262</field></shadow></value><value name="duration"><shadow type="device_beat" id="]suw8AyfK`!eOaPSpb$n"><field name="fraction">BeatFraction.Whole</field></shadow></value></shadow></value><next><block type="device_pause" id="ndSG6dd*S}kjInw}CL;B"><value name="pause"><shadow type="timePicker" id="8lM,#oF(nu|9BwQn{cO4"><field name="ms">2000</field></shadow></value><next><block type="device_set_digital_pin" id="Q}nX4e$OEE=2-HnxkCN)"><field name="name">DigitalPin.P3</field><value name="value"><shadow type="math_number_minmax" id="(?@WUgHK}Btz]Z]TGkTu"><mutation min="0" max="1" label="Number" precision="0"></mutation><field name="SLIDER">0</field></shadow></value><next><block type="device_set_digital_pin" id="214:o1;X2og]7O|?Fb:z"><field name="name">DigitalPin.P5</field><value name="value"><shadow type="math_number_minmax" id="jQS)t3.n|7RH^gAfH=)r"><mutation min="0" max="1" label="Value" precision="0"></mutation><field name="SLIDER">0</field></shadow></value><next><block type="neopixel_clear" id="b~cE+QIY2Ic^$`Q6cf%k"><value name="strip"><block type="variables_get" id="p*5G6hV#HyC~Vxls69W6"><field name="VAR" id="DYan+KL9Ud1rl0kRS!AP">strip</field></block></value></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block></next></block></statement></block></xml>