# pybricks blocks file:{"blocks":{"languageVersion":0,"blocks":[{"type":"blockGlobalSetup","id":"bjK,wS1MYO7aiYkFSwd{","x":0,"y":0,"deletable":false,"next":{"block":{"type":"variables_set_inventor_hub","id":"Z/pHYu9h7AeuU8ZnO4Hr","extraState":{"optionLevel":3},"fields":{"VAR":{"id":"%X)Wy1ltRV~N^(F]C]vj"},"FIELDBROADCAST":6,"FIELDOBSERVE0":5},"inputs":{"AXIS_TOP":{"shadow":{"type":"blockParametersAxis","id":"v`]s!=u)aLOxng9)wzs#","fields":{"VALUE":"z"}}},"AXIS_FRONT":{"shadow":{"type":"blockParametersAxis","id":"?c%ynS22OQ4m0Quh%f%w","fields":{"VALUE":"x"}}}},"next":{"block":{"type":"variables_set_motor","id":"6;61}r0X~#vnR}gewURv","fields":{"VAR":{"id":"~dh=1V3w@V)s^ifgyM0l"}},"inputs":{"PORT":{"shadow":{"type":"blockParametersPort","id":"yt;SGUOzdu%mRYqMW[!^","fields":{"NAME":"A"}}},"POSITIVE_DIRECTION":{"shadow":{"type":"blockParametersDirection","id":"If7h4q;0BL?1}qH$~^%g","fields":{"SELECTION":"Direction.CLOCKWISE"}}}},"next":{"block":{"type":"variables_set_motor","id":"%mF|s##vj,iW~?BNTAV#","fields":{"VAR":{"id":"*fQ}QAZp,;0Mt?0U4#36"}},"inputs":{"PORT":{"shadow":{"type":"blockParametersPort","id":"pJtC`]A$B=_hz/B44t{@","fields":{"NAME":"B"}}},"POSITIVE_DIRECTION":{"shadow":{"type":"blockParametersDirection","id":"k|^aY*,XaJ|#NKstk:8j","fields":{"SELECTION":"Direction.CLOCKWISE"}}}},"next":{"block":{"type":"variables_set_color_sensor","id":"pI%b{Gd]7?Fib:OpvNeI","extraState":{"optionLevel":0},"fields":{"VAR":{"id":")X7p)SDt#N/oZOlKdjS-"}},"inputs":{"PORT":{"shadow":{"type":"blockParametersPort","id":"Yc}jr`}n~SMB4s/=$,zx","fields":{"NAME":"C"}}}},"next":{"block":{"type":"variables_set_color_light_matrix","id":"09lm`SYoY}6S]b2q[|Lm","fields":{"VAR":{"id":"g,l)-e;j#AmK=?V2lMLm"}},"inputs":{"PORT":{"shadow":{"type":"blockParametersPort","id":"xGu$hZlbb[#:DDMR/[=J","fields":{"NAME":"D"}}}},"next":{"block":{"type":"variables_setup_any","id":"b;r(s94[HOdo^.gzB;2n","fields":{"VAR":{"id":"E-#mWDO;{1XX-Euz7!ZA"}},"inputs":{"VALUE0":{"shadow":{"type":"blockMathNumber","id":"SU;UN33nxNi6J.:cnp$Q","fields":{"NUM":0}},"block":{"type":"blockLogicTrueFalse","id":"GnoM^/l.V-QWgG)6=te`","fields":{"BOOL":"FALSE"}}}},"next":{"block":{"type":"variables_setup_any","id":"YcV;e9zSKou_c9k4/+Z`","fields":{"VAR":{"id":"A-m%:pS]Rx~DmS@?@QzR"}},"inputs":{"VALUE0":{"shadow":{"type":"blockMathNumber","id":"~REZOIIz#C,7QLPqrG9?","fields":{"NUM":0}},"block":{"type":"blockLogicTrueFalse","id":"AIVgu1[,PDg5f=8/mo^$","fields":{"BOOL":"FALSE"}}}},"next":{"block":{"type":"variables_setup_any","id":"xyNE`q*jmGtJ!iNLbHa^","fields":{"VAR":{"id":"ib`O|sVi`jGH8a/N*Hd1"}},"inputs":{"VALUE0":{"shadow":{"type":"blockMathNumber","id":"iG;oo?Nw6`p*oca9?h[T","fields":{"NUM":0}},"block":{"type":"blockLogicTrueFalse","id":")8UjO3U(7~_VZA0{5DKj","fields":{"BOOL":"FALSE"}}}},"next":{"block":{"type":"variables_setup_any","id":"z3[YnW3=)=3.XqjrzgBc","fields":{"VAR":{"id":"4wz7K1a0qLRJtB]/;tsy"}},"inputs":{"VALUE0":{"shadow":{"type":"blockMathNumber","id":"1e`Qe*k`GW7`5}A-y!Fv","fields":{"NUM":0}},"block":{"type":"blockLogicTrueFalse","id":"};h2o7#:tq,r|CjsJL0$","fields":{"BOOL":"FALSE"}}}},"next":{"block":{"type":"variables_setup_any","id":"lK|(VC}pc+n-ZL.ga4)u","fields":{"VAR":{"id":"gjF?36L8P8oaT=KnEg6s"}},"inputs":{"VALUE0":{"shadow":{"type":"blockMathNumber","id":"yZ#L8E]]]H=bI.rtq0-g","fields":{"NUM":0}},"block":{"type":"blockLogicTrueFalse","id":"0j%7epNt`!1Ppiswdqnk","fields":{"BOOL":"FALSE"}}}},"next":{"block":{"type":"variables_setup_any","id":"}lEG:$H.HN_V3d0yKcNE","fields":{"VAR":{"id":"z{1.4{SgkT!`7:A4v5C$"}},"inputs":{"VALUE0":{"shadow":{"type":"blockMathNumber","id":":d:sf:{AdJHeU~[fczVC","fields":{"NUM":0}},"block":{"type":"blockLogicTrueFalse","id":"=@c@`Z}kXWGi%$)Hw#S^","fields":{"BOOL":"FALSE"}}}},"next":{"block":{"type":"variables_setup_any","id":"qlJ66WR*d%`wYH}GYB0o","fields":{"VAR":{"id":"f[qogEs]RCHzmPwo9*(Z"}},"inputs":{"VALUE0":{"shadow":{"type":"blockMathNumber","id":"(U00lcj+(z)di;{K[2)@","fields":{"NUM":0}}}},"next":{"block":{"type":"variables_setup_any","id":"CQXJi(0Tur`Wr2.`maa[","fields":{"VAR":{"id":"c?tz^6}zmHD;o?i_gr;s"}},"inputs":{"VALUE0":{"shadow":{"type":"blockMathNumber","id":"^~d{X*Z*+?Sq@DtO*J:J","fields":{"NUM":0}}}},"next":{"block":{"type":"variables_setup_any","id":"1!QBJ7.)*]%L:tO^DSH9","fields":{"VAR":{"id":"%7IAk7Kg#0?nc_!L_NXd"}},"inputs":{"VALUE0":{"shadow":{"type":"blockMathNumber","id":"q(]oNhd:nJTS?KCr9YB(","fields":{"NUM":1}}}},"next":{"block":{"type":"variables_setup_any","id":"9k`jNNz-bOhQ~KSK3ADh","fields":{"VAR":{"id":"2/Bvx)IcPIg(HFXIM9QI"}},"inputs":{"VALUE0":{"shadow":{"type":"blockMathNumber","id":"mm5to=(]IBt/z=M6s0T)","fields":{"NUM":2}}}},"next":{"block":{"type":"variables_setup_any","id":"[F1M#JgBS!.v$k14p`_h","fields":{"VAR":{"id":"TXi@z)BXoCB:qSRP4`7b"}},"inputs":{"VALUE0":{"shadow":{"type":"blockMathNumber","id":"?{,b;3Tla1Ft2T2nFhTi","fields":{"NUM":3}}}},"next":{"block":{"type":"variables_setup_any","id":"t~Cl+!xrnJ7QwFC*7-N=","fields":{"VAR":{"id":"(X?$f(]O,7PqGn)#NlDQ"}},"inputs":{"VALUE0":{"shadow":{"type":"blockMathNumber","id":"/.+kw?5]Dr^[c~G?LDjY","fields":{"NUM":0}},"block":{"type":"blockListCreate","id":"UlaxCLyZ}v8].E)GSzHq","extraState":{"optionLevel":6},"inputs":{"ADD0":{"shadow":{"type":"blockMathNumber","id":"@djOuEeC,k3swBGj2/+t","fields":{"NUM":0}},"block":{"type":"blockLogicTrueFalse","id":"F]%}9=$7as^q,0+Q9dzC","fields":{"BOOL":"FALSE"}}},"ADD1":{"shadow":{"type":"blockMathNumber","id":"S1l6a%Cc$iCjpr}(sMBL","fields":{"NUM":0}},"block":{"type":"blockLogicTrueFalse","id":"96DU*M#7RUQpK+cU|A=m","fields":{"BOOL":"FALSE"}}},"ADD2":{"shadow":{"type":"blockMathNumber","id":"$8Kr`*}mXZk2K`-lMXZ-","fields":{"NUM":0}},"block":{"type":"blockLogicTrueFalse","id":"h]8re*eG8T^G+F/HgO@L","fields":{"BOOL":"FALSE"}}},"ADD3":{"shadow":{"type":"blockMathNumber","id":"SnFU9x-`AV3atKS$/;2K","fields":{"NUM":0}},"block":{"type":"blockLogicTrueFalse","id":"7opiEt_*w8y:`yCv_+/(","fields":{"BOOL":"FALSE"}}},"ADD4":{"shadow":{"type":"blockMathNumber","id":"V3TWt)ypx:l}lPtDWzW7","fields":{"NUM":0}},"block":{"type":"blockLogicTrueFalse","id":"K3^t~Ui-Y%WG!,]ku{0}","fields":{"BOOL":"FALSE"}}},"ADD5":{"shadow":{"type":"blockMathNumber","id":"#_PEynIZoL9dHb7}QXB9","fields":{"NUM":0}},"block":{"type":"blockLogicTrueFalse","id":"T24o*RmHscdyAqPdA%`6","fields":{"BOOL":"FALSE"}}}}}}},"next":{"block":{"type":"variables_setup_any","id":"(7$7EFximXj+f;gOf-4Y","fields":{"VAR":{"id":"Jw}[?P7@nkpy=fE:UrNS"}},"inputs":{"VALUE0":{"shadow":{"type":"blockMathNumber","id":"]F_bB,zI}xv2s^?GrD?:","fields":{"NUM":0}}}},"next":{"block":{"type":"variables_setup_any","id":"AGpv{z9xL={Cg$-AMv(X","fields":{"VAR":{"id":"9JHT9C2Oscv!.jXqD0|2"}},"inputs":{"VALUE0":{"shadow":{"type":"blockMathNumber","id":"Q^D{ZA~S]]J_?m6iFr~A","fields":{"NUM":0}}}},"next":{"block":{"type":"variables_setup_any","id":"qCkwS3v=P]{7::_9g{mm","fields":{"VAR":{"id":"w%K:5E^u(:#yds.SPeys"}},"inputs":{"VALUE0":{"shadow":{"type":"blockMathNumber","id":"+t%?AyN5+d)Bi8R:$eZB","fields":{"NUM":99}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},{"type":"blockGlobalStart","id":"3tJe|AWl0baN(wH9a$@.","x":0,"y":3577,"deletable":false,"next":{"block":{"type":"blockComment","id":"n!:fwa{4PQo,)rs}FFaP","fields":{"FIELDNAME":"green hub\nbroadcast ch 6\nobserve ch 5"},"next":{"block":{"type":"blockFlowWhile","id":"8`-V{^?Zy0Z)BL_jxpe$","fields":{"MODE":"WHILE"},"inputs":{"BOOL":{"shadow":{"type":"blockLogicTrue","id":"r;Y,1/PV#ZH8k3AFf8uV"}},"DO":{"block":{"type":"blockComment","id":"O4fq1kN78eO?UP2y1Qk_","fields":{"FIELDNAME":"Get and unpack data sent from the other hub .\nThis unpack block sets the variables to 0 if there is no data."},"next":{"block":{"type":"blockListUnpack","id":"307ic~W}VYEwDztNSIKY","extraState":{"optionLevel":6},"inputs":{"LIST":{"shadow":{"type":"blockListEmpty","id":"l=^}qe#UvB)UHNWUQM^/"},"block":{"type":"blockBleObserve","id":"aT5{iImr0L]3fLyMS~2B","fields":{"CHANNEL":"5"},"inputs":{"VAR":{"shadow":{"type":"variables_get_ble_hub","id":"h8:I3q]{Z,#76xX!0@.t","fields":{"VAR":{"id":"%X)Wy1ltRV~N^(F]C]vj","name":"green_hub","type":"InventorHub"}}}}}}},"VAR":{"shadow":{"type":"variables_get_any","id":"iX^`ei`?E3|I5h,Pi|;;","fields":{"VAR":{"id":"f[qogEs]RCHzmPwo9*(Z","name":"status","type":"Any"}}}},"VAR0":{"shadow":{"type":"variables_get_any","id":"]|:8*jtILbfu/%Ow-Qkm","fields":{"VAR":{"id":"E-#mWDO;{1XX-Euz7!ZA","name":"FB_L","type":"Any"}}}},"VAR1":{"shadow":{"type":"variables_get_any","id":"gH]G_T6ye%Ca%_LddL%H","fields":{"VAR":{"id":"A-m%:pS]Rx~DmS@?@QzR","name":"FB_L_plus","type":"Any"}}}},"VAR2":{"shadow":{"type":"variables_get_any","id":"ERdB8^+(-Z}zXr+S:q)6","fields":{"VAR":{"id":"ib`O|sVi`jGH8a/N*Hd1","name":"FB_L_minus","type":"Any"}}}},"VAR3":{"shadow":{"type":"variables_get_any","id":"_/amJ!0fM%|T(XT^qZI+","fields":{"VAR":{"id":"4wz7K1a0qLRJtB]/;tsy","name":"FB_R","type":"Any"}}}},"VAR4":{"shadow":{"type":"variables_get_any","id":"rEAXKL_Az82JO5ls95eS","fields":{"VAR":{"id":"gjF?36L8P8oaT=KnEg6s","name":"FB_R_plus","type":"Any"}}}},"VAR5":{"shadow":{"type":"variables_get_any","id":"FV2R$nh_:vB8i:jQ^m!R","fields":{"VAR":{"id":"z{1.4{SgkT!`7:A4v5C$","name":"FB_R_minus","type":"Any"}}}}},"next":{"block":{"type":"blockVariableSetValue","id":"!~Qs^R`2?t7#=lC1He64","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"xri]88OZwL.u$f-|,L.;","fields":{"VAR":{"id":"(X?$f(]O,7PqGn)#NlDQ","name":"buttons","type":"Any"}}}},"VALUE0":{"shadow":{"type":"blockMathNumber","id":":HyIeVEr}lZ0Q,p*BI7!","fields":{"NUM":0}},"block":{"type":"blockListCreate","id":"E7]cEJEjutTw%1Hm4_`R","extraState":{"optionLevel":6},"inputs":{"ADD0":{"shadow":{"type":"blockMathNumber","id":"_t*I*R7A/l[S[|)(45px","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"QiY5#V]PCuu?|u:R]d1^","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"CHEUV87bNjbZv8T^6vY^","fields":{"VAR":{"id":"E-#mWDO;{1XX-Euz7!ZA","name":"FB_L","type":"Any"}}}}}}},"ADD1":{"shadow":{"type":"blockMathNumber","id":"tQ3:f~T]{q.S=_e7,*JU","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"_hyrlC*(/PXH5/hiMagP","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"w^d?3hY(%6q:)FybG5K4","fields":{"VAR":{"id":"A-m%:pS]Rx~DmS@?@QzR","name":"FB_L_plus","type":"Any"}}}}}}},"ADD2":{"shadow":{"type":"blockMathNumber","id":"HvYN-2m*e9v7ic(FAfyJ","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"hVEf.B#FRYQXI]bt{i0H","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"J-8+V|(IyH,W-*$%hHKK","fields":{"VAR":{"id":"ib`O|sVi`jGH8a/N*Hd1","name":"FB_L_minus","type":"Any"}}}}}}},"ADD3":{"shadow":{"type":"blockMathNumber","id":"9nL/g(z;KnkqHN*,F@MC","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"=!q=j2ZDFl)/x%TO6x`w","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"dz,w-~JN3OD-/%9P@?xq","fields":{"VAR":{"id":"4wz7K1a0qLRJtB]/;tsy","name":"FB_R","type":"Any"}}}}}}},"ADD4":{"shadow":{"type":"blockMathNumber","id":"7oW2Qfp1WjAnIsE-._ng","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"$BlE6KoUj.1.@2iva){N","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"{D05qDj+*d,TeBESsUF/","fields":{"VAR":{"id":"gjF?36L8P8oaT=KnEg6s","name":"FB_R_plus","type":"Any"}}}}}}},"ADD5":{"shadow":{"type":"blockMathNumber","id":"A9:njR}}nIfJsyo:,Sgk","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"1VjVYHh`;XhV[{!:m*Fh","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"p+H?NzP9XOYp*q3vGdn$","fields":{"VAR":{"id":"z{1.4{SgkT!`7:A4v5C$","name":"FB_R_minus","type":"Any"}}}}}}}}}}},"next":{"block":{"type":"blockFunctionCallerStatement","id":"TVhGtnHpGSF~10-G};#i","extraState":{"optionLevel":2},"fields":{"ICON":"TASK","VAR":{"id":"~EbB+w{_60m;uXMZ3y;y"}},"inputs":{"ARG0":{"shadow":{"type":"blockMathNumber","id":"5[s}SCx]E%,9lqv7z-W6","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"gz]-%@BXvG0wnp:.ig80","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"GRd-p6MA}wQAPV3e:!Rr","fields":{"VAR":{"id":"f[qogEs]RCHzmPwo9*(Z","name":"status","type":"Any"}}}}}}},"ARG1":{"shadow":{"type":"blockMathNumber","id":"bPn5E!E6v^%O}sLRxkZp","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"3(hC4D`~8So2*bCOaw9]","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"Z(NQY^^uR%py.0);uDFs","fields":{"VAR":{"id":"(X?$f(]O,7PqGn)#NlDQ","name":"buttons","type":"Any"}}}}}}}},"next":{"block":{"type":"blockWaitTime","id":"p71K%-,jCE|~uxahVrOk","inputs":{"VALUE0":{"shadow":{"type":"unit_time","id":"[]qcYW%1cgo_bF@nw!h]","fields":{"VALUE0":50}}}}}}}}}}}}}}}}}}}},{"type":"variables_setup_function","id":"+FCBzDr?lj~T+i|?8het","x":-1,"y":988,"extraState":{"optionLevel":2},"fields":{"ICON":"TASK","VAR":{"id":"~EbB+w{_60m;uXMZ3y;y"}},"inputs":{"ARG0":{"shadow":{"type":"variables_setup_function_argument","id":"eGzao}|T^xmmCi*0M=4o","fields":{"VAR":{"id":"F{8,WBwEMOqA,no2=CEy","name":"new_status","type":"FunctionArgument"}}}},"ARG1":{"shadow":{"type":"variables_setup_function_argument","id":"*tyhC8c,AI#.Z/8dISPz","fields":{"VAR":{"id":"UR4R1[KUi:]kn0E*h[/A","name":"new_buttons","type":"FunctionArgument"}}}},"STACK":{"block":{"type":"blockFunctionCallerStatement","id":"=PF=us$.~T1-rF)d2K0.","extraState":{"optionLevel":1},"fields":{"ICON":"TASK","VAR":{"id":")_E9/kWw6rY4J|~JYAW?"}},"inputs":{"ARG0":{"shadow":{"type":"blockMathNumber","id":"+vg.bpK0kg429GLzJ`H.","fields":{"NUM":0}},"block":{"type":"variables_setup_function_argumentConstant","id":"t,5jfQ2;Xo~)EFNupV!;","fields":{"VAR":{"text":"new_buttons"}}}}},"next":{"block":{"type":"blockIfElse","id":"PQdHFbK;(ZM`8zpeL(]g","extraState":{"optionLevel":3},"inputs":{"IF0":{"shadow":{"type":"blockLogicTrue","id":"Jv{}Ob@{i@*).;q0:i~1"},"block":{"type":"blockLogicCompare","id":"4NJg~/.%-mw5f=B=1VW%","fields":{"OP1":"EQ"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":"}^e-YPPUvjFP~tcrl_C6","fields":{"NUM":3}},"block":{"type":"variables_setup_function_argumentConstant","id":"ZQc/HpoA;Y9^|A#c_Pxy","fields":{"VAR":{"text":"new_status"}}}},"B":{"shadow":{"type":"blockMathNumber","id":"~i)d!f[_Q^F:,9VW+:M{","fields":{"NUM":4}},"block":{"type":"blockVariableGetValue","id":"yNK,LlEly-Ca?=n-idW!","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"JFg0Jw9]EYlun[ajoa]p","fields":{"VAR":{"id":"c?tz^6}zmHD;o?i_gr;s","name":"status_white","type":"Any"}}}}}}}}}},"DO0":{"block":{"type":"blockFunctionCallerStatement","id":"V2tfB]*(d_WBz96qC4)#","extraState":{"optionLevel":1},"fields":{"ICON":"TASK","VAR":{"id":";l%;9FTIHvil|6XOe_ni"}},"inputs":{"ARG0":{"shadow":{"type":"blockMathNumber","id":"s10xi)nca[#`(Xe:?7DC","fields":{"NUM":0}},"block":{"type":"variables_setup_function_argumentConstant","id":"@9H$8Ahheu]Oo]48Ps3x","fields":{"VAR":{"text":"new_buttons"}}}}}}},"IF1":{"shadow":{"type":"blockLogicTrue","id":"QI305ZkC%N`l3PdKc$1a"},"block":{"type":"blockLogicCompare","id":"chZr~4o=|ew#6)$L}bFr","fields":{"OP1":"EQ"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":"}^e-YPPUvjFP~tcrl_C6","fields":{"NUM":3}},"block":{"type":"variables_setup_function_argumentConstant","id":"9+yii?rT{y:mujETJ3Ia","fields":{"VAR":{"text":"new_status"}}}},"B":{"shadow":{"type":"blockMathNumber","id":"~i)d!f[_Q^F:,9VW+:M{","fields":{"NUM":4}},"block":{"type":"blockVariableGetValue","id":"n{PJPG)fBsl~DNPaz]U)","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"QGi;V4%J4xl:ugN7{P!`","fields":{"VAR":{"id":"%7IAk7Kg#0?nc_!L_NXd","name":"status_green","type":"Any"}}}}}}}}}},"DO1":{"block":{"type":"blockFunctionCallerStatement","id":".mtwxAS~TfRS}X)2u~Z9","extraState":{"optionLevel":1},"fields":{"ICON":"TASK","VAR":{"id":"gUhLMw-[for.4X18/w$t"}},"inputs":{"ARG0":{"shadow":{"type":"blockMathNumber","id":"FT#B882|RJ!pD5qk?#j;","fields":{"NUM":0}},"block":{"type":"variables_setup_function_argumentConstant","id":"Id~WlQ7mkL^6vEHoaXCd","fields":{"VAR":{"text":"new_buttons"}}}}}}},"IF2":{"shadow":{"type":"blockLogicTrue","id":"qXWVi-1HeRfg9)2fz!!k"},"block":{"type":"blockLogicCompare","id":"@V*o]}8t78G$7-zq$*R%","fields":{"OP1":"EQ"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":"iECS%KbOY7-/.aw~,wg}","fields":{"NUM":3}},"block":{"type":"variables_setup_function_argumentConstant","id":"Lf;v!q^h5|p,Pgy5p9]C","fields":{"VAR":{"text":"new_status"}}}},"B":{"shadow":{"type":"blockMathNumber","id":"~i)d!f[_Q^F:,9VW+:M{","fields":{"NUM":4}},"block":{"type":"blockVariableGetValue","id":"a.XI$:et);0K1}Ui76K*","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"VY7@=|$X`bIt(/K1w=G(","fields":{"VAR":{"id":"2/Bvx)IcPIg(HFXIM9QI","name":"status_yellow","type":"Any"}}}}}}}}}},"DO2":{"block":{"type":"blockFunctionCallerStatement","id":"bYT*b.}O,L.E@}1V_asC","extraState":{"optionLevel":1},"fields":{"ICON":"TASK","VAR":{"id":"HmT1U/pPgM@/A)$AlyDU"}},"inputs":{"ARG0":{"shadow":{"type":"blockMathNumber","id":"5t(T([P8t;}dY2@sW@hU","fields":{"NUM":0}},"block":{"type":"variables_setup_function_argumentConstant","id":"@xc?0%7vTS89Oa/DE=ak","fields":{"VAR":{"text":"new_buttons"}}}}}}},"ELSE":{"block":{"type":"blockFunctionCallerStatement","id":"hONN#=G8y6q58Zjf/E+=","extraState":{"optionLevel":1},"fields":{"ICON":"TASK","VAR":{"id":"FvS9[v38RD!$2sEMo63N"}},"inputs":{"ARG0":{"shadow":{"type":"blockMathNumber","id":"Uvr^fo!f+]=6P5_N}+gt","fields":{"NUM":0}},"block":{"type":"variables_setup_function_argumentConstant","id":"ZI}JOTDS3XwUm9S@K0xc","fields":{"VAR":{"text":"new_buttons"}}}}}}}}}}}}}},{"type":"variables_setup_function","id":"s)I1v:;1.s|1ih~$Ya{f","x":0,"y":3073,"extraState":{"optionLevel":1},"fields":{"ICON":"TASK","VAR":{"id":"gUhLMw-[for.4X18/w$t"}},"inputs":{"ARG0":{"shadow":{"type":"variables_setup_function_argument","id":"@H-[1Q!;w:1TaTAUjNZ8","fields":{"VAR":{"id":"(hIps([1wfyl~,O(au?=","name":"_buttons","type":"FunctionArgument"}}}},"STACK":{"block":{"type":"blockLightOnColor","id":"$a|KceGK/Bus^FW5fQz]","extraState":{"optionLevel":1},"fields":{"METHOD":"LIGHT_ON"},"inputs":{"VAR":{"shadow":{"type":"variables_get_color_light_device","id":",T,fB##Hn;.+iwHcuF-r","fields":{"VAR":{"id":"%X)Wy1ltRV~N^(F]C]vj","name":"green_hub","type":"InventorHub"}}}},"COLOR":{"shadow":{"type":"variables_get_color","id":"nf`~U#$]0^%{~|_9b67E","fields":{"COLOUR":"#00ff00","VAR":{"id":"LdjQT~Ml2GuM_+|EZ~g1","name":"green","type":"ColorDef"}}}}}}}}},{"type":"variables_setup_function","id":"fZ:ne|Ua1Bm6V$W,3piZ","x":0,"y":2904,"extraState":{"optionLevel":1},"fields":{"ICON":"TASK","VAR":{"id":";l%;9FTIHvil|6XOe_ni"}},"inputs":{"ARG0":{"shadow":{"type":"variables_setup_function_argument","id":"iBxH7^@heF%JkI:sb5uE","fields":{"VAR":{"id":"(hIps([1wfyl~,O(au?=","name":"_buttons","type":"FunctionArgument"}}}},"STACK":{"block":{"type":"blockLightOnColor","id":"xb1i.XE@;NNs%@]CUl6G","extraState":{"optionLevel":1},"fields":{"METHOD":"LIGHT_ON"},"inputs":{"VAR":{"shadow":{"type":"variables_get_color_light_device","id":"(V.{jUq(j.$KKxQPSzv]","fields":{"VAR":{"id":"%X)Wy1ltRV~N^(F]C]vj","name":"green_hub","type":"InventorHub"}}}},"COLOR":{"shadow":{"type":"variables_get_color","id":"NA%,QA$$+[[[55,V4u[Q","fields":{"COLOUR":"#ffffff","VAR":{"id":"{!uADpR8rk-W8czs#15@","name":"white","type":"ColorDef"}}}}}}}}},{"type":"variables_setup_function","id":"C-[{Dz4S,mNDYo$7-?WW","x":0,"y":3241,"extraState":{"optionLevel":1},"fields":{"ICON":"TASK","VAR":{"id":"HmT1U/pPgM@/A)$AlyDU"}},"inputs":{"ARG0":{"shadow":{"type":"variables_setup_function_argument","id":"w$aHf^wVEuflz[5Wk_2F","fields":{"VAR":{"id":"(hIps([1wfyl~,O(au?=","name":"_buttons","type":"FunctionArgument"}}}},"STACK":{"block":{"type":"blockLightOnColor","id":"0r8C;UB:yQ/U^pZLqUf#","extraState":{"optionLevel":1},"fields":{"METHOD":"LIGHT_ON"},"inputs":{"VAR":{"shadow":{"type":"variables_get_color_light_device","id":"@fIf$u;iGRLXdq3#F-`;","fields":{"VAR":{"id":"%X)Wy1ltRV~N^(F]C]vj","name":"green_hub","type":"InventorHub"}}}},"COLOR":{"shadow":{"type":"variables_get_color","id":"[~CQiO?.OUsv=ePtZtYV","fields":{"COLOUR":"#ffff00","VAR":{"id":"^-?DoBmE{hfZo#E483p*","name":"yellow","type":"ColorDef"}}}}}}}}},{"type":"variables_setup_function","id":"vNi$A:44J,Hzo`2^Z]zz","x":0,"y":3409,"extraState":{"optionLevel":1},"fields":{"ICON":"TASK","VAR":{"id":"FvS9[v38RD!$2sEMo63N"}},"inputs":{"ARG0":{"shadow":{"type":"variables_setup_function_argument","id":"zeh#Tni.kNgYYF53:OJ[","fields":{"VAR":{"id":"(hIps([1wfyl~,O(au?=","name":"_buttons","type":"FunctionArgument"}}}},"STACK":{"block":{"type":"blockLightOnColor","id":"NJJOcZ1MB0!R5Spc]Q?r","extraState":{"optionLevel":1},"fields":{"METHOD":"LIGHT_ON"},"inputs":{"VAR":{"shadow":{"type":"variables_get_color_light_device","id":"]hv#D}C~Hq3sn(2+bnUn","fields":{"VAR":{"id":"%X)Wy1ltRV~N^(F]C]vj","name":"green_hub","type":"InventorHub"}}}},"COLOR":{"shadow":{"type":"variables_get_color","id":"kBCn`S[]6OTB6XC3F8]J","fields":{"COLOUR":"#ff0000","VAR":{"id":"_@,,jH-rTb79G2f/UavH","name":"red","type":"ColorDef"}}}}}}}}},{"type":"variables_setup_function","id":"5F$1OYACLb6rN2KMIOd7","x":0,"y":1545,"extraState":{"optionLevel":1},"fields":{"ICON":"TASK","VAR":{"id":")_E9/kWw6rY4J|~JYAW?"}},"inputs":{"ARG0":{"shadow":{"type":"variables_setup_function_argument","id":"TOfndGYgxcht/|bS=PR?","fields":{"VAR":{"id":"(hIps([1wfyl~,O(au?=","name":"_buttons","type":"FunctionArgument"}}}},"STACK":{"block":{"type":"blockVariableSetValue","id":"+H`hZ5xf7B(LM$8yrF[V","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"1[r}zXJ+$X/r0:`+uALw","fields":{"VAR":{"id":"Jw}[?P7@nkpy=fE:UrNS","name":"button_code","type":"Any"}}}},"VALUE0":{"shadow":{"type":"blockMathNumber","id":"H$LhJlt,Eb+qcPGG|6SB","fields":{"NUM":0}}}},"next":{"block":{"type":"blockIfElse","id":"Hf^~t)ux2[wPeY`e_3p$","extraState":{"optionLevel":0},"inputs":{"IF0":{"shadow":{"type":"blockLogicTrue","id":"r`qt`[uFwo-YGqd#M_1g"},"block":{"type":"blockListGet","id":"HJLT4z0s=7c?YBJ5|D0Q","extraState":{"optionLevel":1},"fields":{"METHOD":"LIST_GET_INDEX"},"inputs":{"LIST":{"shadow":{"type":"blockListEmpty","id":"tt+3]v@XiR{j}hWs/=;q"},"block":{"type":"variables_setup_function_argumentConstant","id":"Gs4Iofx/t3+B{}u?GzX;","fields":{"VAR":{"text":"_buttons"}}}},"ARG0":{"shadow":{"type":"blockMathNumber","id":"z%lP?))9@7WzD_w:@;/D","fields":{"NUM":1}}}}}},"DO0":{"block":{"type":"blockComment","id":";nT=!yj*UFEb!^v|E]@N","fields":{"FIELDNAME":"left plus button"},"next":{"block":{"type":"blockVariableSetValue","id":"xb652~|sxefHvCAM_I;*","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":".@3nYD!tKAp5#!l`6G%c","fields":{"VAR":{"id":"Jw}[?P7@nkpy=fE:UrNS","name":"button_code","type":"Any"}}}},"VALUE0":{"shadow":{"type":"blockMathNumber","id":"oCX%E2-|:P#pXk6cIED:","fields":{"NUM":1}},"block":{"type":"blockMathArithmetic","id":"*C76GW[O$(`]4jv6mD!$","fields":{"OP":"ADD"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":"cjWKq*8`YJ`ze6Qj*PO=","fields":{"NUM":1}},"block":{"type":"blockVariableGetValue","id":"se`RV(chnq.A#w`1Y[Y8","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"5kuMLERjbTA*/Me!J:jx","fields":{"VAR":{"id":"Jw}[?P7@nkpy=fE:UrNS","name":"button_code","type":"Any"}}}}}}},"B":{"shadow":{"type":"blockMathNumber","id":"6YFgCBuA;:TTgT3E,qVj","fields":{"NUM":1}}}}}}}}}}}},"next":{"block":{"type":"blockIfElse","id":"(BYj7e?Hi.QC[7O2$}EI","extraState":{"optionLevel":0},"inputs":{"IF0":{"shadow":{"type":"blockLogicTrue","id":"r`qt`[uFwo-YGqd#M_1g"},"block":{"type":"blockListGet","id":"tx)$iwMy[c`ns+D@*{hk","extraState":{"optionLevel":1},"fields":{"METHOD":"LIST_GET_INDEX"},"inputs":{"LIST":{"shadow":{"type":"blockListEmpty","id":"tt+3]v@XiR{j}hWs/=;q"},"block":{"type":"variables_setup_function_argumentConstant","id":"@eu+aDyrv)o`Nr@46qn$","fields":{"VAR":{"text":"_buttons"}}}},"ARG0":{"shadow":{"type":"blockMathNumber","id":"%v?Wz;7o!}qf)2/sbvU0","fields":{"NUM":0}}}}}},"DO0":{"block":{"type":"blockComment","id":"F:KRs0C)!I/[cZq;zC|B","fields":{"FIELDNAME":"left button"},"next":{"block":{"type":"blockVariableSetValue","id":"eNBlcq,,VrM^DrV~h[4N","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":")]Gg.;A}j/devf7jTw2h","fields":{"VAR":{"id":"Jw}[?P7@nkpy=fE:UrNS","name":"button_code","type":"Any"}}}},"VALUE0":{"shadow":{"type":"blockMathNumber","id":"*KUz6/t@_g5,,ilXIJc|","fields":{"NUM":2}},"block":{"type":"blockMathArithmetic","id":"z,TKIx(*3#nn;SRaJw*R","fields":{"OP":"ADD"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":"cjWKq*8`YJ`ze6Qj*PO=","fields":{"NUM":1}},"block":{"type":"blockVariableGetValue","id":";mVYJ[q-KWzIx0Plg`p/","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"R~xP4?{ovZdMAO|BQlix","fields":{"VAR":{"id":"Jw}[?P7@nkpy=fE:UrNS","name":"button_code","type":"Any"}}}}}}},"B":{"shadow":{"type":"blockMathNumber","id":"|v4m3R;jyw/:a:S;`]?J","fields":{"NUM":2}}}}}}}}}}}},"next":{"block":{"type":"blockIfElse","id":",`w}/Ls)B:Z4TIaN`525","extraState":{"optionLevel":0},"inputs":{"IF0":{"shadow":{"type":"blockLogicTrue","id":"r`qt`[uFwo-YGqd#M_1g"},"block":{"type":"blockListGet","id":"i/K%g?0nHsl~7hJtSoBi","extraState":{"optionLevel":1},"fields":{"METHOD":"LIST_GET_INDEX"},"inputs":{"LIST":{"shadow":{"type":"blockListEmpty","id":"tt+3]v@XiR{j}hWs/=;q"},"block":{"type":"variables_setup_function_argumentConstant","id":"NMjyqH;_gli5piP@SX.:","fields":{"VAR":{"text":"_buttons"}}}},"ARG0":{"shadow":{"type":"blockMathNumber","id":"UhhWqNpt_qV}v$S{Dad;","fields":{"NUM":2}}}}}},"DO0":{"block":{"type":"blockComment","id":"ST9rkFgsq=kw#9_czCSq","fields":{"FIELDNAME":"left minus button"},"next":{"block":{"type":"blockVariableSetValue","id":",Ho/bXq/d6mWRP#XFRkI","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"P]g6ejc,4gEO+*P5YjJ*","fields":{"VAR":{"id":"Jw}[?P7@nkpy=fE:UrNS","name":"button_code","type":"Any"}}}},"VALUE0":{"shadow":{"type":"blockMathNumber","id":"oCX%E2-|:P#pXk6cIED:","fields":{"NUM":1}},"block":{"type":"blockMathArithmetic","id":",VQg^L[jzD?4Lh^iP#el","fields":{"OP":"ADD"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":"cjWKq*8`YJ`ze6Qj*PO=","fields":{"NUM":1}},"block":{"type":"blockVariableGetValue","id":"Rm4)91QPwVxJ%)A0o,u?","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"|U=RUvg^Iq7V^?6xD;fo","fields":{"VAR":{"id":"Jw}[?P7@nkpy=fE:UrNS","name":"button_code","type":"Any"}}}}}}},"B":{"shadow":{"type":"blockMathNumber","id":"p6K/*!F,!odRXf^A8{WT","fields":{"NUM":4}}}}}}}}}}}},"next":{"block":{"type":"blockComment","id":"n:pA+?lpU4*7Ofs:Y)M+","fields":{"FIELDNAME":"multiply by ten to shift to the left"},"next":{"block":{"type":"blockVariableSetValue","id":"r=(%Dvx$xgc`Pp+@R;}$","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"dxE^nFZtM@z}-{A]_wUr","fields":{"VAR":{"id":"Jw}[?P7@nkpy=fE:UrNS","name":"button_code","type":"Any"}}}},"VALUE0":{"shadow":{"type":"blockMathNumber","id":"oCX%E2-|:P#pXk6cIED:","fields":{"NUM":1}},"block":{"type":"blockMathArithmetic","id":"nsT(abO%R^Ik8_tt(1yk","fields":{"OP":"MULTIPLY"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":"cjWKq*8`YJ`ze6Qj*PO=","fields":{"NUM":1}},"block":{"type":"blockVariableGetValue","id":"}kP8:)3tjV_7b4:dFSn9","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"r^)!6EhP=uE!G6{5U%A[","fields":{"VAR":{"id":"Jw}[?P7@nkpy=fE:UrNS","name":"button_code","type":"Any"}}}}}}},"B":{"shadow":{"type":"blockMathNumber","id":"s^rQ}J^[n:U7Mv,XgPm*","fields":{"NUM":10}}}}}}},"next":{"block":{"type":"blockIfElse","id":"_2w]eQ6)R1J-nDJ6+ZUh","extraState":{"optionLevel":0},"inputs":{"IF0":{"shadow":{"type":"blockLogicTrue","id":"r`qt`[uFwo-YGqd#M_1g"},"block":{"type":"blockListGet","id":"y7+,Hz3)HFkF2?tJin8B","extraState":{"optionLevel":1},"fields":{"METHOD":"LIST_GET_INDEX"},"inputs":{"LIST":{"shadow":{"type":"blockListEmpty","id":"tt+3]v@XiR{j}hWs/=;q"},"block":{"type":"variables_setup_function_argumentConstant","id":"PXV`V@QvH.[j;:TnO+T)","fields":{"VAR":{"text":"_buttons"}}}},"ARG0":{"shadow":{"type":"blockMathNumber","id":"1`*aQe`uh7!BoQ$AtiC!","fields":{"NUM":4}}}}}},"DO0":{"block":{"type":"blockComment","id":"~+:06W4.B|9;`99[YvUz","fields":{"FIELDNAME":"right plus button"},"next":{"block":{"type":"blockVariableSetValue","id":"xRRXh!HI9X|n~n:+pW+P","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"B*zEA=Am,BaLP8W?)6u,","fields":{"VAR":{"id":"Jw}[?P7@nkpy=fE:UrNS","name":"button_code","type":"Any"}}}},"VALUE0":{"shadow":{"type":"blockMathNumber","id":"oCX%E2-|:P#pXk6cIED:","fields":{"NUM":1}},"block":{"type":"blockMathArithmetic","id":"P`/,]}d*HR*q=`ALvDKc","fields":{"OP":"ADD"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":"cjWKq*8`YJ`ze6Qj*PO=","fields":{"NUM":1}},"block":{"type":"blockVariableGetValue","id":"a%ziqA3(`72f|]TjVby(","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"dk5v10/b3$~+5^*WL`.v","fields":{"VAR":{"id":"Jw}[?P7@nkpy=fE:UrNS","name":"button_code","type":"Any"}}}}}}},"B":{"shadow":{"type":"blockMathNumber","id":"EWcl.D$lS(5~R|u]1IQJ","fields":{"NUM":1}}}}}}}}}}}},"next":{"block":{"type":"blockIfElse","id":"]jRwR`~FK?e0/5kvLMHP","extraState":{"optionLevel":0},"inputs":{"IF0":{"shadow":{"type":"blockLogicTrue","id":"r`qt`[uFwo-YGqd#M_1g"},"block":{"type":"blockListGet","id":"4Buo!-ufpGc#:z|!%3[l","extraState":{"optionLevel":1},"fields":{"METHOD":"LIST_GET_INDEX"},"inputs":{"LIST":{"shadow":{"type":"blockListEmpty","id":"tt+3]v@XiR{j}hWs/=;q"},"block":{"type":"variables_setup_function_argumentConstant","id":"DUw7tJ{09UIE-s7+^|Il","fields":{"VAR":{"text":"_buttons"}}}},"ARG0":{"shadow":{"type":"blockMathNumber","id":"d6vW./s}9oyKi@(XGSM+","fields":{"NUM":3}}}}}},"DO0":{"block":{"type":"blockComment","id":"mo@Imp$yx#;Q(R-J0*kM","fields":{"FIELDNAME":"right bitton"},"next":{"block":{"type":"blockVariableSetValue","id":"*R.m$?Lu@xw9CehrN^r(","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"A8BUG}S8*Tv+^scl.W4[","fields":{"VAR":{"id":"Jw}[?P7@nkpy=fE:UrNS","name":"button_code","type":"Any"}}}},"VALUE0":{"shadow":{"type":"blockMathNumber","id":"*KUz6/t@_g5,,ilXIJc|","fields":{"NUM":2}},"block":{"type":"blockMathArithmetic","id":"u#byXJI?#x5]|KAivqT$","fields":{"OP":"ADD"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":"cjWKq*8`YJ`ze6Qj*PO=","fields":{"NUM":1}},"block":{"type":"blockVariableGetValue","id":"sEFT@F_4J/Z*a~d8s%_9","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"Y!KZZ~)jlH_oXpffG5!,","fields":{"VAR":{"id":"Jw}[?P7@nkpy=fE:UrNS","name":"button_code","type":"Any"}}}}}}},"B":{"shadow":{"type":"blockMathNumber","id":"(mpZ7d+i40Vw3!7A1[%=","fields":{"NUM":2}}}}}}}}}}}},"next":{"block":{"type":"blockIfElse","id":"qcxIC:NJv+gM9a,T5{;S","extraState":{"optionLevel":0},"inputs":{"IF0":{"shadow":{"type":"blockLogicTrue","id":"r`qt`[uFwo-YGqd#M_1g"},"block":{"type":"blockListGet","id":"HN[flTYNks*4CxyEyeux","extraState":{"optionLevel":1},"fields":{"METHOD":"LIST_GET_INDEX"},"inputs":{"LIST":{"shadow":{"type":"blockListEmpty","id":"tt+3]v@XiR{j}hWs/=;q"},"block":{"type":"variables_setup_function_argumentConstant","id":"`*Qb*3@(/Z4^/D6|kI2{","fields":{"VAR":{"text":"_buttons"}}}},"ARG0":{"shadow":{"type":"blockMathNumber","id":"NJ8wWH*@N*DUFIVm3t=S","fields":{"NUM":5}}}}}},"DO0":{"block":{"type":"blockComment","id":"=L1]%3w8`c4`EZfy=^1k","fields":{"FIELDNAME":"right minus button"},"next":{"block":{"type":"blockVariableSetValue","id":"_C;QXB:5wFcr@G}fPv`w","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"7FE:VH{}smx|Tgj2Kh#c","fields":{"VAR":{"id":"Jw}[?P7@nkpy=fE:UrNS","name":"button_code","type":"Any"}}}},"VALUE0":{"shadow":{"type":"blockMathNumber","id":"oCX%E2-|:P#pXk6cIED:","fields":{"NUM":1}},"block":{"type":"blockMathArithmetic","id":";QR=IK$7=V4iGw=oTAh$","fields":{"OP":"ADD"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":"cjWKq*8`YJ`ze6Qj*PO=","fields":{"NUM":1}},"block":{"type":"blockVariableGetValue","id":"?z|}h[vnE$kKw)*SgT%5","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"Tt%{v0o-mCc?7s)0{TQw","fields":{"VAR":{"id":"Jw}[?P7@nkpy=fE:UrNS","name":"button_code","type":"Any"}}}}}}},"B":{"shadow":{"type":"blockMathNumber","id":":-=NJ:S767WI[~o:t[Pt","fields":{"NUM":4}}}}}}}}}}}},"next":{"block":{"type":"blockLightMatrixDo","id":"F$Twv|+o|b_/wSm9s(eE","extraState":{"optionLevel":1},"fields":{"METHOD":"LIGHT_MATRIX_NUMBER"},"inputs":{"VAR":{"shadow":{"type":"variables_get_light_matrix_hub","id":"0_2RdQrm3,Bsr=nM]n!~","fields":{"VAR":{"id":"%X)Wy1ltRV~N^(F]C]vj","name":"green_hub","type":"InventorHub"}}}},"ARG0":{"shadow":{"type":"blockMathNumber","id":"zQpGpf!8j5SQ$Q4`JjfM","fields":{"NUM":42}},"block":{"type":"blockVariableGetValue","id":"ZmZ!`;4bi|t,]~/}vB6Q","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"Ul6#|lE);CLt5wiHExCE","fields":{"VAR":{"id":"Jw}[?P7@nkpy=fE:UrNS","name":"button_code","type":"Any"}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},{"type":"blockGlobalStart","id":"?yzEa?A+?#~Q8oVL81DY","x":0,"y":4116,"next":{"block":{"type":"blockFlowWhile","id":"Bb1dD(YGr|Syz~vT(DT3","fields":{"MODE":"WHILE"},"inputs":{"BOOL":{"shadow":{"type":"blockLogicTrue","id":"~I?Sr-015k**_b1y{E8."}},"DO":{"block":{"type":"blockPrint","id":"LZ8P_F?wsvW6jnr=~)%@","extraState":{"optionLevel":5},"fields":{"SEP":"SEP_SPACE"},"inputs":{"TEXT0":{"shadow":{"type":"text","id":"jTOza}N;hO{Q~?Ft/h{4","fields":{"TEXT":"LED status:"}}},"TEXT1":{"shadow":{"type":"text","id":"o!-byid!4P1yMaMtuP3E","fields":{"TEXT":"abc"}},"block":{"type":"blockVariableGetValue","id":"[#bU~,E0%a[.mZ}mXgJ8","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"V2^cC%3AZ+_^6X~@kO0|","fields":{"VAR":{"id":"f[qogEs]RCHzmPwo9*(Z","name":"status","type":"Any"}}}}}}},"TEXT2":{"shadow":{"type":"text","id":"3;ET.S$@1^%7PG|A-dUx","fields":{"TEXT":"Tastencode 10-1 "}}},"TEXT3":{"shadow":{"type":"text","id":"{T}d:O$d*x3M{0p6c1E^","fields":{"TEXT":"abc"}},"block":{"type":"blockVariableGetValue","id":"=`![6@AV-nqm;kyHLtA?","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"W,btoot[aH%|T0S3YpeL","fields":{"VAR":{"id":"Jw}[?P7@nkpy=fE:UrNS","name":"button_code","type":"Any"}}}}}}},"TEXT4":{"shadow":{"type":"text","id":"IzC,ax~XvQd?0?U!AhmZ","fields":{"TEXT":"Color Sensor Farbe: "}}},"TEXT5":{"shadow":{"type":"text","id":"$ML}O/}NkBE+Vr!.q+4d","fields":{"TEXT":"abc"}},"block":{"type":"blockVariableGetValue","id":"OUjxaSzUxv@CY238bPG6","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"[6~%^U:Q]2Fu+DQ4=LTL","fields":{"VAR":{"id":"9JHT9C2Oscv!.jXqD0|2","name":"Farbe erkannt","type":"Any"}}}}}}}},"next":{"block":{"type":"blockWaitTime","id":"8jKP6Axa*!BWLX)0p7N8","inputs":{"VALUE0":{"shadow":{"type":"unit_time","id":"2@~:idq:D03u3@;%o*v[","fields":{"VALUE0":1000}}}}}}}}}}}},{"type":"blockGlobalStart","id":"|WZw;07l+^vb%PvyfqK0","x":0,"y":4386,"next":{"block":{"type":"blockMultiTask","id":"S(h}?[YmlWIZv|cdu,J;","extraState":{"optionLevel":3},"fields":{"METHOD":"MULTITASK_ALL"},"inputs":{"TASK0":{"block":{"type":"blockFlowWhile","id":"eT0SW#1hQPEHa3mc)H@,","fields":{"MODE":"WHILE"},"inputs":{"BOOL":{"shadow":{"type":"blockLogicTrue","id":"n[[Aw^f5/;bFy`g$g4pP"}},"DO":{"block":{"type":"blockIfElse","id":"pLc{eoj]Akgva|P[4Q!f","extraState":{"optionLevel":2},"inputs":{"IF0":{"shadow":{"type":"blockLogicTrue","id":"^PXy[bVdBI_*!O%@_gyO"},"block":{"type":"blockLogicOperation","id":"Q!{ylNb8HBV[x+jEdjA4","fields":{"OP":"AND"},"inputs":{"A":{"shadow":{"type":"blockLogicTrue","id":"JH%$}FPi+5pETl_V%#Vo"},"block":{"type":"blockLogicCompare","id":"M:l-ZU)|A.)XHzRW^vjB","fields":{"OP1":"EQ"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":"N`h||%rHk3QM|Xs!Cvw:","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"[@UzRRIA)$^{.Se|1$xp","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"9PH,]Rr2`CV-J6F#g|%B","fields":{"VAR":{"id":"Jw}[?P7@nkpy=fE:UrNS","name":"button_code","type":"Any"}}}}}}},"B":{"shadow":{"type":"blockMathNumber","id":"W|dLFF;,Yy3L7f`i}xyQ","fields":{"NUM":10}}}}}},"B":{"shadow":{"type":"blockLogicTrue","id":"I$O4k9^pd]wew+/x%1p."},"block":{"type":"blockLogicCompare","id":"p]{KTsQ0dK2y-IX?nQm}","fields":{"OP1":"EQ"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":"AR2x/XL$okDbm{8Idgl1","fields":{"NUM":0}}},"B":{"shadow":{"type":"blockMathNumber","id":"HhHxO8@[t3T6_$}LH)xT","fields":{"NUM":4}},"block":{"type":"blockVariableGetValue","id":"fVeybrK#A|7[0u%H#Y+p","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"JTD,0ye@T|^HNg`=ggMP","fields":{"VAR":{"id":"f[qogEs]RCHzmPwo9*(Z","name":"status","type":"Any"}}}}}}}}}}}}},"DO0":{"block":{"type":"blockMotorRun","id":"+M:}N:v{$,6{]jxvMY)n","extraState":{"optionLevel":1},"fields":{"METHOD":"MOTOR_RUN_FOR"},"inputs":{"VAR":{"shadow":{"type":"variables_get_motor_device","id":",ce$+OQFRZDuH#TSHzh`","fields":{"VAR":{"id":"~dh=1V3w@V)s^ifgyM0l","name":"Motor A","type":"Motor"}}}},"VALUE0":{"shadow":{"type":"unit_angularVelocity","id":"1z,|]+~+.c+Aa)R4W:YI","fields":{"VALUE0":500}}},"ANGLE":{"shadow":{"type":"unit_angle","id":"b@UMoEjcsI$Q,~(ji4_J","fields":{"VALUE0":90}}},"THEN":{"shadow":{"type":"parameters_stop_4","id":"?prBl7U1XvZ,R%yj@$t5","fields":{"VALUE":"Stop.BRAKE"}}}}}},"IF1":{"shadow":{"type":"blockLogicTrue","id":"n=I($^U8Beb!YW04%!+X"},"block":{"type":"blockLogicOperation","id":"(MmUu|v~VY8;}WMje)7{","fields":{"OP":"AND"},"inputs":{"A":{"shadow":{"type":"blockLogicTrue","id":"JH%$}FPi+5pETl_V%#Vo"},"block":{"type":"blockLogicCompare","id":"a0o*Wdbl*yhM0EX{7D_R","fields":{"OP1":"EQ"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":"N`h||%rHk3QM|Xs!Cvw:","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"/4uK;LLdK+q~_w]$,if_","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"{[V@+x)jm1Eb0HmB}+,q","fields":{"VAR":{"id":"Jw}[?P7@nkpy=fE:UrNS","name":"button_code","type":"Any"}}}}}}},"B":{"shadow":{"type":"blockMathNumber","id":";gyM?!02vj.wt,dH2B6;","fields":{"NUM":1}}}}}},"B":{"shadow":{"type":"blockLogicTrue","id":"I$O4k9^pd]wew+/x%1p."},"block":{"type":"blockLogicCompare","id":"e8G5tv]`lS$+fdhz}0.h","fields":{"OP1":"EQ"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":"8KVgfrfO6}-/51u@J)Rv","fields":{"NUM":0}}},"B":{"shadow":{"type":"blockMathNumber","id":"HhHxO8@[t3T6_$}LH)xT","fields":{"NUM":4}},"block":{"type":"blockVariableGetValue","id":"-8tDy3aQkd*v/9ts3Bv|","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"1DuP_n=UgBs^.]8P7UmF","fields":{"VAR":{"id":"f[qogEs]RCHzmPwo9*(Z","name":"status","type":"Any"}}}}}}}}}}}}},"DO1":{"block":{"type":"blockMotorRun","id":"Nyl~tN]EBYaE=*zz3yxE","extraState":{"optionLevel":1},"fields":{"METHOD":"MOTOR_RUN_FOR"},"inputs":{"VAR":{"shadow":{"type":"variables_get_motor_device","id":"#DlL:n]^bG-C-H[CcVt]","fields":{"VAR":{"id":"~dh=1V3w@V)s^ifgyM0l","name":"Motor A","type":"Motor"}}}},"VALUE0":{"shadow":{"type":"unit_angularVelocity","id":"3GbL%`=z!K8f@/EKfHf;","fields":{"VALUE0":500}}},"ANGLE":{"shadow":{"type":"unit_angle","id":"3;GYa_LnD7}cJ,A73umA","fields":{"VALUE0":-90}}},"THEN":{"shadow":{"type":"parameters_stop_4","id":"aJ+WgHmlz:!00u1q7V5?","fields":{"VALUE":"Stop.BRAKE"}}}}}}}}}}}},"TASK1":{"block":{"type":"blockFlowWhile","id":"u6lW9^FqDNMvl:a*[@qL","fields":{"MODE":"WHILE"},"inputs":{"BOOL":{"shadow":{"type":"blockLogicTrue","id":"n(?=6}v$W~s@xnjYN%iY"}},"DO":{"block":{"type":"blockIfElse","id":"uNljMGTsx88{sj|3@lDx","extraState":{"optionLevel":2},"inputs":{"IF0":{"shadow":{"type":"blockLogicTrue","id":"^PXy[bVdBI_*!O%@_gyO"},"block":{"type":"blockLogicOperation","id":"DT+h#4h1tWT|`K`lJ]_T","fields":{"OP":"AND"},"inputs":{"A":{"shadow":{"type":"blockLogicTrue","id":"JH%$}FPi+5pETl_V%#Vo"},"block":{"type":"blockLogicCompare","id":"2YJd+BZP=h0L@Zr7uk7?","fields":{"OP1":"EQ"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":"N`h||%rHk3QM|Xs!Cvw:","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"FAJd42A.0,k^6BxkFhLJ","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"-iy1Bf14bgboBgq$rd6Y","fields":{"VAR":{"id":"Jw}[?P7@nkpy=fE:UrNS","name":"button_code","type":"Any"}}}}}}},"B":{"shadow":{"type":"blockMathNumber","id":"u_ev,Cv1qaD_K.sR#hVE","fields":{"NUM":20}}}}}},"B":{"shadow":{"type":"blockLogicTrue","id":"I$O4k9^pd]wew+/x%1p."},"block":{"type":"blockLogicCompare","id":"8raAgD/5TfQn)JXKeJrQ","fields":{"OP1":"EQ"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":"AdH^9$ZI@L_zeQBQw`y,","fields":{"NUM":0}}},"B":{"shadow":{"type":"blockMathNumber","id":"HhHxO8@[t3T6_$}LH)xT","fields":{"NUM":4}},"block":{"type":"blockVariableGetValue","id":"O=%y54/k-**p?.KYN{a:","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"2*]O*1TATz[uQ}m8^~nN","fields":{"VAR":{"id":"f[qogEs]RCHzmPwo9*(Z","name":"status","type":"Any"}}}}}}}}}}}}},"DO0":{"block":{"type":"blockMotorRun","id":"ncFkI3#v)VP59S`F2uay","extraState":{"optionLevel":1},"fields":{"METHOD":"MOTOR_RUN_FOR"},"inputs":{"VAR":{"shadow":{"type":"variables_get_motor_device","id":",PEtE4Hfa6d!%4H@[!Gu","fields":{"VAR":{"id":"*fQ}QAZp,;0Mt?0U4#36","name":"Motor B","type":"Motor"}}}},"VALUE0":{"shadow":{"type":"unit_angularVelocity","id":"aarr@0)_[HuG$*V3-aLq","fields":{"VALUE0":500}}},"ANGLE":{"shadow":{"type":"unit_angle","id":"4io`ng@o.w#y{G=0YG21","fields":{"VALUE0":90}}},"THEN":{"shadow":{"type":"parameters_stop_4","id":"L;@;Y3A()*nc*IC,?0Vp","fields":{"VALUE":"Stop.BRAKE"}}}}}},"IF1":{"shadow":{"type":"blockLogicTrue","id":"n=I($^U8Beb!YW04%!+X"},"block":{"type":"blockLogicOperation","id":"S!f;^%j]gI{_Lmco]v`4","fields":{"OP":"AND"},"inputs":{"A":{"shadow":{"type":"blockLogicTrue","id":"JH%$}FPi+5pETl_V%#Vo"},"block":{"type":"blockLogicCompare","id":"Myp*#w)rsi$M9j+ut9UO","fields":{"OP1":"EQ"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":"N`h||%rHk3QM|Xs!Cvw:","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"gz.n^8+7QDqY?.^SW7I{","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"VXI_Xp-L7baDUbt*XU6N","fields":{"VAR":{"id":"Jw}[?P7@nkpy=fE:UrNS","name":"button_code","type":"Any"}}}}}}},"B":{"shadow":{"type":"blockMathNumber","id":"7~l__[NVMr?-1^?n0Y!8","fields":{"NUM":2}}}}}},"B":{"shadow":{"type":"blockLogicTrue","id":"I$O4k9^pd]wew+/x%1p."},"block":{"type":"blockLogicCompare","id":"912UrX3q;z^5Qj|QsfT`","fields":{"OP1":"EQ"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":"}IU==~.XSr}G2731^1;K","fields":{"NUM":0}}},"B":{"shadow":{"type":"blockMathNumber","id":"HhHxO8@[t3T6_$}LH)xT","fields":{"NUM":4}},"block":{"type":"blockVariableGetValue","id":"whvON1f0,$Rr,([2{b3R","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"=%|tSz.5%QAP#A1)#9Ri","fields":{"VAR":{"id":"f[qogEs]RCHzmPwo9*(Z","name":"status","type":"Any"}}}}}}}}}}}}},"DO1":{"block":{"type":"blockMotorRun","id":"*(=xH/}rjD=9*4.YXYf;","extraState":{"optionLevel":1},"fields":{"METHOD":"MOTOR_RUN_FOR"},"inputs":{"VAR":{"shadow":{"type":"variables_get_motor_device","id":"vm!77C(^tt4)/YhuIhV:","fields":{"VAR":{"id":"*fQ}QAZp,;0Mt?0U4#36","name":"Motor B","type":"Motor"}}}},"VALUE0":{"shadow":{"type":"unit_angularVelocity","id":"*tPn0MHuRKm{(o4.^R2g","fields":{"VALUE0":500}}},"ANGLE":{"shadow":{"type":"unit_angle","id":"9noZzsM~!#0hJfu%y5w%","fields":{"VALUE0":-90}}},"THEN":{"shadow":{"type":"parameters_stop_4","id":"y~hMDYO(3Y3i*sRNsyHZ","fields":{"VALUE":"Stop.BRAKE"}}}}}}}}}}}},"TASK3":{"block":{"type":"blockComment","id":"TXH75:JM,N2cbB}Y{8Ur","fields":{"FIELDNAME":"rot erkannt = 2 übertragen\ngelb erkannt = 4 übertragen\nblau erkannt = 6 übertragen\nalles andere = gleich nicht erkannt = 99 übertragen"},"next":{"block":{"type":"blockFlowWhile","id":"D7ZhSH,]nm:!:/2;;fFI","fields":{"MODE":"WHILE"},"inputs":{"BOOL":{"shadow":{"type":"blockLogicTrue","id":"m+5qo-_@V}Obu6=d4~zF"}},"DO":{"block":{"type":"blockIfElse","id":"o6!4LlDf-9ym=+~Cx09~","extraState":{"optionLevel":4},"inputs":{"IF0":{"shadow":{"type":"blockLogicTrue","id":"^PXy[bVdBI_*!O%@_gyO"},"block":{"type":"blockLogicCompare","id":"iNx[(m?HW??mZ?[c$~|;","fields":{"OP1":"EQ"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":"c4}t484[HmsYJ6#Sp~ei","fields":{"NUM":3}},"block":{"type":"blockColor","id":"6D_J|E`4UuB6V!z1aW$f","extraState":{"optionLevel":0},"fields":{"METHOD":"COLOR_GET_COLOR"},"inputs":{"VAR":{"shadow":{"type":"variables_get_color_device","id":"98U=}J@,%3UVA=gTbR!s","fields":{"VAR":{"id":")X7p)SDt#N/oZOlKdjS-","name":"color sensor","type":"ColorSensor"}}}}}}},"B":{"shadow":{"type":"blockMathNumber","id":"ML1BT@vZOk~pUvYLiRL/","fields":{"NUM":4}},"block":{"type":"variables_get_color","id":"hNjR)2}SeomGJ!`_|6~.","fields":{"COLOUR":"#ff0000","VAR":{"id":"_@,,jH-rTb79G2f/UavH"}}}}}}},"DO0":{"block":{"type":"blockVariableSetValue","id":"G[8UMg+Xdx,GuDYxE:R}","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"-d#rWK8w,kd^@JVRaxKa","fields":{"VAR":{"id":"9JHT9C2Oscv!.jXqD0|2","name":"Farbe erkannt","type":"Any"}}}},"VALUE0":{"shadow":{"type":"blockMathNumber","id":"s+5dkWxV[YqO.UhVVMvb","fields":{"NUM":1}}}},"next":{"block":{"type":"blockVariableSetValue","id":"W[Wcu{k;U%e-X2MQOZ_I","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"b,VVGuE,]rR^h+AKiMZ%","fields":{"VAR":{"id":"w%K:5E^u(:#yds.SPeys","name":"Farbe_fur_gelbe_hub","type":"Any"}}}},"VALUE0":{"shadow":{"type":"blockMathNumber","id":"-O;a^6C$JDqm/SBIb97+","fields":{"NUM":2}},"block":{"type":"blockMathArithmetic","id":"jvm7)VKF2~SmXF%]8rYV","fields":{"OP":"MULTIPLY"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":"aqc*5,q5G:_(8$^,M)T-","fields":{"NUM":2}}},"B":{"shadow":{"type":"blockMathNumber","id":"HhBJ}sF}5V?.lT?;C;Yn","fields":{"NUM":1}},"block":{"type":"blockVariableGetValue","id":"9RoRTravvz}2$IL(j6.L","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"Y~wZ9HlQbWaj(GK4v;hV","fields":{"VAR":{"id":"9JHT9C2Oscv!.jXqD0|2","name":"Farbe erkannt","type":"Any"}}}}}}}}}}}}}}},"IF1":{"shadow":{"type":"blockLogicTrue","id":"n=I($^U8Beb!YW04%!+X"},"block":{"type":"blockLogicCompare","id":"a{,7K7v%id5V3XDTCW5+","fields":{"OP1":"EQ"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":"c4}t484[HmsYJ6#Sp~ei","fields":{"NUM":3}},"block":{"type":"blockColor","id":"P9?bgO_A)w^pU3vg|-v7","extraState":{"optionLevel":0},"fields":{"METHOD":"COLOR_GET_COLOR"},"inputs":{"VAR":{"shadow":{"type":"variables_get_color_device","id":"f)Uvc_-p~Hz~:*qwNi?M","fields":{"VAR":{"id":")X7p)SDt#N/oZOlKdjS-","name":"color sensor","type":"ColorSensor"}}}}}}},"B":{"shadow":{"type":"blockMathNumber","id":"ML1BT@vZOk~pUvYLiRL/","fields":{"NUM":4}},"block":{"type":"variables_get_color","id":"?zwOkgamc}5OW$~o6;Wq","fields":{"COLOUR":"#ffff00","VAR":{"id":"^-?DoBmE{hfZo#E483p*"}}}}}}},"DO1":{"block":{"type":"blockVariableSetValue","id":"E.Cr3Tkp[$*wi$qDK.0{","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"h(v?TECQDfO^#B[D2?eG","fields":{"VAR":{"id":"9JHT9C2Oscv!.jXqD0|2","name":"Farbe erkannt","type":"Any"}}}},"VALUE0":{"shadow":{"type":"blockMathNumber","id":":jPZ5A60L5s2z0+[hs%I","fields":{"NUM":2}}}},"next":{"block":{"type":"blockVariableSetValue","id":"mW[$67o:#lMjT6Nm*)@`","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"j]3[wztbdxz*9ycOXV%w","fields":{"VAR":{"id":"w%K:5E^u(:#yds.SPeys","name":"Farbe_fur_gelbe_hub","type":"Any"}}}},"VALUE0":{"shadow":{"type":"blockMathNumber","id":"-O;a^6C$JDqm/SBIb97+","fields":{"NUM":2}},"block":{"type":"blockMathArithmetic","id":"6]l/SFS@/BSo$9`{WWQl","fields":{"OP":"MULTIPLY"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":"|_yJ7x59,HG=q5BAV9bW","fields":{"NUM":2}}},"B":{"shadow":{"type":"blockMathNumber","id":"HhBJ}sF}5V?.lT?;C;Yn","fields":{"NUM":1}},"block":{"type":"blockVariableGetValue","id":"8/9;0:29TKX)aOdZ9opW","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"KSe_C%UtEVrja4.!vVoI","fields":{"VAR":{"id":"9JHT9C2Oscv!.jXqD0|2","name":"Farbe erkannt","type":"Any"}}}}}}}}}}}}}}},"IF2":{"shadow":{"type":"blockLogicTrue","id":"-GEmNWc@={mB=^LZs8Ia"},"block":{"type":"blockLogicCompare","id":"-bd#0J6@9Egg^ptL^PS_","fields":{"OP1":"EQ"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":"c4}t484[HmsYJ6#Sp~ei","fields":{"NUM":3}},"block":{"type":"blockColor","id":"uTJTdQ^^71eP5,ZUYGDk","extraState":{"optionLevel":0},"fields":{"METHOD":"COLOR_GET_COLOR"},"inputs":{"VAR":{"shadow":{"type":"variables_get_color_device","id":"[Fccv?h3j6/s[!,zz6iu","fields":{"VAR":{"id":")X7p)SDt#N/oZOlKdjS-","name":"color sensor","type":"ColorSensor"}}}}}}},"B":{"shadow":{"type":"blockMathNumber","id":"ML1BT@vZOk~pUvYLiRL/","fields":{"NUM":4}},"block":{"type":"variables_get_color","id":"RWuR$;|%YSKExQWA]2b,","fields":{"COLOUR":"#0000ff","VAR":{"id":"ibCwjv#7},3Sne;X_^Ea"}}}}}}},"DO2":{"block":{"type":"blockVariableSetValue","id":"bzK]eoB^XDr/`!MxQZJj","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"JcBKh{dxV2^8Fp%6d_r3","fields":{"VAR":{"id":"9JHT9C2Oscv!.jXqD0|2","name":"Farbe erkannt","type":"Any"}}}},"VALUE0":{"shadow":{"type":"blockMathNumber","id":"uDHLNxCJlF5#i8PhJx:C","fields":{"NUM":3}}}},"next":{"block":{"type":"blockVariableSetValue","id":"07fKBl+aqIxd^N?i2}S9","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"}ppb=1UQ4*5^u?oQcO/6","fields":{"VAR":{"id":"w%K:5E^u(:#yds.SPeys","name":"Farbe_fur_gelbe_hub","type":"Any"}}}},"VALUE0":{"shadow":{"type":"blockMathNumber","id":"-O;a^6C$JDqm/SBIb97+","fields":{"NUM":2}},"block":{"type":"blockMathArithmetic","id":"mREXgo0g[+_GcsJJhjYJ","fields":{"OP":"MULTIPLY"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":".}3!tL,xUEEG,`i(kDm#","fields":{"NUM":2}}},"B":{"shadow":{"type":"blockMathNumber","id":"HhBJ}sF}5V?.lT?;C;Yn","fields":{"NUM":1}},"block":{"type":"blockVariableGetValue","id":"dP2^.Q2fFYZLnWxc)S:K","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"P%dbbyrVbMxI.Np#+`4^","fields":{"VAR":{"id":"9JHT9C2Oscv!.jXqD0|2","name":"Farbe erkannt","type":"Any"}}}}}}}}}}}}}}},"IF3":{"shadow":{"type":"blockLogicTrue","id":"Qet(Ni]D;W3RN2Wq6M:C"},"block":{"type":"blockLogicCompare","id":"f_xq3VSZJ}N7F4Cc?K*t","fields":{"OP1":"EQ"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":"c4}t484[HmsYJ6#Sp~ei","fields":{"NUM":3}},"block":{"type":"blockColor","id":"qX7%K0+cN)/sx;rF5Bny","extraState":{"optionLevel":0},"fields":{"METHOD":"COLOR_GET_COLOR"},"inputs":{"VAR":{"shadow":{"type":"variables_get_color_device","id":"(y(FG,!DQ7}PO%?,Z[%n","fields":{"VAR":{"id":")X7p)SDt#N/oZOlKdjS-","name":"color sensor","type":"ColorSensor"}}}}}}},"B":{"shadow":{"type":"blockMathNumber","id":"ML1BT@vZOk~pUvYLiRL/","fields":{"NUM":4}},"block":{"type":"variables_get_color","id":"Csk,viVqDOa^E7FW$A7T","fields":{"COLOUR":"#000000","VAR":{"id":"agmb$8?hBicP1bwid`~r"}}}}}}},"DO3":{"block":{"type":"blockVariableSetValue","id":"wjhH=jo-mPJE8I5hHIcM","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"_Nj%EEYmWj}d^hkue*Nc","fields":{"VAR":{"id":"9JHT9C2Oscv!.jXqD0|2","name":"Farbe erkannt","type":"Any"}}}},"VALUE0":{"shadow":{"type":"blockMathNumber","id":"tDC%}Zw8uuaW8Au+Ema)","fields":{"NUM":0}}}},"next":{"block":{"type":"blockVariableSetValue","id":"xqfrCX|l^6s_Qd];GdhE","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"xSQbbv5Z-FuwLD4t^yZT","fields":{"VAR":{"id":"w%K:5E^u(:#yds.SPeys","name":"Farbe_fur_gelbe_hub","type":"Any"}}}},"VALUE0":{"shadow":{"type":"blockMathNumber","id":"-O;a^6C$JDqm/SBIb97+","fields":{"NUM":99}}}}}}}},"ELSE":{"block":{"type":"blockVariableSetValue","id":"/R$1MuSu6;aN(BVTOokV","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"^XTKk(*-QFM0po5|S{x(","fields":{"VAR":{"id":"w%K:5E^u(:#yds.SPeys","name":"Farbe_fur_gelbe_hub","type":"Any"}}}},"VALUE0":{"shadow":{"type":"blockMathNumber","id":")Pf8J,(ppI4H#?.C/=jq","fields":{"NUM":99}}}}}}},"next":{"block":{"type":"blockBleBroadcast","id":"BrEwgXjtBZJydTTO@.R^","inputs":{"VAR":{"shadow":{"type":"variables_get_ble_hub","id":"C9Ff]l+hPNKyA3P1c!Rg","fields":{"VAR":{"id":"%X)Wy1ltRV~N^(F]C]vj","name":"green_hub","type":"InventorHub"}}}},"VALUE0":{"shadow":{"type":"blockMathNumber","id":"F0{Nb|mT26~eNpMaU;aM","fields":{"NUM":0}},"block":{"type":"blockListCreate","id":"bK%?.V{gvG4R2WoXj`;(","extraState":{"optionLevel":1},"inputs":{"ADD0":{"shadow":{"type":"blockMathNumber","id":"ysMlw0]ah-XY|usUs1^`","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"7|^{Ok?|!(4p]9a{u.`?","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"0-h|RIC?.I:pHm[M;8?W","fields":{"VAR":{"id":"w%K:5E^u(:#yds.SPeys","name":"Farbe_fur_gelbe_hub","type":"Any"}}}}}}}}}}}}}}}}}}}},"TASK4":{"block":{"type":"blockFlowWhile","id":"?a-Fp1(a^1X?(I?fo7Nx","fields":{"MODE":"WHILE"},"inputs":{"BOOL":{"shadow":{"type":"blockLogicTrue","id":"Yx+OV|3zlb}U{s9S3_Kr"}},"DO":{"block":{"type":"blockIfElse","id":"LU($}[g|BXkVFk.i3[^+","extraState":{"optionLevel":4},"inputs":{"IF0":{"shadow":{"type":"blockLogicTrue","id":"Bi=TX0L!9SK-;w%P[!]S"},"block":{"type":"blockLogicCompare","id":".KXk_2c=0JE!*}j8Xm}B","fields":{"OP1":"EQ"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":"zzJA3r?TYV9aBzdGalxo","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"i$W,fjU]!)sABxhuGsyY","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"3O7)d)cGjG#2W5HW/s`4","fields":{"VAR":{"id":"9JHT9C2Oscv!.jXqD0|2","name":"Farbe erkannt","type":"Any"}}}}}}},"B":{"shadow":{"type":"blockMathNumber","id":"P;U+!.FZbDC=)Ne;Z,f3","fields":{"NUM":1}}}}}},"DO0":{"block":{"type":"blockLightOnColor","id":"L!{ik+uRf-)MNH}WhxkQ","extraState":{"optionLevel":1},"fields":{"METHOD":"LIGHT_ON"},"inputs":{"VAR":{"shadow":{"type":"variables_get_color_light_device","id":"4yH_X8SOVj-Vv)E?|(!c","fields":{"VAR":{"id":"g,l)-e;j#AmK=?V2lMLm","name":"matrix","type":"ColorLightMatrix"}}}},"COLOR":{"shadow":{"type":"variables_get_color","id":"%?yq_L?dD38~JZCCI}SD","fields":{"COLOUR":"#ff0000","VAR":{"id":"_@,,jH-rTb79G2f/UavH","name":"red","type":"ColorDef"}}}}}}},"IF1":{"shadow":{"type":"blockLogicTrue","id":"mr(ChtO@VU@j@N14P-Qa"},"block":{"type":"blockLogicCompare","id":"uRIj_^dM30X@AMd$Jb|p","fields":{"OP1":"EQ"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":"zzJA3r?TYV9aBzdGalxo","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"}BlG8TuDnk(Oy~H!9r_(","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"8zCCm(!tBkcomAnS)kHm","fields":{"VAR":{"id":"9JHT9C2Oscv!.jXqD0|2","name":"Farbe erkannt","type":"Any"}}}}}}},"B":{"shadow":{"type":"blockMathNumber","id":":txqs2MT{t5z7=~(?o3B","fields":{"NUM":2}}}}}},"DO1":{"block":{"type":"blockLightOnColor","id":"+0)UV!hT{xQFjU}jDJvm","extraState":{"optionLevel":1},"fields":{"METHOD":"LIGHT_ON"},"inputs":{"VAR":{"shadow":{"type":"variables_get_color_light_device","id":"RIXjd=yCJZS`[a!%QE;[","fields":{"VAR":{"id":"g,l)-e;j#AmK=?V2lMLm","name":"matrix","type":"ColorLightMatrix"}}}},"COLOR":{"shadow":{"type":"variables_get_color","id":"+F}T(y5@So+n]2!Yv@]B","fields":{"COLOUR":"#ffff00","VAR":{"id":"^-?DoBmE{hfZo#E483p*","name":"yellow","type":"ColorDef"}}}}}}},"IF2":{"shadow":{"type":"blockLogicTrue","id":"Br;UQ~3X0l]SNCi(A/2V"},"block":{"type":"blockLogicCompare","id":"DL`}/m~;){dA.OuFd*Gv","fields":{"OP1":"EQ"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":"zzJA3r?TYV9aBzdGalxo","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"-AsYTTn/YAL[Fm{?J*JO","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":";T4`d1xRkDcWbBo~B-qV","fields":{"VAR":{"id":"9JHT9C2Oscv!.jXqD0|2","name":"Farbe erkannt","type":"Any"}}}}}}},"B":{"shadow":{"type":"blockMathNumber","id":"gu^Gsy1arqElgRJtcFIx","fields":{"NUM":3}}}}}},"DO2":{"block":{"type":"blockLightOnColor","id":"Kii$zsEJc%Hh*KL^~C~J","extraState":{"optionLevel":1},"fields":{"METHOD":"LIGHT_ON"},"inputs":{"VAR":{"shadow":{"type":"variables_get_color_light_device","id":"5dzZirOn6}az$)P6WDRc","fields":{"VAR":{"id":"g,l)-e;j#AmK=?V2lMLm","name":"matrix","type":"ColorLightMatrix"}}}},"COLOR":{"shadow":{"type":"variables_get_color","id":"O{`TJBUrN=]:D4Vv,byp","fields":{"COLOUR":"#0000ff","VAR":{"id":"ibCwjv#7},3Sne;X_^Ea","name":"blue","type":"ColorDef"}}}}}}},"IF3":{"shadow":{"type":"blockLogicTrue","id":"9eb%GIn,:*l/tibzf:H1"},"block":{"type":"blockLogicCompare","id":"Cn!I-TxY]K_ASTl~^GN.","fields":{"OP1":"EQ"},"inputs":{"A":{"shadow":{"type":"blockMathNumber","id":"zzJA3r?TYV9aBzdGalxo","fields":{"NUM":0}},"block":{"type":"blockVariableGetValue","id":"R4EX~W5{Ao1y=ivd.,w]","inputs":{"VAR":{"shadow":{"type":"variables_get_any","id":"v:qIRkAy}Y;V%HgtxM9y","fields":{"VAR":{"id":"9JHT9C2Oscv!.jXqD0|2","name":"Farbe erkannt","type":"Any"}}}}}}},"B":{"shadow":{"type":"blockMathNumber","id":"vRD5[obu(J`2u:xniFqv","fields":{"NUM":0}}}}}},"DO3":{"block":{"type":"blockLightOnColor","id":"S7-Dp}2,Q_lBKY3R}.-z","extraState":{"optionLevel":1},"fields":{"METHOD":"LIGHT_ON"},"inputs":{"VAR":{"shadow":{"type":"variables_get_color_light_device","id":"0[1.y9x+gpnKzQ=;-x;b","fields":{"VAR":{"id":"g,l)-e;j#AmK=?V2lMLm","name":"matrix","type":"ColorLightMatrix"}}}},"COLOR":{"shadow":{"type":"variables_get_color","id":"GW5Or|dhVW0E}T(C$Kx1","fields":{"COLOUR":"#000000","VAR":{"id":"agmb$8?hBicP1bwid`~r","name":"none","type":"ColorDef"}}}}}}}}}}}}}}}}}]},"variables":[{"name":"red","id":"_@,,jH-rTb79G2f/UavH","type":"ColorDef"},{"name":"orange","id":"%Y2z6m}.S=xdN+z8i9?i","type":"ColorDef"},{"name":"yellow","id":"^-?DoBmE{hfZo#E483p*","type":"ColorDef"},{"name":"green","id":"LdjQT~Ml2GuM_+|EZ~g1","type":"ColorDef"},{"name":"cyan","id":"M7)sDrOP?$}FQ,hh._^m","type":"ColorDef"},{"name":"blue","id":"ibCwjv#7},3Sne;X_^Ea","type":"ColorDef"},{"name":"violet","id":"b,#`n~41S5xG*fv2=e@*","type":"ColorDef"},{"name":"magenta","id":"s_6t~}Z*)j@oqz1{t=*}","type":"ColorDef"},{"name":"white","id":"{!uADpR8rk-W8czs#15@","type":"ColorDef"},{"name":"none","id":"agmb$8?hBicP1bwid`~r","type":"ColorDef"},{"name":"Motor A","id":"~dh=1V3w@V)s^ifgyM0l","type":"Motor"},{"name":"Motor B","id":"*fQ}QAZp,;0Mt?0U4#36","type":"Motor"},{"name":"color sensor","id":")X7p)SDt#N/oZOlKdjS-","type":"ColorSensor"},{"name":"matrix","id":"g,l)-e;j#AmK=?V2lMLm","type":"ColorLightMatrix"},{"name":"handle_mode","id":"~EbB+w{_60m;uXMZ3y;y","type":"Function"},{"name":"handle_mode_green","id":"gUhLMw-[for.4X18/w$t","type":"Function"},{"name":"handle_mode_white","id":";l%;9FTIHvil|6XOe_ni","type":"Function"},{"name":"handle_mode_yellow","id":"HmT1U/pPgM@/A)$AlyDU","type":"Function"},{"name":"handle_mode_red","id":"FvS9[v38RD!$2sEMo63N","type":"Function"},{"name":"show_buttons_on_matrix","id":")_E9/kWw6rY4J|~JYAW?","type":"Function"},{"name":"FB_L","id":"E-#mWDO;{1XX-Euz7!ZA","type":"Any"},{"name":"FB_L_plus","id":"A-m%:pS]Rx~DmS@?@QzR","type":"Any"},{"name":"FB_L_minus","id":"ib`O|sVi`jGH8a/N*Hd1","type":"Any"},{"name":"FB_R","id":"4wz7K1a0qLRJtB]/;tsy","type":"Any"},{"name":"FB_R_plus","id":"gjF?36L8P8oaT=KnEg6s","type":"Any"},{"name":"FB_R_minus","id":"z{1.4{SgkT!`7:A4v5C$","type":"Any"},{"name":"status","id":"f[qogEs]RCHzmPwo9*(Z","type":"Any"},{"name":"status_white","id":"c?tz^6}zmHD;o?i_gr;s","type":"Any"},{"name":"status_green","id":"%7IAk7Kg#0?nc_!L_NXd","type":"Any"},{"name":"status_yellow","id":"2/Bvx)IcPIg(HFXIM9QI","type":"Any"},{"name":"status_red","id":"TXi@z)BXoCB:qSRP4`7b","type":"Any"},{"name":"buttons","id":"(X?$f(]O,7PqGn)#NlDQ","type":"Any"},{"name":"button_code","id":"Jw}[?P7@nkpy=fE:UrNS","type":"Any"},{"name":"Farbe erkannt","id":"9JHT9C2Oscv!.jXqD0|2","type":"Any"},{"name":"Farbe_fur_gelbe_hub","id":"w%K:5E^u(:#yds.SPeys","type":"Any"},{"name":"green_hub","id":"%X)Wy1ltRV~N^(F]C]vj","type":"InventorHub"},{"name":"new_status","id":"F{8,WBwEMOqA,no2=CEy","type":"FunctionArgument"},{"name":"new_buttons","id":"UR4R1[KUi:]kn0E*h[/A","type":"FunctionArgument"},{"name":"_buttons","id":"(hIps([1wfyl~,O(au?=","type":"FunctionArgument"}],"info":{"type":"pybricks","version":"1.2.3"}} from pybricks.hubs import InventorHub from pybricks.parameters import Axis, Color, Direction, Port, Stop from pybricks.pupdevices import ColorLightMatrix, ColorSensor, Motor from pybricks.tools import multitask, run_task, wait # Set up all devices. green_hub = InventorHub(top_side=Axis.Z, front_side=Axis.X, broadcast_channel=6, observe_channels=[5]) color_sensor = ColorSensor(Port.C) matrix = ColorLightMatrix(Port.D) Motor_A = Motor(Port.A, Direction.CLOCKWISE) Motor_B = Motor(Port.B, Direction.CLOCKWISE) # Initialize variables. FB_L = False FB_L_plus = False FB_L_minus = False FB_R = False FB_R_plus = False FB_R_minus = False status = 0 status_white = 0 status_green = 1 status_yellow = 2 status_red = 3 buttons = [False, False, False, False, False, False] button_code = 0 Farbe_erkannt = 0 Farbe_fur_gelbe_hub = 99 async def handle_mode(new_status, new_buttons): await wait(1) await show_buttons_on_matrix(new_buttons) if new_status == status_white: await handle_mode_white(new_buttons) elif new_status == status_green: await handle_mode_green(new_buttons) elif new_status == status_yellow: await handle_mode_yellow(new_buttons) else: await handle_mode_red(new_buttons) async def show_buttons_on_matrix(_buttons): global button_code await wait(1) button_code = 0 if _buttons[1]: # left plus button button_code = button_code + 1 if _buttons[0]: # left button button_code = button_code + 2 if _buttons[2]: # left minus button button_code = button_code + 4 # multiply by ten to shift to the left button_code = button_code * 10 if _buttons[4]: # right plus button button_code = button_code + 1 if _buttons[3]: # right bitton button_code = button_code + 2 if _buttons[5]: # right minus button button_code = button_code + 4 green_hub.display.number(button_code) async def handle_mode_white(_buttons): await wait(1) green_hub.light.on(Color.WHITE) async def handle_mode_green(_buttons): await wait(1) green_hub.light.on(Color.GREEN) async def handle_mode_yellow(_buttons): await wait(1) green_hub.light.on(Color.YELLOW) async def handle_mode_red(_buttons): await wait(1) green_hub.light.on(Color.RED) async def subtask(): while True: await wait(1) if button_code == 10 and 0 == status: await Motor_A.run_angle(500, 90, Stop.BRAKE) elif button_code == 1 and 0 == status: await Motor_A.run_angle(500, -90, Stop.BRAKE) else: pass async def subtask2(): while True: await wait(1) if button_code == 20 and 0 == status: await Motor_B.run_angle(500, 90, Stop.BRAKE) elif button_code == 2 and 0 == status: await Motor_B.run_angle(500, -90, Stop.BRAKE) else: pass async def subtask3(): global Farbe_erkannt, Farbe_fur_gelbe_hub # rot erkannt = 2 übertragen # gelb erkannt = 4 übertragen # blau erkannt = 6 übertragen # alles andere = gleich nicht erkannt = 99 übertragen while True: await wait(1) if await color_sensor.color() == Color.RED: Farbe_erkannt = 1 Farbe_fur_gelbe_hub = 2 * Farbe_erkannt elif await color_sensor.color() == Color.YELLOW: Farbe_erkannt = 2 Farbe_fur_gelbe_hub = 2 * Farbe_erkannt elif await color_sensor.color() == Color.BLUE: Farbe_erkannt = 3 Farbe_fur_gelbe_hub = 2 * Farbe_erkannt elif await color_sensor.color() == Color.NONE: Farbe_erkannt = 0 Farbe_fur_gelbe_hub = 99 else: Farbe_fur_gelbe_hub = 99 await green_hub.ble.broadcast([Farbe_fur_gelbe_hub]) async def subtask4(): while True: await wait(1) if Farbe_erkannt == 1: await matrix.on(Color.RED) elif Farbe_erkannt == 2: await matrix.on(Color.YELLOW) elif Farbe_erkannt == 3: await matrix.on(Color.BLUE) elif Farbe_erkannt == 0: await matrix.on(Color.NONE) else: pass async def main1(): global status, FB_L, FB_L_plus, FB_L_minus, FB_R, FB_R_plus, FB_R_minus, buttons # green hub # broadcast ch 6 # observe ch 5 while True: await wait(1) # Get and unpack data sent from the other hub . # This unpack block sets the variables to 0 if there is no data. status, FB_L, FB_L_plus, FB_L_minus, FB_R, FB_R_plus, FB_R_minus = green_hub.ble.observe(5) or [0] * 7 buttons = [FB_L, FB_L_plus, FB_L_minus, FB_R, FB_R_plus, FB_R_minus] await handle_mode(status, buttons) await wait(50) async def main2(): while True: await wait(1) print('LED status:', status, 'Tastencode 10-1 ', button_code, 'Color Sensor Farbe: ', Farbe_erkannt) await wait(1000) async def main3(): global Farbe_erkannt, Farbe_fur_gelbe_hub await multitask(subtask(), subtask2(), subtask3(), subtask4()) async def main(): await multitask(main1(), main2(), main3()) run_task(main())