-
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) · 18.4 KB
/
main.blocks
File metadata and controls
1 lines (1 loc) · 18.4 KB
1
<xml xmlns="https://developers.google.com/blockly/xml"><variables><variable id="qF.7CJ(/xv=2V5VnAR}i">strip</variable><variable id="YNOOBcNUOtc!D7ID/Kwb">Red_fader</variable><variable id="Pb76F;67NOxP/:wQEjWF">Green_fader</variable><variable id="(I+=2xL7#j1OEjO0*:^5">Blue_fader</variable><variable id="#?w`C`D^QeLF-80utWD9">mode_fader</variable><variable id="f(bP3*clHC$RuDzn!hbi">count_fader</variable><variable id="t*cw%#|PXHVn1-W]ulsA">index</variable><variable id="X%Gsois/JK{NeCATr`k:">num_pixels</variable><variable id="WwaY?8;yn}i?b=U-4O.8">bright_fader</variable><variable id="kYPa.li2ENb5_G8^L2l;">new_red_fader</variable><variable id="RKEZ:X;+qzgkO|AVBKFk">new_green_fader</variable><variable id="d%b7o:=NWY_,1|4*m5/V">new_blue_fader</variable></variables><block type="pxt-on-start" id="rQCA/o*8bByFJ58Q~t%P" x="0" y="0"><statement name="HANDLER"><block type="variables_set" id="bgIPlsQmU*%gz9rd$vV1"><field name="VAR" id="X%Gsois/JK{NeCATr`k:">num_pixels</field><value name="VALUE"><shadow type="math_number" id="BYjD/[A_*)sTY#t@a?0%"><field name="NUM">16</field></shadow></value><next><block type="variables_set" id="i;h[e^@A[I-v$3105Hk."><field name="VAR" id="qF.7CJ(/xv=2V5VnAR}i">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_strip" id="F4pK^8pi{$BO{/rW!~SC"><field name="pin">pins.D9</field><value name="numleds"><shadow type="math_number"><field name="NUM">16</field></shadow><block type="variables_get" id="$==5F+u)-i}HA`*76;?+"><field name="VAR" id="X%Gsois/JK{NeCATr`k:">num_pixels</field></block></value></block></value><next><block type="light_set_mode" id="I_sW7O?HPzhE}Zzf4=:Y"><field name="mode">NeoPixelMode.RGBW</field><value name="strip"><block type="variables_get" id="$N*O:xx0nf)|;SRBz$1B"><field name="VAR" id="qF.7CJ(/xv=2V5VnAR}i">strip</field></block></value><next><block type="builtin_neopixel_set_brightness" id="@v3n~{H~BS#-0f~2|n@j"><value name="brightness"><shadow type="math_number_minmax" id=";d/*.B*{Z;zBq3a^C5?6"><mutation min="0" max="255" label="Brightness" precision="0"></mutation><field name="SLIDER">20</field></shadow></value><next><block type="function_call" id="Ki{GJ12t$=M0|=06ghc@"><mutation name="startup" functionid="u+GJw})iNuMkM,%4s/WE"></mutation></block></next></block></next></block></next></block></next></block></statement></block><block type="function_definition" id="Z1M7d43d!E1UfuTt?zf*" x="847" y="0"><mutation name="startup" functionid="u+GJw})iNuMkM,%4s/WE"></mutation><field name="function_name">startup</field><statement name="STACK"><block type="light_set_strip_color" id="tr~n.i/lci6~QM:*@kG}"><value name="strip"><block type="variables_get" id="UV-722S;+,=[u4Mm[5(A"><field name="VAR" id="qF.7CJ(/xv=2V5VnAR}i">strip</field></block></value><value name="rgb"><shadow type="colorNumberPicker" id="{GIh;vL~C{`q:`]^CV_F"><field name="value">0x000000</field></shadow></value><next><block type="pxt_controls_for" id=":jpcv(9lF.uo(6QEhK*+"><value name="VAR"><shadow type="variables_get_reporter" id="a?%V[V$.`hhA4qv=U[y3"><field name="VAR" id="t*cw%#|PXHVn1-W]ulsA">index</field></shadow></value><value name="TO"><shadow type="math_whole_number"><field name="NUM">4</field></shadow><block type="math_arithmetic" id="}]-c:L0HTGUTl2}9/X/p"><field name="OP">MINUS</field><value name="A"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="FyStXwdSW~|/]z7K|1wZ"><field name="VAR" id="X%Gsois/JK{NeCATr`k:">num_pixels</field></block></value><value name="B"><shadow type="math_number" id="JRr,dO!^3DkT{B|tc}}{"><field name="NUM">1</field></shadow></value></block></value><statement name="DO"><block type="light_set_pixel_color" id="U#6d#U42bd=8o?:rL3(K"><value name="strip"><block type="variables_get" id="*8O}G,,EPmp1}_44i*(_"><field name="VAR" id="qF.7CJ(/xv=2V5VnAR}i">strip</field></block></value><value name="pixeloffset"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="8KRMotTw+7^P,FdxqxKt"><field name="VAR" id="t*cw%#|PXHVn1-W]ulsA">index</field></block></value><value name="rgb"><shadow type="colorNumberPicker" id="A8x~0Pme2?PX##zRieAC"><field name="value">0x00ffff</field></shadow></value><next><block type="device_pause" id="abjm0hC(`mgdgS.8C}uF"><value name="pause"><shadow type="timePicker" id="QT@~|-tTT+!=~l@^qO~/"><field name="ms">20</field></shadow></value></block></next></block></statement></block></next></block></statement></block><block type="function_definition" id="V{nexQaAQvGKC-o_}UG@" x="1513" y="0"><mutation name="read_faders" functionid="j=epejgK4f6e,K4pXt%`"></mutation><field name="function_name">read_faders</field><statement name="STACK"><block type="variables_set" id="XVVe1#rNg-Eo|HxjZ[oo"><field name="VAR" id="YNOOBcNUOtc!D7ID/Kwb">Red_fader</field><value name="VALUE"><shadow type="math_number" disabled="true"><field name="NUM">0</field></shadow><block type="math_map" id="9#9g+#xe98e0u`*E-]Zv"><value name="value"><shadow type="math_number" disabled="true"><field name="NUM">0</field></shadow><block type="device_get_analog_pin" id="dl6%+eQT1ryug)v}JYO;"><field name="name">pins.A0</field></block></value><value name="fromLow"><shadow type="math_number" id=".bG|LWDi#@ZI~iH#^`rc"><field name="NUM">0</field></shadow></value><value name="fromHigh"><shadow type="math_number" id="~PlDUwwA:L=%0|Wrm.09"><field name="NUM">1023</field></shadow></value><value name="toLow"><shadow type="math_number" id="RxwlP|=n]r7!C=TZiRt/"><field name="NUM">0</field></shadow></value><value name="toHigh"><shadow type="math_number" id="FhsUY^V{@ixx?zH^t7$k"><field name="NUM">255</field></shadow></value></block></value><next><block type="variables_set" id="8~;q_^HP95NYVma)7DAD"><field name="VAR" id="Pb76F;67NOxP/:wQEjWF">Green_fader</field><value name="VALUE"><shadow type="math_number" disabled="true"><field name="NUM">0</field></shadow><block type="math_map" id="!H(oHZxm/N[KHdg1*]$2"><value name="value"><shadow type="math_number" disabled="true"><field name="NUM">0</field></shadow><block type="device_get_analog_pin" id="*0P624!N)OskV=9QhJuw"><field name="name">pins.A1</field></block></value><value name="fromLow"><shadow type="math_number" id="sdpdQD,7RIVyhFuJ#5B^"><field name="NUM">0</field></shadow></value><value name="fromHigh"><shadow type="math_number" id="a!?N4P11t@,Hy4.+w1SH"><field name="NUM">1023</field></shadow></value><value name="toLow"><shadow type="math_number" id="|ixYx=[k.R8VpH=-/Z@r"><field name="NUM">0</field></shadow></value><value name="toHigh"><shadow type="math_number" id="}vk01J]m@fx|yfC(Wj|K"><field name="NUM">255</field></shadow></value></block></value><next><block type="variables_set" id="anxY+H1hFvU:eU],u,l~"><field name="VAR" id="(I+=2xL7#j1OEjO0*:^5">Blue_fader</field><value name="VALUE"><shadow type="math_number" disabled="true"><field name="NUM">0</field></shadow><block type="math_map" id="NsughqeCkX5o)#k(t+VQ"><value name="value"><shadow type="math_number" disabled="true"><field name="NUM">0</field></shadow><block type="device_get_analog_pin" id="7:g05nDy[I8zMlJIV7z-"><field name="name">pins.A2</field></block></value><value name="fromLow"><shadow type="math_number" id="a4Zx@GE.%}s[O8VAC96Y"><field name="NUM">0</field></shadow></value><value name="fromHigh"><shadow type="math_number" id="a1M;O$~-VS{D;mvP98FC"><field name="NUM">1023</field></shadow></value><value name="toLow"><shadow type="math_number" id="TNd[s19?Jp|OI[_]fG*T"><field name="NUM">0</field></shadow></value><value name="toHigh"><shadow type="math_number" id="QLfo-G4pBjH]ms+HW!UE"><field name="NUM">255</field></shadow></value></block></value><next><block type="variables_set" id="vbyKJLh5nG%0J1|#E6PE"><field name="VAR" id="#?w`C`D^QeLF-80utWD9">mode_fader</field><value name="VALUE"><shadow type="math_number" disabled="true"><field name="NUM">0</field></shadow><block type="math_map" id=";/*uv_Wl)Xdk~djXd1ve"><value name="value"><shadow type="math_number" disabled="true"><field name="NUM">0</field></shadow><block type="device_get_analog_pin" id="nASgD$*jKhUD9W25ILst"><field name="name">pins.A3</field></block></value><value name="fromLow"><shadow type="math_number" id="Ey4mJ[kRqU!J05O2~D,,"><field name="NUM">0</field></shadow></value><value name="fromHigh"><shadow type="math_number" id="uk-ZVL6Y4%c4_J-8;#!x"><field name="NUM">1023</field></shadow></value><value name="toLow"><shadow type="math_number" id=".4P60R:1ZYe|+;x{QsN^"><field name="NUM">0</field></shadow></value><value name="toHigh"><shadow type="math_number" id="7$2|UOwdt9h?Ix8f5YG5"><field name="NUM">3</field></shadow></value></block></value><next><block type="variables_set" id="O~0Iko?(hxm;Dmf1X#%v"><field name="VAR" id="f(bP3*clHC$RuDzn!hbi">count_fader</field><value name="VALUE"><shadow type="math_number" disabled="true"><field name="NUM">0</field></shadow><block type="math_map" id="8pP89IH9?S=dNNg2tf)6"><value name="value"><shadow type="math_number" disabled="true"><field name="NUM">0</field></shadow><block type="device_get_analog_pin" id="vi6D8.=v#^fVCc!822}E"><field name="name">pins.A4</field></block></value><value name="fromLow"><shadow type="math_number" id="uI(ue%ZD.!^yscg6wMu!"><field name="NUM">0</field></shadow></value><value name="fromHigh"><shadow type="math_number" id="(uZgX#Y@m*Rd5+ZWtfun"><field name="NUM">1023</field></shadow></value><value name="toLow"><shadow type="math_number" id="I/so`kzx)Jc9V4b?0WnF"><field name="NUM">0</field></shadow></value><value name="toHigh"><shadow type="math_number"><field name="NUM">15</field></shadow><block type="math_arithmetic" id="5AlBGD*tMung/Vy~7].I"><field name="OP">MINUS</field><value name="A"><shadow type="math_number" disabled="true"><field name="NUM">0</field></shadow><block type="variables_get" id="1gMHAD-]}wgP^50EA8Cq"><field name="VAR" id="X%Gsois/JK{NeCATr`k:">num_pixels</field></block></value><value name="B"><shadow type="math_number" id="u+L@;K0cJQ=+/~a)u#o2"><field name="NUM">1</field></shadow></value></block></value></block></value><next><block type="variables_set" id="A*6jn#3:R:GPaZBV]Ix]"><field name="VAR" id="WwaY?8;yn}i?b=U-4O.8">bright_fader</field><value name="VALUE"><shadow type="math_number" disabled="true"><field name="NUM">0</field></shadow><block type="math_map" id="e%xEvwmqchUk6MW3P+go"><value name="value"><shadow type="math_number" disabled="true"><field name="NUM">0</field></shadow><block type="device_get_analog_pin" id="WM%twcMw.12M~n+7nnpN"><field name="name">pins.A4</field></block></value><value name="fromLow"><shadow type="math_number" id="#p4~,(G0kVcD{mo|HB:0"><field name="NUM">0</field></shadow></value><value name="fromHigh"><shadow type="math_number" id="1S#*;wf+lJm7sU`3E-j~"><field name="NUM">1023</field></shadow></value><value name="toLow"><shadow type="math_number" id="RwtR4YBG1__;vRaHR(Y{"><field name="NUM">0</field></shadow></value><value name="toHigh"><shadow type="math_number" id="bfE#JXM[KkzTSl|FjU8)"><field name="NUM">255</field></shadow></value></block></value></block></next></block></next></block></next></block></next></block></next></block></statement></block><block type="forever" id="D_~5^tLJ5?*-w2CR/$hR" x="0" y="491"><statement name="HANDLER"><block type="function_call" id="3Wk:H6T6nf#KQiUarH7b"><mutation name="read_faders" functionid="j=epejgK4f6e,K4pXt%`"></mutation><next><block type="controls_if" id="QwMx1IL~^oh1mRckpZ-s"><mutation elseif="3"></mutation><value name="IF0"><shadow type="logic_boolean"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="iEXU`rj=b~TGh/r#7mx4"><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="zn[m#WXe%|Ky|I4wryz*"><field name="VAR" id="#?w`C`D^QeLF-80utWD9">mode_fader</field></block></value><value name="B"><shadow type="math_number" id="%oV|D9Ess+6}bi`PE~{j"><field name="NUM">1</field></shadow></value></block></value><statement name="DO0"><block type="light_set_pixel_color" id="|A%2(}[xQyUj8ITU=:PP"><value name="strip"><block type="variables_get" id="eb6a.}Q7scKUy@M]IP!U"><field name="VAR" id="qF.7CJ(/xv=2V5VnAR}i">strip</field></block></value><value name="pixeloffset"><shadow type="math_number"><field name="NUM">0</field></shadow><block type="variables_get" id="zt!`g4^7THlPSzKd)asE"><field name="VAR" id="f(bP3*clHC$RuDzn!hbi">count_fader</field></block></value><value name="rgb"><shadow type="colorNumberPicker"><field name="value">0xff0000</field></shadow><block type="neopixel_rgb" id="7,Mo?Qbk@/N^-,*ZF;1B"><value name="red"><shadow type="math_number_minmax"><mutation min="0" max="255" label="Red" precision="0"></mutation><field name="SLIDER">255</field></shadow><block type="variables_get" id="bxK8%.T]5]6QDWRPW0~{"><field name="VAR" id="YNOOBcNUOtc!D7ID/Kwb">Red_fader</field></block></value><value name="green"><shadow type="math_number_minmax"><mutation min="0" max="255" label="Green" precision="0"></mutation><field name="SLIDER">0</field></shadow><block type="variables_get" id="c*_m^zGy4^*En:?HHKMb"><field name="VAR" id="Pb76F;67NOxP/:wQEjWF">Green_fader</field></block></value><value name="blue"><shadow type="math_number_minmax"><mutation min="0" max="255" label="Blue" precision="0"></mutation><field name="SLIDER">0</field></shadow><block type="variables_get" id="Wq1,sYvn;di1+M8bGA_]"><field name="VAR" id="(I+=2xL7#j1OEjO0*:^5">Blue_fader</field></block></value></block></value></block></statement><value name="IF1"><block type="logic_operation" id="F8~_]p@(3aCGblZ%:8zX"><field name="OP">AND</field><value name="A"><block type="logic_compare" id="H22kqevfO{GuKPyJbGIq"><field name="OP">GTE</field><value name="A"><shadow type="math_number" disabled="true"><field name="NUM">0</field></shadow><block type="variables_get" id="stUr7-.je,[en,^M|Mt}"><field name="VAR" id="#?w`C`D^QeLF-80utWD9">mode_fader</field></block></value><value name="B"><shadow type="math_number" id="4j}WGTsD?~Oh_mZ3@HKZ"><field name="NUM">1</field></shadow></value></block></value><value name="B"><block type="logic_compare" id="[G,7sQF_*j[AG[Hs{abd"><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="?dzb{8/2Qw/L@|+3!$=j"><field name="VAR" id="#?w`C`D^QeLF-80utWD9">mode_fader</field></block></value><value name="B"><shadow type="math_number" id="1u?$8_LSWf|*s7$Md^c_"><field name="NUM">2</field></shadow></value></block></value></block></value><statement name="DO1"><block type="light_show_animation_frame" id="Tb)Cixt6$Uz!=:#mm]Ad"><value name="strip"><block type="variables_get" id="@Q^gBZ*S17YoD0!UP^F,"><field name="VAR" id="qF.7CJ(/xv=2V5VnAR}i">strip</field></block></value><value name="animation"><shadow type="light_animation_picker" id="2?(dM-hja$@0W#,.iCq#"><field name="animation">light.rainbowAnimation</field></shadow></value><next><block type="light_set_brightness" id="j6qNn,gMOnN1A:jsenq8"><value name="strip"><block type="variables_get" id="XD40s_.y8{zCncN~EbTW"><field name="VAR" id="qF.7CJ(/xv=2V5VnAR}i">strip</field></block></value><value name="brightness"><shadow type="math_number_minmax"><mutation min="0" max="255" label="Brightness" precision="0"></mutation><field name="SLIDER">20</field></shadow><block type="variables_get" id="h,SX]!d_{=C0}-1-V-h~"><field name="VAR" id="WwaY?8;yn}i?b=U-4O.8">bright_fader</field></block></value></block></next></block></statement><value name="IF2"><block type="logic_operation" id="0Fic@MSv$wn$v4POg][#"><field name="OP">AND</field><value name="A"><block type="logic_compare" id="`uI?E;R%Js#xKM3Y,v=+"><field name="OP">GTE</field><value name="A"><shadow type="math_number" disabled="true"><field name="NUM">0</field></shadow><block type="variables_get" id="M%;n7:m*2vN-7j8eU%e,"><field name="VAR" id="#?w`C`D^QeLF-80utWD9">mode_fader</field></block></value><value name="B"><shadow type="math_number" id="U83tE%.Gr{)ZzsNR!^gH"><field name="NUM">2</field></shadow></value></block></value><value name="B"><block type="logic_compare" id="70nP1$3J#J]/%|DIAdZQ"><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="*[Wif5N0pJ5aeuX3h@!]"><field name="VAR" id="#?w`C`D^QeLF-80utWD9">mode_fader</field></block></value><value name="B"><shadow type="math_number" id="e(Ln`xj340N2n#]X39N/"><field name="NUM">3</field></shadow></value></block></value></block></value><statement name="DO2"><block type="light_show_animation_frame" id="TaDkZnMmu|k[qt83!sFL"><value name="strip"><block type="variables_get" id="Tfw]*+]3%._flFW8S)@g"><field name="VAR" id="qF.7CJ(/xv=2V5VnAR}i">strip</field></block></value><value name="animation"><shadow type="light_animation_picker" id="lO+hw#NV)7zD#rXQ2Mn;"><field name="animation">light.theaterChaseAnimation</field></shadow></value><next><block type="light_set_brightness" id="VEAL5#eOyn4~xZTr`s/Y"><value name="strip"><block type="variables_get" id="G6WH_qN)u|!`AZq!cU.d"><field name="VAR" id="qF.7CJ(/xv=2V5VnAR}i">strip</field></block></value><value name="brightness"><shadow type="math_number_minmax"><mutation min="0" max="255" label="Brightness" precision="0"></mutation><field name="SLIDER">20</field></shadow><block type="variables_get" id="0lPCm@*g3l+.s:5iw6*J"><field name="VAR" id="WwaY?8;yn}i?b=U-4O.8">bright_fader</field></block></value></block></next></block></statement><value name="IF3"><block type="logic_compare" id="+xRstqV!91yrx|}XrY-,"><field name="OP">GTE</field><value name="A"><shadow type="math_number" disabled="true"><field name="NUM">0</field></shadow><block type="variables_get" id="(PM[d=P_mAN!`3+J:U/w"><field name="VAR" id="#?w`C`D^QeLF-80utWD9">mode_fader</field></block></value><value name="B"><shadow type="math_number" id="Wd0Qq+_1xI/,dU%ea=RS"><field name="NUM">3</field></shadow></value></block></value><statement name="DO3"><block type="light_show_animation_frame" id="@[#+:@vt7znECuMC;C[r"><value name="strip"><block type="variables_get" id="VGB6(Lk5_~10=8pwZ(qI"><field name="VAR" id="qF.7CJ(/xv=2V5VnAR}i">strip</field></block></value><value name="animation"><shadow type="light_animation_picker" id="=w-/ovb)wj@^*vWL.a,d"><field name="animation">light.colorWipeAnimation</field></shadow></value><next><block type="light_set_brightness" id="Li(JiN|2JRcVp)yQl:o@"><value name="strip"><block type="variables_get" id="$nH|=O[EdgN|LGX?v:3)"><field name="VAR" id="qF.7CJ(/xv=2V5VnAR}i">strip</field></block></value><value name="brightness"><shadow type="math_number_minmax"><mutation min="0" max="255" label="Brightness" precision="0"></mutation><field name="SLIDER">20</field></shadow><block type="variables_get" id="~X4|Jj5(3}4_oxu?y-Aq"><field name="VAR" id="WwaY?8;yn}i?b=U-4O.8">bright_fader</field></block></value></block></next></block></statement></block></next></block></statement></block></xml>