-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.blocks
38 lines (32 loc) · 49.5 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
26
27
28
29
30
31
32
33
34
35
36
37
38
<xml xmlns="https://developers.google.com/blockly/xml"><variables><variable id="}B;IeGEW^dW;R._t_eCA">testNumber</variable><variable id="u_}Ht~W1?yw9Br5yZSSY">justSwitched</variable><variable id="jN.:q2/{u^MeJX9MB)P2">calibrated</variable><variable id="SBoo3!znh0OM0Z/7XhJ2">degrees</variable><variable id="rnW2l@%}|?zfyu~.X{8J">PAUSE_TIME</variable><variable id="HS~o~Vq2U+[*2Y55!`Ah">level</variable><variable id="3oH:SZYdMM^2iQmjEC%J">DEBOUNCE_TIME</variable><variable id="HlNIWgU{,!S_?L#f#f_G">index3</variable><variable id="]Ye$;p[V_,`~4%BjKUhg">index4</variable><variable id="^zko[T)F)*?n)B8^O[}Z">lastButtonPressTime</variable><variable id="%5yLb1mykO;OaQcJt/;a">index2</variable><variable id="$.~.hAqp?DaE/l8rc`Y+">index</variable></variables><comment id="tyrum).,S3-ui8ckUc5P" x="0" y="0" w="572" h="890" collapsed="true">
MIT License
This file is part of the repository:
https://github.com/Vegz78/microbit_test_testunit
Please feel free to use, fork and develop, but I appreciate proper attribution
to the developer, and - if possible - linking back to this original repository:
https://github.com/Vegz78/microbit_test_testunit
Copyright(c) 2024 Vegz78
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files(the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
</comment><block type="pxt-on-start" id="-X@8yiaC/;e|N0#u{j]3" x="-1" y="40"><statement name="HANDLER"><block type="radio_set_group" id="Lr@!z?{Z(NO1NR`qMC#3"><value name="ID"><shadow type="math_number_minmax" id="lLBlb+0_mT6J)xVJKWCF"><mutation min="0" max="255" precision="0"></mutation><field name="SLIDER">99</field></shadow></value><next><block type="variables_set" id="[0B|MoupVu7WidL5U@~G"><field name="VAR" id="3oH:SZYdMM^2iQmjEC%J">DEBOUNCE_TIME</field><value name="VALUE"><shadow type="math_number" id="9Jj*4{I(O8-JWe7+1tVI"><field name="NUM">500</field></shadow></value><next><block type="variables_set" id=":F}8TS(*]Q@YK9`M/joI"><field name="VAR" id="rnW2l@%}|?zfyu~.X{8J">PAUSE_TIME</field><value name="VALUE"><shadow type="math_number" id="W?KvR}!?7m+5JJZ|*G+2"><field name="NUM">200</field></shadow></value><next><block type="variables_set" id="Lh[{~Z/Rd-SyUSqrB:z0"><field name="VAR" id="}B;IeGEW^dW;R._t_eCA">testNumber</field><value name="VALUE"><shadow type="math_number" id="cL3aiN3IBn%VFv0B0Pl-"><field name="NUM">0</field></shadow></value><next><block type="variables_set" id="RcLUT%E8WA-OFwmQl{lE"><field name="VAR" id="u_}Ht~W1?yw9Br5yZSSY">justSwitched</field><value name="VALUE"><shadow type="math_number" id="]:dUs;O^9|=O):xYq!#B"><field name="NUM">1</field></shadow></value><next><block type="variables_set" id="F+djRJ./X=*mibF0!/A|"><field name="VAR" id="jN.:q2/{u^MeJX9MB)P2">calibrated</field><value name="VALUE"><shadow type="math_number" id="cOeH8K}}5o_WuL-GU+9M"><field name="NUM">0</field></shadow></value><next><block type="variables_set" id="YWpk+#,[$d9@#qt7B{JY"><field name="VAR" id="^zko[T)F)*?n)B8^O[}Z">lastButtonPressTime</field><value name="VALUE"><shadow type="math_number" id="[email protected]]ce"><field name="NUM">0</field></shadow></value></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block><block type="device_forever" id="j]8!yd[#3dP@y@Hrf^x^" x="481" y="33"><statement name="HANDLER"><block type="function_call" id="kEF3acYf?kwz$8^6u_|2"><mutation name="EmptyAndShowTestNo" functionid="Q:$WmE;C#{3xJ!gy#luV"></mutation><next><block type="controls_if" id="m/#tc:t6i1FtkZjmd6A^"><mutation elseif="10"></mutation><value name="IF0"><shadow type="logic_boolean" id="vq#xXQ!0%m3@N#_vVSp/"><field name="BOOL">TRUE</field></shadow><block type="logic_negate" id="u6a~PoseO{4P)1+.1pS+"><value name="BOOL"><shadow type="logic_boolean" id="~97%0)I(6$*lWlj[v8*M"><field name="BOOL">TRUE</field></shadow><block type="variables_get" id="IosX7[q[2MdGE@tFg9@w"><field name="VAR" id="}B;IeGEW^dW;R._t_eCA">testNumber</field></block></value></block></value><statement name="DO0"><block type="function_call" id="HnHn^%4e?CBg7Ig{yS{N"><mutation name="ButtonTest" functionid="K8^d{2LBy^dp.he@Z6%V"></mutation></block></statement><value name="IF1"><shadow type="logic_boolean" id="%ew[sQww}2!}@*1RA1Jn"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id=",F3vxB9_Y/.DqH:2=NFu"><field name="OP">EQ</field><value name="A"><shadow type="math_number" id="xwn$(Amne`Dh)v[cWZvM"><field name="NUM">0</field></shadow><block type="variables_get" id="!f6I|6r).~))4*.v%SVE"><field name="VAR" id="}B;IeGEW^dW;R._t_eCA">testNumber</field></block></value><value name="B"><shadow type="math_number" id="mq?LcdE]956C{D0mJ6*)"><field name="NUM">1</field></shadow></value></block></value><statement name="DO1"><block type="function_call" id="(G03FQ9It.{%hLdX$^zj"><mutation name="ScreenTest" functionid="ANB}5~RC!.bHCtm#a3K3"></mutation></block></statement><value name="IF2"><shadow type="logic_boolean" id="M^Uq1tdQ[1lMw^/v*N7="><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="2*b;X%n;xsC9MSvP|$$%"><field name="OP">EQ</field><value name="A"><shadow type="math_number" id="9}RHeaTK!G4;QJ=4w/8x"><field name="NUM">0</field></shadow><block type="variables_get" id="m4`R1^^e[:RFN`~+c,+|"><field name="VAR" id="}B;IeGEW^dW;R._t_eCA">testNumber</field></block></value><value name="B"><shadow type="math_number" id="Q)xaS,JSB9aVf,?$/8:!"><field name="NUM">2</field></shadow></value></block></value><statement name="DO2"><block type="function_call" id="V}N0Kc]!#Hv8uIR,o%nM"><mutation name="RadioTest" functionid="db!*aWTXOcQMjkQZ?$G,"></mutation></block></statement><value name="IF3"><shadow type="logic_boolean" id="=9+ukQFcLc24co{{P3Kb"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="YbJ95xKLlIqtc=%UO3XV"><field name="OP">EQ</field><value name="A"><shadow type="math_number" id="T!d6V2*AMOgMYByu#+4u"><field name="NUM">0</field></shadow><block type="variables_get" id="pX+I0u+S-z3)]9|$Mgge"><field name="VAR" id="}B;IeGEW^dW;R._t_eCA">testNumber</field></block></value><value name="B"><shadow type="math_number" id="j]5W!ets@2H/K5^A!T]#"><field name="NUM">3</field></shadow></value></block></value><statement name="DO3"><block type="function_call" id="brA6Yu`v#oIh6HWd?Bfy"><mutation name="LightSensorTest" functionid="y(6S%U.j~u^7}Y|~/L4u"></mutation></block></statement><value name="IF4"><shadow type="logic_boolean" id="Yji@l(AYBwmY+kUhTlf^"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="thPh6v!=OSLY1E:*!@-|"><field name="OP">EQ</field><value name="A"><shadow type="math_number" id="Pz6Ce32c^!3I@JFK?tR,"><field name="NUM">0</field></shadow><block type="variables_get" id="p#Yk5QLDCFg/p0x?|VJ7"><field name="VAR" id="}B;IeGEW^dW;R._t_eCA">testNumber</field></block></value><value name="B"><shadow type="math_number" id="YC-r_Wi.(x#d:.VE0a*v"><field name="NUM">4</field></shadow></value></block></value><statement name="DO4"><block type="function_call" id="IRq^5h]KP`%7eUxd/5wM"><mutation name="CompassTest" functionid="IdnGlC]R@SL^~bj]wnT6"></mutation></block></statement><value name="IF5"><shadow type="logic_boolean" id="j/+BRn2I3Jt`.2GYa|}y"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="D(h3e4?Wj$jL*o%mN,={"><field name="OP">EQ</field><value name="A"><shadow type="math_number" id="#G$*U^c/i#;)|])vJ}q%"><field name="NUM">0</field></shadow><block type="variables_get" id=";pP:~Ev2@fPBSPgMz0!B"><field name="VAR" id="}B;IeGEW^dW;R._t_eCA">testNumber</field></block></value><value name="B"><shadow type="math_number" id="gV%LdHCs%W1eBQo5wF8O"><field name="NUM">5</field></shadow></value></block></value><statement name="DO5"><block type="function_call" id="-]..iBV_q$M|,e|W%^GQ"><mutation name="AccelerometerTest" functionid="O(|yzB2sp^;]bNgKx?{Z"></mutation></block></statement><value name="IF6"><shadow type="logic_boolean" id="35o@yw;yOSS.,GL6292F"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="uy;^Ljd}d$|9~=CP,}Cg"><field name="OP">EQ</field><value name="A"><shadow type="math_number" id=";%Ixb*n@~qct7S!O7bUX"><field name="NUM">0</field></shadow><block type="variables_get" id="@8Y})wLvwmvI2i2QMroL"><field name="VAR" id="}B;IeGEW^dW;R._t_eCA">testNumber</field></block></value><value name="B"><shadow type="math_number" id="U3,K0F=z}HDmRF%-IfGP"><field name="NUM">6</field></shadow></value></block></value><statement name="DO6"><block type="function_call" id="kg[avG|3uEB%Dqm]:_fu"><mutation name="ThermometerTest" functionid="H+IN1huJ=b}z1YB~YPQ]"></mutation></block></statement><value name="IF7"><shadow type="logic_boolean" id="8GK#t*YoJG,}stA1rwnW"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id=":Gz/IbqI8%#YIxRt+lD~"><field name="OP">EQ</field><value name="A"><shadow type="math_number" id="k(?nD0.RR(m*#(*UN3Vl"><field name="NUM">0</field></shadow><block type="variables_get" id="V_@t]vKFipWqVloh*Ke#"><field name="VAR" id="}B;IeGEW^dW;R._t_eCA">testNumber</field></block></value><value name="B"><shadow type="math_number" id="ov@2+_SjxI+z5+-[;a:}"><field name="NUM">7</field></shadow></value></block></value><statement name="DO7"><block type="function_call" id="2yK.shB4^p:YI;0%rIE1"><mutation name="PinResistiveTest" functionid="kA;CmJfAMU-nQdyXwQw+"></mutation></block></statement><value name="IF8"><shadow type="logic_boolean" id="}3alzMDIW=bE^S7R7;!o"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="TP$j.D/RWO~[j`+fh0%{"><field name="OP">EQ</field><value name="A"><shadow type="math_number" id="$^pa_p~0*Os4}%,XW#[|"><field name="NUM">0</field></shadow><block type="variables_get" id="8k%mxVaB[aLD{eHTUaN;"><field name="VAR" id="}B;IeGEW^dW;R._t_eCA">testNumber</field></block></value><value name="B"><shadow type="math_number" id="_C9RNfnlcPwBLH051XI|"><field name="NUM">8</field></shadow></value></block></value><statement name="DO8"><block type="music_playable_play_default_bkg" id="i,7T*VL`JSe{1@z/|GD!"><field name="playbackMode">music.PlaybackMode.UntilDone</field><value name="toPlay"><shadow type="music_string_playable" id="xDWSgAOC^uRGku-RRrH:"></shadow><block type="device_builtin_melody_playable" id="YZ~T(bEaVPmwRM+`!VO6"><field name="melody">Melodies.Funk</field></block></value></block></statement><value name="IF9"><shadow type="logic_boolean" id="yk|,~(M)^at1*G|P^vfV"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="3gd/2`CVsu}L8g:Px#DZ"><field name="OP">EQ</field><value name="A"><shadow type="math_number" id="{%-YcgOOWe$0o5mz=kR`"><field name="NUM">0</field></shadow><block type="variables_get" id="/.-TS/cNjI/*bL!{Q3Jf"><field name="VAR" id="}B;IeGEW^dW;R._t_eCA">testNumber</field></block></value><value name="B"><shadow type="math_number" id="mI)EgS^S?5hD4)D7J2rV"><field name="NUM">9</field></shadow></value></block></value><statement name="DO9"><block type="function_call" id="|NPiAVBV1KSq/i%#K#tJ"><mutation name="PinAnalogInputTest" functionid="bwZK@kl#u117DsDoGuYk"></mutation></block></statement><value name="IF10"><shadow type="logic_boolean" id="gq!i4/vZ.9Nm7W;fJq-p"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="Fd30@zd3?0pj97F_9YZ]"><field name="OP">EQ</field><value name="A"><shadow type="math_number" id="@4V68:q7*}~;.%bs4nTg"><field name="NUM">0</field></shadow><block type="variables_get" id="-goEKcP!D)4Dl7j,AH*}"><field name="VAR" id="}B;IeGEW^dW;R._t_eCA">testNumber</field></block></value><value name="B"><shadow type="math_number" id="OW4m#4/nA;b,l~5+rRlR"><field name="NUM">10</field></shadow></value></block></value><statement name="DO10"><block type="function_call" id="_O^k($M$7RdfU6r7Pk?w"><mutation name="PinAnalogOutputTest2" functionid="[oCr$g[TzDQ8V7Jm[nRk"></mutation></block></statement></block></next></block></statement></block><block type="function_definition" id="q+VgBIX]-`w!m#V[Zu]$" x="1033" y="37"><mutation name="EmptyAndShowTestNo" functionid="Q:$WmE;C#{3xJ!gy#luV"></mutation><field name="function_name">EmptyAndShowTestNo</field><statement name="STACK"><block type="variables_set" id=",?9.LDuZb-dXkoLV0N{@"><field name="VAR" id="}B;IeGEW^dW;R._t_eCA">testNumber</field><value name="VALUE"><shadow type="math_number" id="mx;!ku]rdvfjAtTa*X,%"><field name="NUM">0</field></shadow><block type="function_call_output" id="fs$rHm|-UaP,5aS`?,XV"><mutation name="TrueModulo" functionid="X35!r#,[FvF(@LB@jFLZ"><arg name="dividend" id="1b4jd1qve89813knu203i" type="number"></arg><arg name="divisor" id="obv844fz51nidog26cpur" type="number"></arg></mutation><value name="1b4jd1qve89813knu203i"><shadow type="math_number" id="EW5rbS~:*c3zAB{ITz!-"><field name="NUM">1</field></shadow><block type="variables_get" id="Z{1v[rE;xUHg~!Uvrq8t"><field name="VAR" id="}B;IeGEW^dW;R._t_eCA">testNumber</field></block></value><value name="obv844fz51nidog26cpur"><shadow type="math_number" id="6I?O$-NbK7bsr`=DL`DY"><field name="NUM">11</field></shadow></value></block></value><next><block type="controls_if" id="(4jHBhioeF*^7|6r]2MJ"><value name="IF0"><shadow type="logic_boolean" id="//nNB8LPt4%0h2;]xx]q"><field name="BOOL">TRUE</field></shadow><block type="logic_negate" id="PHMgvwB?|-*R;#$hi.67"><value name="BOOL"><shadow type="logic_boolean" id="ybH(^:iZEv/Kcxf`CuBG"><field name="BOOL">TRUE</field></shadow><block type="variables_get" id="}]Z4O)SmGt$2X!s)(b$$"><field name="VAR" id="u_}Ht~W1?yw9Br5yZSSY">justSwitched</field></block></value></block></value><statement name="DO0"><block type="device_pause" id="9P3D((+a=d)dOJ9jxo6h"><value name="pause"><shadow type="timePicker" id="uK|bawTR_Ik1YcJ3AS})"><field name="ms">NaN</field></shadow><block type="variables_get" id="T!+dG2+Te2f:~]EjmAr]"><field name="VAR" id="3oH:SZYdMM^2iQmjEC%J">DEBOUNCE_TIME</field></block></value><next><block type="variables_set" id="T5~2c8hGP]}t0^uUwX51"><field name="VAR" id="u_}Ht~W1?yw9Br5yZSSY">justSwitched</field><value name="VALUE"><shadow type="math_number" id="bidmjMc_Kan.ANMtOVjO"><field name="NUM">1</field></shadow></value></block></next></block></statement><next><block type="device_clear_display" id="Q^V52[iZlh;k5?4,hd^;"><next><block type="device_plot" id="rJ7xG0N:`m8S)Yvh_sO%"><value name="x"><shadow type="math_number_minmax" id="_7bQ-JQxv9)B}{3fER[@"><mutation min="0" max="4" precision="0"></mutation><field name="SLIDER">0</field></shadow><block type="math_modulo" id=",?p,yJU-rJKT_WYC2QCP"><value name="DIVIDEND"><shadow type="math_number" id="HxL-!$~w^b^{cruUhHNX"><field name="NUM">0</field></shadow><block type="variables_get" id="{l0/oVd)H}.r/eHdimzx"><field name="VAR" id="}B;IeGEW^dW;R._t_eCA">testNumber</field></block></value><value name="DIVISOR"><shadow type="math_number" id="iq!7x.B4[DxFyy-uJy]`"><field name="NUM">5</field></shadow></value></block></value><value name="y"><shadow type="math_number_minmax" id="%@gI^)zwEfi{Yfl2wQoe"><mutation min="0" max="4" precision="0"></mutation><field name="SLIDER">0</field></shadow><block type="typescript_expression" id=";X_d)]c(7v=lCG*T):CY"><field name="EXPRESSION">(testNumber/5)|0</field></block></value><next><block type="controls_if" id="(9f8-OZ_V*Dp#kt!HH6."><mutation else="1"></mutation><value name="IF0"><shadow type="logic_boolean" id="+c$4?YW$!ygdF@T_0!bn"><field name="BOOL">TRUE</field></shadow><block type="logic_operation" id="K;Dk5Rxl4=-A:W1XBK[6"><field name="OP">OR</field><value name="A"><shadow type="logic_boolean" id="T0*76V}_]Eip5q|eR`%Q"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="=cEv1=+i-*1vLJr_=Q92"><field name="OP">EQ</field><value name="A"><shadow type="math_number" id="${Lf{w6Fe-m(Vhu~[QU5"><field name="NUM">0</field></shadow><block type="variables_get" id="4W2BQam`F|4%EG~JxNf?"><field name="VAR" id="}B;IeGEW^dW;R._t_eCA">testNumber</field></block></value><value name="B"><shadow type="math_number" id="$%)+]YT*KXLUW$S-5g2w"><field name="NUM">4</field></shadow></value></block></value><value name="B"><shadow type="logic_boolean" id="ysND#A%LGqaI*;0^vrDN"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="!/($sr|So.w%9qKS^,{z"><field name="OP">EQ</field><value name="A"><shadow type="math_number" id="#2q6+q$K~mj*~HzxY5c6"><field name="NUM">0</field></shadow><block type="variables_get" id="QrxKoOSk)p@+UJp.ZA?b"><field name="VAR" id="}B;IeGEW^dW;R._t_eCA">testNumber</field></block></value><value name="B"><shadow type="math_number" id="O8`OZw)rPcTP,uGuUAIx"><field name="NUM">6</field></shadow></value></block></value></block></value><statement name="DO0"><block type="controls_if" id="%A=7W2Vb0gQs~]YQGV?:"><value name="IF0"><shadow type="logic_boolean" id="1.y9rw!xLJ|9/dN^AX0;"><field name="BOOL">TRUE</field></shadow><block type="variables_get" id="@Cgfe/jaDnB7LVyY}]oF"><field name="VAR" id="u_}Ht~W1?yw9Br5yZSSY">justSwitched</field></block></value><statement name="DO0"><block type="device_pause" id="I!Q.lI=]mM#PTp}eJZJD"><value name="pause"><shadow type="timePicker" id="Z,+ot5(dUmFZVb=9i*PX"><field name="ms">NaN</field></shadow><block type="variables_get" id="Oe$E^@jj@c%!DQ*X(a9:"><field name="VAR" id="3oH:SZYdMM^2iQmjEC%J">DEBOUNCE_TIME</field></block></value><next><block type="variables_set" id="^n)`m5a.q6aMxv8|6@!O"><field name="VAR" id="u_}Ht~W1?yw9Br5yZSSY">justSwitched</field><value name="VALUE"><shadow type="math_number" id="~Y3lr58;HpFN#5xJ?+`U"><field name="NUM">0</field></shadow></value></block></next></block></statement></block></statement><statement name="ELSE"><block type="variables_set" id="_N:0X|I]69lo0%w^u[gb"><field name="VAR" id="u_}Ht~W1?yw9Br5yZSSY">justSwitched</field><value name="VALUE"><shadow type="math_number" id="ksn.R.~M$fBk:Dgt9dU@"><field name="NUM">1</field></shadow></value></block></statement></block></next></block></next></block></next></block></next></block></statement></block><block type="function_definition" id="=`c5SCeTJ6]GT6;v{9eN" x="1849" y="39"><mutation name="ButtonTest" functionid="K8^d{2LBy^dp.he@Z6%V"></mutation><field name="function_name">ButtonTest</field><statement name="STACK"><block type="device_while" id="Ino%B[AWRNPjQD:,xO{n"><value name="COND"><shadow type="logic_boolean" id="MJ=9v8^:B0ep4Ia_o.S@"><field name="BOOL">TRUE</field></shadow><block type="device_get_button2" id="HC|4RTwhoh|4Vl}Tbr}u"><field name="NAME">Button.AB</field></block></value><statement name="DO"><block type="basic_show_arrow" id="$s7$UUB@0y7mP9qJKgaX"><value name="i"><shadow type="device_arrow" id="yQRg=Keh+v8W1.kEuGy`"><field name="arrow">ArrowNames.North</field></shadow></value></block></statement><next><block type="device_while" id="8~X#1y{}4Olnkee;aFY7"><value name="COND"><shadow type="logic_boolean" id="lN[}B.P|N}Xa3w1N,J61"><field name="BOOL">TRUE</field></shadow><block type="device_get_button2" id="qqpm`t[^|Mv8C$:k@v8F"><field name="NAME">Button.A</field></block></value><statement name="DO"><block type="basic_show_arrow" id="IOi!m@v0m:OUCm]q-19k"><value name="i"><shadow type="device_arrow" id=":`8.m0;ArpYnFIV=:CQp"><field name="arrow">ArrowNames.West</field></shadow></value></block></statement><next><block type="device_while" id="7zUOCz-:rgLl9dHupHQ;"><value name="COND"><shadow type="logic_boolean" id="Lk9:-,Ry4xuth66P%vt0"><field name="BOOL">TRUE</field></shadow><block type="device_get_button2" id="(]qSD16}rUk#Uoz.VQ82"><field name="NAME">Button.B</field></block></value><statement name="DO"><block type="basic_show_arrow" id="$(:be65y43unU:qBT-h$"><value name="i"><shadow type="device_arrow" id="O}1|(S_dZ;T)XX!6T*Ei"><field name="arrow">ArrowNames.East</field></shadow></value></block></statement></block></next></block></next></block></statement></block><block type="function_definition" id=")}X{Qdug#t$xdj%WBiQy" x="2323" y="40"><mutation name="LightSensorTest" functionid="y(6S%U.j~u^7}Y|~/L4u"></mutation><field name="function_name">LightSensorTest</field><statement name="STACK"><block type="variables_set" id="]?}U9_J]/)A=S9Ik{[o!"><field name="VAR" id="HS~o~Vq2U+[*2Y55!`Ah">level</field><value name="VALUE"><shadow type="math_number" id="@r^!iP:086QV~MZ]O(@V"><field name="NUM">0</field></shadow><block type="device_get_light_level" id="[email protected]+"></block></value><next><block type="radio_datagram_send" id="bbQMEz%.1vX,iq(c`#%#"><value name="value"><block type="variables_get" id="9i]u=jXrnGwnMmoY1=+)"><field name="VAR" id="HS~o~Vq2U+[*2Y55!`Ah">level</field></block></value><next><block type="device_pause" id="T)[DEex(8$zfO;/AUW:7"><value name="pause"><shadow type="timePicker" id=";Sx/6,ZLxKM4RZF;2UCc"><field name="ms">NaN</field></shadow><block type="variables_get" id="WKXS9`:HjKO/]D%Au`]W"><field name="VAR" id="rnW2l@%}|?zfyu~.X{8J">PAUSE_TIME</field></block></value></block></next></block></next></block></statement></block><block type="function_definition" id=",mzvHm0_NWap]G@r*R()" x="2326" y="332"><mutation name="CompassTest" functionid="IdnGlC]R@SL^~bj]wnT6"></mutation><field name="function_name">CompassTest</field><statement name="STACK"><block type="controls_if" id="vKI9uIGk5WvS0+hHB,=$"><value name="IF0"><shadow type="logic_boolean" id="iC},|+.6AtfuDW^QcB]B"><field name="BOOL">TRUE</field></shadow><block type="logic_negate" id="`e.bn8XnAx{x`Vi[5,lD"><value name="BOOL"><shadow type="logic_boolean" id="ew}4SQqM;4zC=~_=?7sS"><field name="BOOL">TRUE</field></shadow><block type="variables_get" id="q[EV)Lk^F3kbgjHCO?8z"><field name="VAR" id="jN.:q2/{u^MeJX9MB)P2">calibrated</field></block></value></block></value><statement name="DO0"><block type="typescript_statement" id="hFK;ZO|%OU{#dt?m5/!G"><mutation xmlns="http://www.w3.org/1999/xhtml" line0="basic.showString("Calibrate?", 60)" numlines="1"></mutation><next><block type="device_while" id="2?KNt4L_7i5=ypN(4aKq"><value name="COND"><shadow type="logic_boolean" id="(G^1b]e=zfutpqnplqMN"><field name="BOOL">TRUE</field></shadow><block type="logic_negate" id="zvX7z80jdlFrP1:e}zoo"><value name="BOOL"><shadow type="logic_boolean" id="8tfh%uGw/B9~DNe!Co[;"><field name="BOOL">TRUE</field></shadow><block type="variables_get" id="|]jPvF|j,-67:IDkJ(?0"><field name="VAR" id="jN.:q2/{u^MeJX9MB)P2">calibrated</field></block></value></block></value><statement name="DO"><block type="controls_if" id="Ta@W;{_TgiXR`yMXp6W*"><mutation elseif="1"></mutation><value name="IF0"><shadow type="logic_boolean" id="1^(5y|pHFe?2GG{SGg2,"><field name="BOOL">TRUE</field></shadow><block type="device_get_button2" id="4S849+(]srDrWEOycOS,"><field name="NAME">Button.A</field></block></value><statement name="DO0"><block type="input_compass_calibrate" id="hJ.NP|l2[#(w]%{9+O|:"><next><block type="variables_set" id="t~c{2j6juxfGm;TD{M/L"><field name="VAR" id="jN.:q2/{u^MeJX9MB)P2">calibrated</field><value name="VALUE"><shadow type="math_number" id="Xh.d4ixg:d%NEW%uV-4o"><field name="NUM">1</field></shadow></value></block></next></block></statement><value name="IF1"><shadow type="logic_boolean" id="WXjc?-5.PGTKkU?[635X"><field name="BOOL">TRUE</field></shadow><block type="device_get_button2" id="Kq%T+:o={CW4af|000Oz"><field name="NAME">Button.B</field></block></value><statement name="DO1"><block type="variables_set" id="N=D7`[3kb0=l-8P$#KqF"><field name="VAR" id="jN.:q2/{u^MeJX9MB)P2">calibrated</field><value name="VALUE"><shadow type="math_number" id="p`#fQ|D?KC!uCPe9BDx7"><field name="NUM">1</field></shadow></value></block></statement></block></statement></block></next></block></statement><next><block type="variables_set" id="J+UB|7yOaClPUNmed,!H"><field name="VAR" id="SBoo3!znh0OM0Z/7XhJ2">degrees</field><value name="VALUE"><shadow type="math_number" id="ur36OJ9n~S.5wa`Af|ZV"><field name="NUM">0</field></shadow><block type="device_heading" id="DcWu-jpNR-GI~2)lVW[N"></block></value><next><block type="controls_if" id="4~E6e7H,dHt:$tYVAkX`"><mutation elseif="4"></mutation><comment pinned="true" h="131" w="330">Compass routine inspired from here:
https://makecode.microbit.org/projects/compass#:~:text=%7B-,Step%207,-%7D</comment><data>{"commentRefs":[],"fieldData":{"~commentOffsetX":"-449.9999999999982","~commentOffsetY":"44.22222222222149"}}</data><value name="IF0"><shadow type="logic_boolean" id="p2PsAcVg~nLlfP79JgwW"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="$9(MIcp=u4#yK{/@qHKk"><field name="OP">LT</field><value name="A"><shadow type="math_number" id=",.2TQCSlbAvUKY~w,%1E"><field name="NUM">0</field></shadow><block type="variables_get" id="%I#d=KDdXw=Z$O:HHR;t"><field name="VAR" id="SBoo3!znh0OM0Z/7XhJ2">degrees</field></block></value><value name="B"><shadow type="math_number" id="KA5P}3WG5:|5`BOjurwC"><field name="NUM">45</field></shadow></value></block></value><statement name="DO0"><block type="device_print_message" id="#S@gI?_C%]:E2#zcFd!}"><value name="text"><shadow type="text" id="zPWXNO*7i7(9WLS/[nBU"><field name="TEXT">N</field></shadow></value></block></statement><value name="IF1"><shadow type="logic_boolean" id="[email protected];^KfZz"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="3{yue$/(|QhC*PMLo$Rk"><field name="OP">LT</field><value name="A"><shadow type="math_number" id="!h4()*#`c9w;?5DWIb7j"><field name="NUM">0</field></shadow><block type="variables_get" id="5$S%Ie*.zQ!2$R[iVe95"><field name="VAR" id="SBoo3!znh0OM0Z/7XhJ2">degrees</field></block></value><value name="B"><shadow type="math_number" id="?2+2n[Z]O6W.R-3,D!5T"><field name="NUM">135</field></shadow></value></block></value><statement name="DO1"><block type="device_print_message" id="a^,9OoX:q)rf]ZORH)ze"><value name="text"><shadow type="text" id="qm3sKtO=3`C!8d]?!rVV"><field name="TEXT">E</field></shadow></value></block></statement><value name="IF2"><shadow type="logic_boolean" id="dC({BJk~ntlE}dTVT3%x"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="q,SrIj1pLg@%JtwkU`,9"><field name="OP">LT</field><value name="A"><shadow type="math_number" id="~-F]uB4{u.H+gy,%$WPd"><field name="NUM">0</field></shadow><block type="variables_get" id="zV1$$~M;kK**:l0(zl(b"><field name="VAR" id="SBoo3!znh0OM0Z/7XhJ2">degrees</field></block></value><value name="B"><shadow type="math_number" id="9mi-}mno0)Ej%R7%$/oT"><field name="NUM">225</field></shadow></value></block></value><statement name="DO2"><block type="device_print_message" id="J{@+ed-I6tw7gL6h#dD~"><value name="text"><shadow type="text" id=",Kzpesaf^|?hd.{KHvQI"><field name="TEXT">S</field></shadow></value></block></statement><value name="IF3"><shadow type="logic_boolean" id="q)GqRh5X!A_K`W8^+khd"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="(.VW0t9-aN4nb*6ZBAbT"><field name="OP">LT</field><value name="A"><shadow type="math_number" id="i.4L(Bj$gw2x,Gynw%kp"><field name="NUM">0</field></shadow><block type="variables_get" id="7qb]vA0KSg8}2!t2/KLr"><field name="VAR" id="SBoo3!znh0OM0Z/7XhJ2">degrees</field></block></value><value name="B"><shadow type="math_number" id="N_-G89i36Q-uE2K#TRbW"><field name="NUM">315</field></shadow></value></block></value><statement name="DO3"><block type="device_print_message" id="#![a7dNR-}l?$xSvM;aH"><value name="text"><shadow type="text" id="LPQdUnIL8K[77te$Y-9q"><field name="TEXT">W</field></shadow></value></block></statement><value name="IF4"><shadow type="logic_boolean" id="IWUUT;4taY=|$[qr}.!*"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="JS`yh/(VtjpqaT~(q%,i"><field name="OP">LTE</field><value name="A"><shadow type="math_number" id="#-3DF.o{:-oZdoL`#=So"><field name="NUM">0</field></shadow><block type="variables_get" id="*h0c)Jkr~Rp{3lC-DH:5"><field name="VAR" id="SBoo3!znh0OM0Z/7XhJ2">degrees</field></block></value><value name="B"><shadow type="math_number" id=",:}o]VUGq5p4:39e8z]8"><field name="NUM">360</field></shadow></value></block></value><statement name="DO4"><block type="device_print_message" id="R5mbqTVc+XInd;)~7Bc/"><value name="text"><shadow type="text" id="6U_L4gUohiI.isS|%*.I"><field name="TEXT">N</field></shadow></value></block></statement></block></next></block></next></block></statement></block><block type="device_button_event" id="s6GaK^ZC-6BEw3{(:L8z" x="1" y="506"><field name="NAME">Button.A</field><statement name="HANDLER"><block type="device_pause" id="7*zF}eZD~o7xV%-oQ5u]"><value name="pause"><shadow type="timePicker" id="p93ATZO;vmc!++ux4={B"><field name="ms">NaN</field></shadow><block type="variables_get" id="}5%0Py@)pyS*$3)*$`!u"><field name="VAR" id="rnW2l@%}|?zfyu~.X{8J">PAUSE_TIME</field></block></value><next><block type="controls_if" id="9R-Wbv47YgZe0.e_6]JQ"><value name="IF0"><shadow type="logic_boolean" id="a0%gZoV.:L8-40dW~*D="><field name="BOOL">TRUE</field></shadow><block type="device_get_button2" id="}n2.^pZ[%v(nu-TxYk5O"><field name="NAME">Button.B</field></block></value><statement name="DO0"><block type="variables_change" id="InB|%;1Ega6-z,oto*Yq"><field name="VAR" id="}B;IeGEW^dW;R._t_eCA">testNumber</field><value name="VALUE"><shadow type="math_number" id="gg;ZUl=CZ;A:gt^yHLzl"><field name="NUM">-1</field></shadow></value></block></statement></block></next></block></statement></block><block type="function_definition" id="uaSaYYgT).6M7#SBUATz" x="1850" y="554"><mutation name="ScreenTest" functionid="ANB}5~RC!.bHCtm#a3K3"></mutation><field name="function_name">ScreenTest</field><statement name="STACK"><block type="device_pause" id="AQW|`,/-G]FFUk8f`PU["><value name="pause"><shadow type="timePicker" id="ya4HJu`k~zCIeon-^!%J"><field name="ms">NaN</field></shadow><block type="variables_get" id="@`Ccd8jX)i#Sq=BFD[fS"><field name="VAR" id="rnW2l@%}|?zfyu~.X{8J">PAUSE_TIME</field></block></value><next><block type="device_show_leds" id="ndRW;5t1/jCYxK.yc`rr"><field name="LEDS">`
# # # # #
# # # # #
# # # # #
# # # # #
# # # # #
`</field><next><block type="device_pause" id="L`RcLpg57$V(L#K1~Vq~"><value name="pause"><shadow type="timePicker" id="U8[04fEyFD+~5hI3Y1#="><field name="ms">NaN</field></shadow><block type="variables_get" id="jD2sv!CPjCP3A]X`Fe1d"><field name="VAR" id="rnW2l@%}|?zfyu~.X{8J">PAUSE_TIME</field></block></value></block></next></block></next></block></statement></block><block type="device_button_event" id="q1,@j6q?~HDhv}7_KL:d" x="3" y="781"><field name="NAME">Button.B</field><statement name="HANDLER"><block type="device_pause" id="GcgO#F.lOt5pM2@26qK."><value name="pause"><shadow type="timePicker" id="=xa9d=)]G_Cgs2zXZ-}e"><field name="ms">NaN</field></shadow><block type="variables_get" id="JV@{=yQq58at+-3i$=y4"><field name="VAR" id="rnW2l@%}|?zfyu~.X{8J">PAUSE_TIME</field></block></value><next><block type="controls_if" id=".r[(J5WDk:H(jwUqqsIT"><value name="IF0"><shadow type="logic_boolean" id="y7~?t6r3SpI0k-b3o(m}"><field name="BOOL">TRUE</field></shadow><block type="device_get_button2" id="-u@dM01J]/q^%mHYmrNv"><field name="NAME">Button.A</field></block></value><statement name="DO0"><block type="variables_change" id="rO8V9E10997teB{=1G5,"><field name="VAR" id="}B;IeGEW^dW;R._t_eCA">testNumber</field><value name="VALUE"><shadow type="math_number" id="J|nZxPibJ})I{/rZotYq"><field name="NUM">1</field></shadow></value></block></statement></block></next></block></statement></block><block type="function_definition" id="KoOc-ud^Q^`r_]2jqmPr" x="1030" y="886"><mutation name="TrueModulo" functionid="X35!r#,[FvF(@LB@jFLZ"><arg name="dividend" id="1b4jd1qve89813knu203i" type="number"></arg><arg name="divisor" id="obv844fz51nidog26cpur" type="number"></arg></mutation><field name="function_name">TrueModulo</field><value name="1b4jd1qve89813knu203i"><block type="argument_reporter_number" id="LY^=q8iy?-roBbnx*~)v"><mutation duplicateondrag="true"></mutation><field name="VALUE">dividend</field></block></value><value name="obv844fz51nidog26cpur"><block type="argument_reporter_number" id="zipX@3Rc:dL*6(K,`K]6"><mutation duplicateondrag="true"></mutation><field name="VALUE">divisor</field></block></value><statement name="STACK"><block type="function_return" id=",grq`]md_;IrI{[vFPgf"><mutation xmlns="http://www.w3.org/1999/xhtml" no_return_value="false"></mutation><value name="RETURN_VALUE"><shadow type="math_number" id="Fdd5RH.LDvC[.b_sJitg"><field name="NUM">0</field></shadow><block type="typescript_expression" id="ZFK,9bJ+VZh/j!j*m:Z0"><field name="EXPRESSION">dividend < 0 ? Math.abs((dividend += divisor) % divisor) : dividend % divisor</field></block></value></block></statement></block><block type="radio_on_number_drag" id="B2:-G/i9)17!QyVawk5J" x="1" y="1076"><value name="HANDLER_DRAG_PARAM_receivedNumber"><block type="argument_reporter_number" id="#1|Y=9A{U.!bM]P)$ANS"><mutation duplicateondrag="true"></mutation><field name="VALUE">receivedNumber</field></block></value><statement name="HANDLER"><block type="controls_if" id="Jbf2j_pXiTSTQR$TF_vW"><value name="IF0"><shadow type="logic_boolean" id="gmQ-Lhd[L@$@;IaIqQOA"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="UUN9aCf._GHSD@;stgzQ"><field name="OP">EQ</field><value name="A"><shadow type="math_number" id="kNAJ)#V:Zlb2wH{})T@|"><field name="NUM">0</field></shadow><block type="variables_get" id="EfHcw)m|?Ky6DU3g[loj"><field name="VAR" id="}B;IeGEW^dW;R._t_eCA">testNumber</field></block></value><value name="B"><shadow type="math_number" id="4:fh/Z3~(nRAl1x|UJUH"><field name="NUM">2</field></shadow></value></block></value><statement name="DO0"><block type="controls_if" id="TV75OriKvR)a#sV.6NPw"><value name="IF0"><shadow type="logic_boolean" id="Ag6/5ndc2S%kuS$X!|o]"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="BGNkRgr7yu/6p/ZKg]_^"><field name="OP">NEQ</field><value name="A"><shadow type="math_number" id="Xk^2M|_9uk=M4yak@=fE"><field name="NUM">0</field></shadow><block type="argument_reporter_number" id="#a/Q0%.DFIkc^N}`;fJ#"><field name="VALUE">receivedNumber</field></block></value><value name="B"><shadow type="math_number" id="taNR@;{u1I3=c076Oh?!"><field name="NUM">0</field></shadow></value></block></value><statement name="DO0"><block type="variables_set" id="LM8,u9#($5+(e;Tc/Y!d"><field name="VAR" id="u_}Ht~W1?yw9Br5yZSSY">justSwitched</field><value name="VALUE"><shadow type="math_number" id="0((VZX#6yEA2mdFIx[uz"><field name="NUM">0</field></shadow></value><next><block type="basic_show_icon" id="xt5^+!HIUgYM@X{;H?(U"><field name="i">IconNames.Yes</field></block></next></block></statement></block></statement></block></statement></block><block type="function_definition" id="]7N;yF;elNcP$wN%dP:B" x="1030" y="1091"><mutation name="RadioTest" functionid="db!*aWTXOcQMjkQZ?$G,"></mutation><field name="function_name">RadioTest</field><statement name="STACK"><block type="controls_if" id="*Hn.`0=R~Q6oxB;hLZ=)"><value name="IF0"><shadow type="logic_boolean" id="~l,Eqa$_BlJY{6/l/pL!"><field name="BOOL">TRUE</field></shadow><block type="logic_operation" id="lRo)m9L:vPY^yd}Z3Eo("><field name="OP">OR</field><value name="A"><shadow type="logic_boolean" id="+CEVM0EdCAq).:oMBVa;"><field name="BOOL">TRUE</field></shadow><block type="device_get_button2" id="O(`@@V|b[P?ZA[W/.[y-"><field name="NAME">Button.A</field></block></value><value name="B"><shadow type="logic_boolean" id="UZtPncv{CJYc_%S1(B%2"><field name="BOOL">TRUE</field></shadow><block type="device_get_button2" id="x`A/]sIEzmDqxd2EH8_I"><field name="NAME">Button.B</field></block></value></block></value><statement name="DO0"><block type="controls_if" id="f(385@t9/[+PaNTPSUZx"><comment pinned="true" h="118" w="640">Debouncer copied from @joshkeys19 on the MakeCode Forum:
https://forum.makecode.com/t/microbit-ignoring-radio-message-when-in-while-loop/5100/6</comment><data>{"commentRefs":[],"fieldData":{"~commentOffsetX":"263.9761726491456","~commentOffsetY":"44.18230758448112"}}</data><value name="IF0"><shadow type="logic_boolean" id="PjfYb;x2LQfk?/xk?Myq"><field name="BOOL">TRUE</field></shadow><block type="logic_compare" id="o^8gy;6`qs-1#vy.c-lh"><field name="OP">GT</field><value name="A"><shadow type="math_number" id="E)#.OI;L[N@J,cU9H+Gh"><field name="NUM">0</field></shadow><block type="device_get_running_time" id="~-7L4?[p|2R-Vo-[4[Uq"></block></value><value name="B"><shadow type="math_number" id="|YT-_-*n}~$O,Mt]:;!J"><field name="NUM">0</field></shadow><block type="math_arithmetic" id="gs5okoOJu]?u[d2#Mibe"><field name="OP">ADD</field><value name="A"><shadow type="math_number" id="{4sPfCACsEc3#)+7^tyN"><field name="NUM">0</field></shadow><block type="variables_get" id="MpiU+qerCmYL.~zy[=LT"><field name="VAR" id="^zko[T)F)*?n)B8^O[}Z">lastButtonPressTime</field></block></value><value name="B"><shadow type="math_number" id="w{1AC,y?]#:lu[INGDnl"><field name="NUM">0</field></shadow><block type="variables_get" id="]p=GCFMRQG^C~26Fg2TX"><field name="VAR" id="3oH:SZYdMM^2iQmjEC%J">DEBOUNCE_TIME</field></block></value></block></value></block></value><statement name="DO0"><block type="radio_datagram_send_string" id="$Fi,dJ1mMapP)O{*yG0t"><value name="msg"><shadow type="text" id="yciw[ydgml2y6Aw0XWxF"><field name="TEXT">OK</field></shadow></value><next><block type="device_pause" id="[YRdN;[Jy~oCLN[a^kHy"><value name="pause"><shadow type="timePicker" id="-{Zr]AxExA4ne06j/jZq"><field name="ms">NaN</field></shadow><block type="variables_get" id="7wwx$+TjzcMwHfa2`%tx"><field name="VAR" id="rnW2l@%}|?zfyu~.X{8J">PAUSE_TIME</field></block></value><next><block type="radio_datagram_send_string" id="kF[ka,O4A:#9ZA:jJX?W"><value name="msg"><shadow type="text" id="9_Q-=mw(BNyI/PO}M6GR"><field name="TEXT">"</field></shadow></value><next><block type="variables_set" id="*;b4:0MQK3D+DgImE2*R"><field name="VAR" id="^zko[T)F)*?n)B8^O[}Z">lastButtonPressTime</field><value name="VALUE"><shadow type="math_number" id=".QS0Hl!P;=B9TyS`te/E"><field name="NUM">0</field></shadow><block type="device_get_running_time" id="6!Y?wPjQ`{/:*Y5er,wY"></block></value></block></next></block></next></block></next></block></statement></block></statement></block></statement></block><block type="function_definition" id="nstm!`4scP=N5[p.WUI9" x="2" y="1608"><mutation name="AccelerometerTest" functionid="O(|yzB2sp^;]bNgKx?{Z"></mutation><field name="function_name">AccelerometerTest</field><statement name="STACK"><block type="controls_if" id="u%)v~CLe[H._A6ep?J|Q"><mutation elseif="5"></mutation><value name="IF0"><shadow type="logic_boolean" id="0DiDCMq:}iL[s*}00nNt"><field name="BOOL">TRUE</field></shadow><block type="deviceisgesture" id="vPZpa:s0L?NJOS@r2XLY"><field name="gesture">Gesture.LogoDown</field></block></value><statement name="DO0"><block type="basic_show_arrow" id="b6c_?bFsIkwPb,o}9?+A"><value name="i"><shadow type="device_arrow" id="9oCJomKd)jy`K|c](CqT"><field name="arrow">ArrowNames.North</field></shadow></value></block></statement><value name="IF1"><shadow type="logic_boolean" id="rm6IyTtYsYXh^xiJ@{Qj"><field name="BOOL">TRUE</field></shadow><block type="deviceisgesture" id="d1PLt}yvefR+C{{mi1_T"><field name="gesture">Gesture.LogoUp</field></block></value><statement name="DO1"><block type="basic_show_arrow" id="5q-OFB$jU|g7z06xJZ,l"><value name="i"><shadow type="device_arrow" id="BX!v_},nWvcptym~Dk$K"><field name="arrow">ArrowNames.South</field></shadow></value></block></statement><value name="IF2"><shadow type="logic_boolean" id="*l[s2-b,y)Fxtimr7`|x"><field name="BOOL">TRUE</field></shadow><block type="deviceisgesture" id="dL7*k.tj//j:k7$B5J1z"><field name="gesture">Gesture.TiltLeft</field></block></value><statement name="DO2"><block type="basic_show_arrow" id=")EvJ:pKNs+(yCN@z=T|R"><value name="i"><shadow type="device_arrow" id="[fzTfS0a;#`-YsZN=y%w"><field name="arrow">ArrowNames.West</field></shadow></value></block></statement><value name="IF3"><shadow type="logic_boolean" id="Uhr:h44ArVK|15JPP^9O"><field name="BOOL">TRUE</field></shadow><block type="deviceisgesture" id="3RRM190a!5k`gOVzp@v^"><field name="gesture">Gesture.TiltRight</field></block></value><statement name="DO3"><block type="basic_show_arrow" id="2m95am{mDYAbPlW?H));"><value name="i"><shadow type="device_arrow" id="0rw!c`~r[hPK0xv1GC|J"><field name="arrow">ArrowNames.East</field></shadow></value></block></statement><value name="IF4"><shadow type="logic_boolean" id="xb9`G3lXG^%!=mz(UZEO"><field name="BOOL">TRUE</field></shadow><block type="deviceisgesture" id="?sNn*uBTb(3f9#v3U4dK"><field name="gesture">Gesture.Shake</field></block></value><statement name="DO4"><block type="basic_show_icon" id="VJ@us(+16jeCq_5@=`rm"><field name="i">IconNames.Yes</field></block></statement><value name="IF5"><shadow type="logic_boolean" id="Id]6`W2g9:xAtb8[{E~R"><field name="BOOL">TRUE</field></shadow><block type="deviceisgesture" id="Q/{v!|#m}TIKk_eVQ~%m"><field name="gesture">Gesture.ThreeG</field></block></value><statement name="DO5"><block type="basic_show_icon" id="F=7A]9$70!Qfa,d}?)s6"><field name="i">IconNames.Yes</field></block></statement></block></statement></block><block type="function_definition" id="nT@dHzNogz4XjNsd$yeJ" x="472" y="1604"><mutation name="ThermometerTest" functionid="H+IN1huJ=b}z1YB~YPQ]"></mutation><field name="function_name">ThermometerTest</field><statement name="STACK"><block type="variables_set" id="}[B1?oLe_`WlW!^lQPbX"><field name="VAR" id="HS~o~Vq2U+[*2Y55!`Ah">level</field><value name="VALUE"><shadow type="math_number" id="a=8cyLoSL({`n9)$RGQn"><field name="NUM">0</field></shadow><block type="math_arithmetic" id="%^M~wZK}+%1P~#N.kh`("><field name="OP">MINUS</field><value name="A"><shadow type="math_number" id="2nA7Br[,OyLQHBs4l9xD"><field name="NUM">0</field></shadow><block type="device_temperature" id=".cHH/X_Y{x.##ZC)y4sY"></block></value><value name="B"><shadow type="math_number" id="shW]tqPD4h8QI.k0dgg_"><field name="NUM">15</field></shadow></value></block></value><next><block type="pxt_controls_for" id="B%{wQscSiWD4UVVcgGqO"><value name="VAR"><block type="variables_get_reporter" id="mtp^0$|spn(0:[6nhswY"><mutation duplicateondrag="true"></mutation><field name="VAR" id="$.~.hAqp?DaE/l8rc`Y+">index</field></block></value><value name="TO"><shadow type="math_whole_number" id="BaLv?`S~P-=Tgjpyx2HL"><field name="NUM">0</field></shadow><block type="variables_get" id="Hcl/DYc$/,T3U0Bc?gZY"><field name="VAR" id="HS~o~Vq2U+[*2Y55!`Ah">level</field></block></value><statement name="DO"><block type="device_plot" id="zw~7Q?+sfKXWPxb1Wl}0"><value name="x"><shadow type="math_number_minmax" id="{*0nTs$:,V?R-a`GL1J^"><mutation min="0" max="4" precision="0"></mutation><field name="SLIDER">0</field></shadow><block type="math_modulo" id="Hh~|Vz51k3ec7#f`VHBs"><value name="DIVIDEND"><shadow type="math_number" id="U--(~Sl_DQ8S{vogX7W["><field name="NUM">0</field></shadow><block type="variables_get" id="}[9|.gwS#`WGn!FzY$:x"><field name="VAR" id="$.~.hAqp?DaE/l8rc`Y+">index</field></block></value><value name="DIVISOR"><shadow type="math_number" id="AS(8wAe6z7Fk$Eo(sFyH"><field name="NUM">5</field></shadow></value></block></value><value name="y"><shadow type="math_number_minmax" id="3=|O/Y:o5g@1|nu-_doh"><mutation min="0" max="4" precision="0"></mutation><field name="SLIDER">0</field></shadow><block type="typescript_expression" id="BS[e(2d/0x4~Uuz%N=ov"><field name="EXPRESSION">(index/5)|0</field></block></value></block></statement></block></next></block></statement></block><block type="function_definition" id="n$3G*0rfOddAlFBBxdni" x="1030" y="1606"><mutation name="PinResistiveTest" functionid="kA;CmJfAMU-nQdyXwQw+"></mutation><field name="function_name">PinResistiveTest</field><statement name="STACK"><block type="controls_if" id="VL6%mBgad1Mad+*euNWl"><mutation elseif="2"></mutation><value name="IF0"><shadow type="logic_boolean" id="l|+um1TO%F..DBUZLHb%"><field name="BOOL">TRUE</field></shadow><block type="device_pin_is_pressed" id="Tz2leMk7Og3f9bcJxh%:"><field name="NAME">TouchPin.P0</field></block></value><statement name="DO0"><block type="device_show_number" id="wt)f6FuE5CUS}+O6uV,F"><value name="number"><shadow type="math_number" id="y7HyH,e~:}lSS30?_`sg"><field name="NUM">0</field></shadow></value></block></statement><value name="IF1"><shadow type="logic_boolean" id="04cOB7Z7@sm^9rG/UAQ8"><field name="BOOL">TRUE</field></shadow><block type="device_pin_is_pressed" id="o)OZ0He)cf*!;}N*z=!a"><field name="NAME">TouchPin.P1</field></block></value><statement name="DO1"><block type="device_show_number" id="=`spdx.@Q[zoxBzB_$:b"><value name="number"><shadow type="math_number" id="4vdGo1*0P?{gkYN{^HWE"><field name="NUM">1</field></shadow></value></block></statement><value name="IF2"><shadow type="logic_boolean" id=",?8W#=q:r-n)q_3[$NJV"><field name="BOOL">TRUE</field></shadow><block type="device_pin_is_pressed" id=":ofN9v8c;{Vnhr_25mH_"><field name="NAME">TouchPin.P2</field></block></value><statement name="DO2"><block type="device_show_number" id="f:x~X?PPAQxJY6L9,YuW"><value name="number"><shadow type="math_number" id="9BMj/%A$#aKh$EEyGeNr"><field name="NUM">2</field></shadow></value></block></statement></block></statement></block><block type="function_definition" id="g:q73OMd5]:U9dL+{$mU" x="1516" y="1606"><mutation name="PinAnalogOutputTest2" functionid="[oCr$g[TzDQ8V7Jm[nRk"></mutation><field name="function_name">PinAnalogOutputTest2</field><statement name="STACK"><block type="pxt_controls_for" id="$VWqPNOVKkX9Z7RW[4b)"><value name="VAR"><block type="variables_get_reporter" id="$m?-y^J!*g-x3QW%yV=/"><mutation duplicateondrag="true"></mutation><field name="VAR" id="HlNIWgU{,!S_?L#f#f_G">index3</field></block></value><value name="TO"><shadow type="math_whole_number" id="0ndSa!B`y/n8#9z97TW_"><field name="NUM">2</field></shadow></value><statement name="DO"><block type="device_set_analog_pin" id="@-=R.-i@j;phoRL1A~U7"><value name="name"><shadow type="analog_pin_shadow" id="G!f*a[ZgZ|.yH;o[+)XV"><field name="pin">AnalogPin.P0</field></shadow><block type="math_arithmetic" id="=L35_AjcT]Vxdq(W!xbM"><field name="OP">ADD</field><value name="A"><shadow type="math_number" id="@]mJgv*Z_SPlaQ0p:u-Q"><field name="NUM">0</field></shadow><block type="variables_get" id="8GU?|p353/P-eH$r20Uh"><field name="VAR" id="HlNIWgU{,!S_?L#f#f_G">index3</field></block></value><value name="B"><shadow type="math_number" id="1MI(;x_CDGvR;4}Ye~g9"><field name="NUM">100</field></shadow></value></block></value><value name="value"><shadow type="math_number_minmax" id="|aIrYw#0WQK(S6iOEclc"><mutation min="0" max="1023" precision="0"></mutation><field name="SLIDER">500</field></shadow></value></block></statement><next><block type="device_pause" id="*,i]Nt8]!g;bSF|JEI~U"><value name="pause"><shadow type="timePicker" id="?,?JP(})xXG83IQ]AJcT"><field name="ms">NaN</field></shadow><block type="variables_get" id="[Mje*?.s;3|I$%vL}..#"><field name="VAR" id="3oH:SZYdMM^2iQmjEC%J">DEBOUNCE_TIME</field></block></value><next><block type="pxt_controls_for" id="3`lCmBNsPaG$AsQ}kEKd"><value name="VAR"><block type="variables_get_reporter" id=",IBkpw59q@iVN_2IJZx!"><mutation duplicateondrag="true"></mutation><field name="VAR" id="]Ye$;p[V_,`~4%BjKUhg">index4</field></block></value><value name="TO"><shadow type="math_whole_number" id="/W+?7~VXqSGM$N[4MTk3"><field name="NUM">2</field></shadow></value><statement name="DO"><block type="device_set_analog_pin" id="OrrVuOB87l|IiY$,QiEt"><value name="name"><shadow type="analog_pin_shadow" id="%^zRn|^U/+t%6=9-NA|y"><field name="pin">AnalogPin.P0</field></shadow><block type="math_arithmetic" id="hOR5g9w4u5pVKvFCr%mB"><field name="OP">ADD</field><value name="A"><shadow type="math_number" id="kFDrdubg`^IE@b`jbWDv"><field name="NUM">0</field></shadow><block type="variables_get" id="@$X$!(cfF.oH@Cr@ro$M"><field name="VAR" id="]Ye$;p[V_,`~4%BjKUhg">index4</field></block></value><value name="B"><shadow type="math_number" id="M_H2*sjQu$tNE9iK6Lls"><field name="NUM">100</field></shadow></value></block></value><value name="value"><shadow type="math_number_minmax" id="3Q`e#Cw4Pg_UqIgZo6dt"><mutation min="0" max="1023" precision="0"></mutation><field name="SLIDER">0</field></shadow></value></block></statement></block></next></block></next></block></statement></block><block type="function_definition" id="96)1NkQJLicP1b.ix4V6" x="1030" y="2074"><mutation name="PinAnalogInputTest" functionid="bwZK@kl#u117DsDoGuYk"></mutation><field name="function_name">PinAnalogInputTest</field><statement name="STACK"><block type="typescript_statement" id="(Z}9UHT0t+Nh$[+:,6?X"><mutation xmlns="http://www.w3.org/1999/xhtml" line0="level = ((Math.max(pins.analogReadPin(AnalogPin.P0), Math.max(pins.analogReadPin(AnalogReadWritePin.P1), pins.analogReadPin(AnalogReadWritePin.P2)))) / (1023/25))|0" numlines="1"></mutation><next><block type="pxt_controls_for" id="yfwhoNS*Z;u$2ciYcQ#h"><value name="VAR"><block type="variables_get_reporter" id=":ctw=QuuMt84:]-W,|n+"><mutation duplicateondrag="true"></mutation><field name="VAR" id="%5yLb1mykO;OaQcJt/;a">index2</field></block></value><value name="TO"><shadow type="math_whole_number" id="nL-FjtE:k,HqkdP6uGfC"><field name="NUM">0</field></shadow><block type="variables_get" id="[1^[y.[j]FA@HPcgO?M/"><field name="VAR" id="HS~o~Vq2U+[*2Y55!`Ah">level</field></block></value><statement name="DO"><block type="device_plot" id="^eZxbOMZB8}EE$Nw7gdc"><value name="x"><shadow type="math_number_minmax" id="R+#smJ(vB[9A9BozgfDl"><mutation min="0" max="4" precision="0"></mutation><field name="SLIDER">0</field></shadow><block type="math_modulo" id="=W2hIG[k+~$FQ,2b|szx"><value name="DIVIDEND"><shadow type="math_number" id="j}[:ZXoHN=0HO{9)z2Y;"><field name="NUM">0</field></shadow><block type="variables_get" id="JD|Ui-`4U86YS9.y;qIw"><field name="VAR" id="%5yLb1mykO;OaQcJt/;a">index2</field></block></value><value name="DIVISOR"><shadow type="math_number" id=")C5uQA^f5xCC?tu82lIx"><field name="NUM">5</field></shadow></value></block></value><value name="y"><shadow type="math_number_minmax" id="n)zBT%b?ZjD_b(!,r_rq"><mutation min="0" max="4" precision="0"></mutation><field name="SLIDER">0</field></shadow><block type="typescript_expression" id="yumj=06V08IxA:=8Q*Rs"><field name="EXPRESSION">(index2/5)|0</field></block></value></block></statement></block></next></block></statement></block></xml>