3 – Warum rennen, wenn rollen schneller ist? Bionik mit der Flickflack Spinne

3

Warum rennen, wenn rollen schneller ist? Bionik mit der Flickflack Spinne

Das lernst du hier

Rennen oder rollen? Das ist Bionik, die Wissenschaft, der Natur Dinge abzuschauen und diese für die Technik erfolgreich zu kopieren. Wie zum Beispiel die Aerodynamische Form von Flugzeugen, denn diese wurde von der Flügelform von Vögeln inspiriert! Hier geht es aber um etwas ganz anderes, nämlich um die Flickflack Spinne Cebrenus rechenbergi, welche sich doppelt so schnell fortbewegt, wie ihre Artgenossen, indem sie rollt!

Push-Roll-Bot Titelbild

Warum rennen, wenn rollen schneller ist?

In der Tierwelt ist es entscheidend, schnell zu sein und die Natur ist hier besonders erfinderisch. Obwohl die Flickflack Spinne acht Beine besitzt, nutzt sie diese auf aussergewöhnliche Art, denn sie stösst sich vom Boden ab und rollt. Damit ist das Insekt etwa doppelt so schnell wie eine rennende Spinne!

Push-Roll-Bot aus PUR Hartschaum bauen

Der Push-Roll-Bot aus 20mm PUR Hartschaum (oder Holz oder Karton) macht sich die natürliche Fähigkeit zu rollen zu Nutze. Sobald ein Lichtsensor erkennt, dass der Rol-Bot in der richtigen Lage steht (also aufrecht), aktiviert sich das Servo, denn dieses ist so montiert, dass es das Fahrzeug vom Boden abstossen kann!

Als Baumaterial haben wir uns für eine 20mm PUR-Hartschaumplatte entschieden, weil sie sehr leicht ist! Zudem erhältst du dieses günstige Material in jedem Baumarkt. Damit dein Gefährt funktioniert, achte gut auf diese wichtigen Punkte:

> Schneide das Rondell 100% rund, das ist gar nicht so einfach ;-)
> Baue mit leichten Materialien oder verwende ein kräftigeres Servo
> befestige die Sensoren nur mit Klebband, damit du sie verschieben kannst
> Positioniere den Lichtsensor so, dass er bei der Bodenberührung vollständig im dunkeln ist
> Bemale die Unterseite der Sensorhalterung schwarz für weniger Lichtreflexion
> Studiere das 3D-Modell und zoome in die Details

Teste, ob dein Roboter schön rund ist und gleichmässig rollt!

3a

Was ist ein Servo und was ist ein Licht-Sensor?

Wie geht das?

Ein Servo ist ein Motor der ziemlich kräftig ist und dessen Position du auf den Millimeter genau einstellen kannst. Mit einem Servohorn und einem Stab als Verlängerung kann das Servo den Roll-Bot darum mit einer Stossbewegung antreiben, denn es kann sich im Winkel von bis zu 0° bis 180° drehen. Hier findest du unsere detaillierte Anleitung, wie du ein Servo mit dem Arduino steuerst.

Ein Lichtsensor (Fotowiderstand, LDR) ist ein Widerstand, der wie ein Schalter funktioniert, sobald er Licht sieht oder ganz im Dunkeln ist. Sobald der Sensor den Boden berührt wird es also dunkel und der Push-Roll-Bot kann sich vom Boden abstossen. Hier findest du eine Anleitung, wie der Lichtsensor angeschlossen und programmiert wird.

3b

Servo und Lichtsensoren anschliessen

Anschlussschema - Bionik mit Arduino: rollende Sahara Spinne
3c

Servo testen

Teste dein Servo, indem du es in alle drei Positionen fahren lässt. Im Sketch unten geben wir die Mittelposition (Ruheposition) mit 90° an – aber stimmt das auch für deine Konstruktion? Bei unserem Roll-Bot mussten wir diesen Wert auf 80° korrigieren. Achte auch darauf, dass der Abstosshebel nicht an die Konstruktion selber anstösst.

Challenge: XML-Code in Editor einfügen
<xml xmlns="https://developers.google.com/blockly/xml"><variables><variable id="_DQjdhaJfR6,f$7cgOQ7">Position in °</variable><variable id="Vw5IBG9C#Pa@r0U!+Bbh">Servo Pin</variable><variable id="DoyC0N[TR?Wtuv+]QNjk">von Pos in °</variable><variable id="8M|lsZfG.{JMk^B,=:P[">bis Pos in °</variable><variable id="|H,0pDre=%.#lJkTh33Q">Tempo in %</variable><variable id="PzJaWVHX--]9?^N_)#wn">Dezimalcode</variable><variable id="8[tP-gnNag|U*w*Y^_4=">Farbe°</variable><variable id="MO}nJEF/,hGyd-x(^`q+">Sättigung %</variable><variable id="Lb]X9XmRcPagndnTyucG">Helligkeit %</variable><variable id="q?p.CO_^]c.:1)BL`*kZ">Sensor</variable><variable id="uSI+-od^%Wqd^spA`}u=">Farbe</variable><variable id="Fgi(boC*F5V:]r|tcnW,">Distanz in cm</variable><variable id="XyR,!P+Ke(tQh=Y)F$j4">Dividend</variable><variable id="K:G4UACKdRDr(dE9O39G">Pos 1</variable><variable id="=ym7+h@?NuGhkbw7=9_v">Bitnummer</variable><variable id="BO3Cn-5z+8Y:Zu5ii*{O">Bit</variable><variable id="w#g|TWs[|tK%g)vcs!n5">Verstrichene Zeit</variable></variables><block type="set_neo_pixel" id="!Om9r{B%q#Ax%A]Do=O0" x="42" y="-57"><value name="NUM_LEDS"><block type="math_number" id="sGg3N3FKmd)8(6;uEI{*"><field name="NUM">16</field></block></value><value name="BRIGHTNESS"><block type="math_number" id="W2KAj#}-gE`P}9v*v)3B"><field name="NUM">100</field></block></value><value name="OUTTURN"><block type="led_pin" id="9-MqZA.)f?Uo,GG(]b7X"><field name="LED">LED1</field></block></value></block><block type="basic_comment" id="|.$x+yKiz`j-,~[?eRLs" x="-700" y="32"><field name="COMMENT">Nicht löschen, Unterprogramme</field></block><block type="basic_comment" id="YW?Z634kdB[|Kr*9rm)r" x="45" y="20"><field name="COMMENT">Welche der untenstehenden Blöcke müssen in welchem Fall aktiv sein?&amp;#10;Setze sie richtig in den Hauptloop ein.</field></block><block type="procedures_callnoreturn" id="+Dik-l#xDh27XSm4_Ez*" x="-1168" y="88"><mutation name="stelle Servo"><arg name="Position in °"></arg><arg name="Servo Pin"></arg></mutation><value name="ARG0"><block type="math_number" id="FuKA)24e!YPnL!6uVGNQ"><field name="NUM">0</field></block></value><value name="ARG1"><block type="led_pin" id="*N?*%c`@1TVI3UGN1p?N"><field name="LED">LED2</field></block></value></block><block type="procedures_defnoreturn" id="DYYovfp[/{/^ryWHZBvf" collapsed="true" x="-700" y="91"><mutation><arg name="Position in °" varid="_DQjdhaJfR6,f$7cgOQ7"></arg><arg name="Servo Pin" varid="Vw5IBG9C#Pa@r0U!+Bbh"></arg></mutation><field name="NAME">stelle Servo</field><statement name="STACK"><block type="variables_set" id="b*l`jfDpwv@_`yEQ:sQU"><field name="VAR" id="_DQjdhaJfR6,f$7cgOQ7">Position in °</field><value name="VALUE"><block type="math_map" id="wY2I~E@9)6mqH{`4}Min"><value name="VALUE"><block type="variables_get" id="sM%OH#-),/XvNLAfoDgM"><field name="VAR" id="_DQjdhaJfR6,f$7cgOQ7">Position in °</field></block></value><value name="FROMLOW"><block type="math_number" id="5*[TWQi3eTy;dTNqRejO"><field name="NUM">0</field></block></value><value name="FROMHIGH"><block type="math_number" id="3FohKj*x~t~gZ.sYtS2("><field name="NUM">180</field></block></value><value name="TOLOW"><block type="math_number" id="y+3B7BV,l3#e!tC#zP45"><field name="NUM">450</field></block></value><value name="TOHIGH"><block type="math_number" id="n[XOgoHB+-0i.,Gpwf%1"><field name="NUM">2550</field></block></value></block></value><next><block type="variables_set" id=".xsEB~Y8Qx!^%8P%)mh;"><field name="VAR" id="K:G4UACKdRDr(dE9O39G">Pos 1</field><value name="VALUE"><block type="math_arithmetic" id="{F9Honx#=x}}p5s6~3pd"><field name="OP">MINUS</field><value name="A"><block type="math_number" id="nN}B3!9SLvv*1{Zlf(%h"><field name="NUM">20000</field></block></value><value name="B"><block type="variables_get" id="mZbi[2Xx35m9qZ2Wz|b_"><field name="VAR" id="_DQjdhaJfR6,f$7cgOQ7">Position in °</field></block></value></block></value><next><block type="flow_repeat" id="gN=t~3M0%R7Pe)/i-V4G"><value name="REPEATS"><block type="math_number" id="+qOr!,*|C9.5wJ[w,ENN"><field name="NUM">50</field></block></value><statement name="DO"><block type="led_write_state" id="6!l6z?iL+={{9KAi,H|9"><value name="LED"><block type="variables_get" id="0L`R`5_!X{Az,9F)`Qac"><field name="VAR" id="Vw5IBG9C#Pa@r0U!+Bbh">Servo Pin</field></block></value><value name="VALUE"><block type="code_pin" id="+7pwX/P2*!~K,CbqH7gH"><field name="CODE_PIN">HIGH</field></block></value><next><block type="flow_delay_micro" id="Y3736,h2Aea/$FEM%mGd"><value name="DELAY_MICRO"><block type="variables_get" id=")Lg-8viw{x?GWSZtdPfK"><field name="VAR" id="_DQjdhaJfR6,f$7cgOQ7">Position in °</field></block></value><next><block type="led_write_state" id="=R-dB9$gUgUf[f1#amX?"><value name="LED"><block type="variables_get" id="L{aTSjwfCBro[60WW.0E"><field name="VAR" id="Vw5IBG9C#Pa@r0U!+Bbh">Servo Pin</field></block></value><value name="VALUE"><block type="code_pin" id="ZI?r50,S}Q!N4EWcI9rk"><field name="CODE_PIN">LOW</field></block></value><next><block type="flow_delay_micro" id="7il;NbzoR^Es7say`(zt"><value name="DELAY_MICRO"><block type="variables_get" id="|@!H=EXua/xr-NRDCr5g"><field name="VAR" id="K:G4UACKdRDr(dE9O39G">Pos 1</field></block></value></block></next></block></next></block></next></block></statement></block></next></block></next></block></statement></block><block type="procedures_callnoreturn" id="2J_{LmcNIYk{Z?kV+;::" x="-1468" y="141"><mutation name="stelle Servo sanft"><arg name="von Pos in °"></arg><arg name="bis Pos in °"></arg><arg name="Tempo in %"></arg><arg name="Servo Pin"></arg></mutation><value name="ARG0"><block type="math_number" id="]_j_u)];;xHA8-_B3$7B"><field name="NUM">0</field></block></value><value name="ARG1"><block type="math_number" id="]W:g?fprmZ}8_8xDy2JB"><field name="NUM">160</field></block></value><value name="ARG2"><block type="math_number" id="z{3!U)]mou,t,b?*wzax"><field name="NUM">50</field></block></value><value name="ARG3"><block type="led_pin" id="wew.m#TufNiqRG~QVRLG"><field name="LED">LED2</field></block></value></block><block type="basic_main_loop" id="9~210UV)!{|GniQxFn|[" deletable="false" x="44" y="96"><value name="BLINK"><block type="basic_blinkcode" id="u@6%knhMhK2g(1JYw[10"><field name="SHORT">1</field><field name="LONG">1</field></block></value><statement name="CODE"><block type="procedures_callnoreturn" id="n3;?)Clp(9|L^JCy6m{0"><mutation name="stelle Servo"><arg name="Position in °"></arg><arg name="Servo Pin"></arg></mutation><value name="ARG0"><block type="math_number" id="~Z7]`2?|+/nPY9JYMXN`"><field name="NUM">60</field></block></value><value name="ARG1"><block type="led_pin" id="b^5NwZ4eGNYc;DqlaSGC"><field name="LED">LED2</field></block></value><next><block type="set_pixel_color" id="yghk~-bNB4Ecq:F~:#`V"><field name="MODE">MODE1</field><value name="FROM"><block type="math_number" id="al[kDyI(bvz=Tfbc}+cV"><field name="NUM">1</field></block></value><value name="TO"><block type="math_number" id="TExg09Y]}h9-2To[3gKa"><field name="NUM">4</field></block></value><value name="H"><block type="math_number" id="Qyw$n7Z_6p!?}z)Fe,(%"><field name="NUM">10</field></block></value><value name="S"><block type="math_number" id="wXp:#D*0){00d:7!c!0O"><field name="NUM">100</field></block></value><value name="B"><block type="math_number" id="BwKj$eA*l_v03b8}#*pW"><field name="NUM">100</field></block></value><next><block type="flow_delay" id="DuBh|oN]ajrf=vs4Q:e0"><value name="DELAY"><block type="math_number" id="b9~j-u~mLb}y%AH?{dLn"><field name="NUM">200</field></block></value><next><block type="procedures_callnoreturn" id=")g9EQotZ1Et}Y,V8XrqO"><mutation name="stelle Servo"><arg name="Position in °"></arg><arg name="Servo Pin"></arg></mutation><value name="ARG0"><block type="math_number" id="2Qfj7W^h!Z7$!,n}B4(d"><field name="NUM">90</field></block></value><value name="ARG1"><block type="led_pin" id="G[2#@zHPB8YZ7d~u[;XS"><field name="LED">LED2</field></block></value><next><block type="set_pixel_color" id="hfLu,TquJayu~Kq5EeFA"><field name="MODE">MODE1</field><value name="FROM"><block type="math_number" id="?[MPU]]fMI@8ZA5XH9G%"><field name="NUM">5</field></block></value><value name="TO"><block type="math_number" id="].8MA+h?W@+P1(YY5[`c"><field name="NUM">8</field></block></value><value name="H"><block type="math_number" id="%=a)`4wp3%#~A~-%jl!F"><field name="NUM">100</field></block></value><value name="S"><block type="math_number" id="a%ejcSz5x6PX-Jn}J]Ik"><field name="NUM">100</field></block></value><value name="B"><block type="math_number" id="mc-CTVk4rB!EqsBW^~MG"><field name="NUM">100</field></block></value><next><block type="flow_delay" id="0KH(YV?fB*|ob+_ho{h0"><value name="DELAY"><block type="math_number" id="k.pApqy]#)Oo]vA)k!k="><field name="NUM">200</field></block></value><next><block type="procedures_callnoreturn" id="lKVM~4!bW~2=r:sX]K]D"><mutation name="stelle Servo"><arg name="Position in °"></arg><arg name="Servo Pin"></arg></mutation><value name="ARG0"><block type="math_number" id="vC;jGGi+X5eKo*dHn4y#"><field name="NUM">120</field></block></value><value name="ARG1"><block type="led_pin" id="#6zLKX;Du,Bw?8F3~If%"><field name="LED">LED2</field></block></value><next><block type="set_pixel_color" id=")w-6#}7rcox+]*:_c{7!"><field name="MODE">MODE1</field><value name="FROM"><block type="math_number" id="@H)UL@Rs58~|ueOx#POW"><field name="NUM">13</field></block></value><value name="TO"><block type="math_number" id="b3IYDuI@7_|Vn;XUj^{N"><field name="NUM">4</field></block></value><value name="H"><block type="math_number" id="hF8^%Pgx]hd|Q3_f)t.["><field name="NUM">180</field></block></value><value name="S"><block type="math_number" id="DupeYL6YBrsWQ2(60JEt"><field name="NUM">100</field></block></value><value name="B"><block type="math_number" id="VL7_xwJ7$Repp!)8a^zs"><field name="NUM">100</field></block></value><next><block type="flow_delay" id="%(|JA5ZwA;z|sW|rt1;x"><value name="DELAY"><block type="math_number" id="ub|)Kv;Ld?wG3SYy%,ZV"><field name="NUM">200</field></block></value></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block><block type="procedures_defnoreturn" id="c^Q=?l{x:FJ?Cm3Ncch(" collapsed="true" x="-701" y="146"><mutation><arg name="von Pos in °" varid="DoyC0N[TR?Wtuv+]QNjk"></arg><arg name="bis Pos in °" varid="8M|lsZfG.{JMk^B,=:P["></arg><arg name="Tempo in %" varid="|H,0pDre=%.#lJkTh33Q"></arg><arg name="Servo Pin" varid="Vw5IBG9C#Pa@r0U!+Bbh"></arg></mutation><field name="NAME">stelle Servo sanft</field><statement name="STACK"><block type="flow_for" id="MoL^$qp,s]q|#V}PCNel"><field name="VAR" id="_DQjdhaJfR6,f$7cgOQ7">Position in °</field><value name="FROM"><block type="math_number" id="V;Ieuii8?o:Tnb.0[a[N"><field name="NUM">0</field></block></value><value name="TO"><block type="math_number" id="^-^,ZT.?5jVw*o/}OAU@"><field name="NUM">3.141</field></block></value><value name="BY"><block type="math_map" id="XD^P~Qk|P($W8{5DOc}p"><value name="VALUE"><block type="variables_get" id="E?Zd6*s)DOd5/Y_5,2lM"><field name="VAR" id="|H,0pDre=%.#lJkTh33Q">Tempo in %</field></block></value><value name="FROMLOW"><block type="math_number" id="%GC=-JD8|y;:B[[f[n#U"><field name="NUM">0</field></block></value><value name="FROMHIGH"><block type="math_number" id=".ZWBxd~-|{*~cc2o9|q7"><field name="NUM">100</field></block></value><value name="TOLOW"><block type="math_number" id="f%@Q!+NEovExdlCD_d#n"><field name="NUM">0.001</field></block></value><value name="TOHIGH"><block type="math_number" id="relQ-8H6-k~[,FEIc#HH"><field name="NUM">0.1</field></block></value></block></value><statement name="DO"><block type="procedures_callnoreturn" id="h,f[+#.Bb}Xe`}luH7k@"><mutation name="stelle Servo"><arg name="Position in °"></arg><arg name="Servo Pin"></arg></mutation><value name="ARG0"><block type="math_map" id="mwXTpN_o):;]m;don~^w"><value name="VALUE"><block type="math_trig" id="*CoOOO~/KSP!ivteXph]"><field name="OP">COS</field><value name="NUM"><block type="variables_get" id="r@^JSALbD:Ryki$nBg.;"><field name="VAR" id="_DQjdhaJfR6,f$7cgOQ7">Position in °</field></block></value></block></value><value name="FROMLOW"><block type="math_number" id="{w-,lfw.uDu:8c/o=obQ"><field name="NUM">1</field></block></value><value name="FROMHIGH"><block type="math_number" id="Xa^2u$_Kn+/@4V/)o(-j"><field name="NUM">-1</field></block></value><value name="TOLOW"><block type="variables_get" id="wU4r,RDpQh@jfxg;EcxR"><field name="VAR" id="DoyC0N[TR?Wtuv+]QNjk">von Pos in °</field></block></value><value name="TOHIGH"><block type="variables_get" id="8P)Er_m+.;4yannpX11Q"><field name="VAR" id="8M|lsZfG.{JMk^B,=:P[">bis Pos in °</field></block></value></block></value><value name="ARG1"><block type="variables_get" id="$cU5xUL=@X?`I5bGb%`r"><field name="VAR" id="Vw5IBG9C#Pa@r0U!+Bbh">Servo Pin</field></block></value></block></statement></block></statement></block><block type="procedures_callreturn" id="?^r4{(iN#(HdO~:SO2*7" x="-927" y="200"><mutation name="Gemessene Distanz in cm"></mutation></block><block type="basic_comment" id="F_/ljKw(=X#18A=gcW|G" x="500" y="131"><field name="COMMENT">Aktiviere Servo und stosse Fahrzeug nach vorne ab. Teste, ob auch weniger als 60° möglich sind</field></block><block type="procedures_defreturn" id="VnG.[Xi?K@xVOSmR%A:Q" collapsed="true" x="-700" y="202"><field name="NAME">Gemessene Distanz in cm</field><statement name="STACK"><block type="led_write_state" id="(YnUm|J,9fsc(p4r9s;7"><value name="LED"><block type="led_pin" id="H.T)=mm`Ifwv2Fhc|S2f"><field name="LED">LED3</field></block></value><value name="VALUE"><block type="code_pin" id="2?t[*AxO#`+[63!Kbv|4"><field name="CODE_PIN">LOW</field></block></value><next><block type="flow_delay_micro" id="wg)XFQj(bZQ@7;s8Xn)g"><value name="DELAY_MICRO"><block type="math_number" id="+-ylq#`F5bV2s=I1tqw5"><field name="NUM">2</field></block></value><next><block type="led_write_state" id="^{tG^[d%-ztHVl2chmz3"><value name="LED"><block type="led_pin" id="v*lb+hhl[Wi(7pV0Rh2Y"><field name="LED">LED3</field></block></value><value name="VALUE"><block type="code_pin" id="W@AYsU^fM(0P#-M5(rD5"><field name="CODE_PIN">HIGH</field></block></value><next><block type="flow_delay_micro" id="b1cIi4)J^l_l*FFQ9YDW"><value name="DELAY_MICRO"><block type="math_number" id=";%*_lC[QmT=aFvU2dBmT"><field name="NUM">10</field></block></value><next><block type="led_write_state" id=")#=atR)n~|WSuN9-h*qS"><value name="LED"><block type="led_pin" id="vt(XIF^r7P4^(:[t9(|Y"><field name="LED">LED3</field></block></value><value name="VALUE"><block type="code_pin" id="mC9fceq(Z!8lgrV}*q#s"><field name="CODE_PIN">LOW</field></block></value><next><block type="variables_set" id="abkprn]D|R;FJkV?c1X%"><field name="VAR" id="w#g|TWs[|tK%g)vcs!n5">Verstrichene Zeit</field><value name="VALUE"><block type="code_pin" id="^l1C}Yuf?uC!$*grR2(~"><field name="CODE_PIN">pulseIn(16, HIGH)</field></block></value><next><block type="flow_delay" id="^~$p)C+|`cXjw=]|)4vk"><value name="DELAY"><block type="math_number" id="e`),5T9$86+YFbpttWJ4"><field name="NUM">5</field></block></value><next><block type="variables_set" id="%KSHJ,gWN(m1+Bf15WL-"><field name="VAR" id="Fgi(boC*F5V:]r|tcnW,">Distanz in cm</field><value name="VALUE"><block type="math_arithmetic" id="H!$n-us!:]A80ihl_Z)M"><field name="OP">MULTIPLY</field><value name="A"><block type="variables_get" id="5jMKhuU|jo^bbm)GwQ7-"><field name="VAR" id="w#g|TWs[|tK%g)vcs!n5">Verstrichene Zeit</field></block></value><value name="B"><block type="math_number" id="eWh9Q^v9;dBK`FlU1YC]"><field name="NUM">0.0175</field></block></value></block></value></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement><value name="RETURN"><block type="variables_get" id="^0,i^h8Sw0}Qz*WLV`X{"><field name="VAR" id="Fgi(boC*F5V:]r|tcnW,">Distanz in cm</field></block></value></block><block type="procedures_callnoreturn" id="6zA*:f_gj4!Y1wAts=I:" x="-1431" y="252"><mutation name="Leuchte Matrix"><arg name="Dezimalcode"></arg><arg name="Farbe°"></arg><arg name="Sättigung %"></arg><arg name="Helligkeit %"></arg></mutation><value name="ARG0"><block type="math_number" id="6eH}UwR355Ir_o1o}P[A"><field name="NUM">1632</field></block></value><value name="ARG1"><block type="math_number" id="zhx`E`0qUks52ggh-(}="><field name="NUM">250</field></block></value><value name="ARG2"><block type="math_number" id="V;#@D/M5)S6m%xdKz/z+"><field name="NUM">100</field></block></value><value name="ARG3"><block type="math_number" id="!48bdi#]0mb|H[hfs:vz"><field name="NUM">100</field></block></value></block><block type="procedures_defnoreturn" id="uCP4HJbTMu0Zs76)CH^*" collapsed="true" x="-699" y="255"><mutation><arg name="Dezimalcode" varid="PzJaWVHX--]9?^N_)#wn"></arg><arg name="Farbe°" varid="8[tP-gnNag|U*w*Y^_4="></arg><arg name="Sättigung %" varid="MO}nJEF/,hGyd-x(^`q+"></arg><arg name="Helligkeit %" varid="Lb]X9XmRcPagndnTyucG"></arg></mutation><field name="NAME">Leuchte Matrix</field><statement name="STACK"><block type="variables_set" id="nh)v2ZA`5dpjzyDpQX#z"><field name="VAR" id="XyR,!P+Ke(tQh=Y)F$j4">Dividend</field><value name="VALUE"><block type="variables_get" id="^li}kpVfk7H3`Q_jLYoy"><field name="VAR" id="PzJaWVHX--]9?^N_)#wn">Dezimalcode</field></block></value><next><block type="flow_for" id="90kB-:lp[/3CT_350=px"><field name="VAR" id="=ym7+h@?NuGhkbw7=9_v">Bitnummer</field><value name="FROM"><block type="math_number" id="*Xvn5xNcS[?2T`,~7I5q"><field name="NUM">1</field></block></value><value name="TO"><block type="math_number" id="~f`g9tSYD5h]Z)7?:`]4"><field name="NUM">16</field></block></value><value name="BY"><block type="math_number" id=",gmTJOc!M8!inOVHJi;6"><field name="NUM">1</field></block></value><statement name="DO"><block type="variables_set" id="Up9aahxIfp[A%L`*Qnw1"><field name="VAR" id="BO3Cn-5z+8Y:Zu5ii*{O">Bit</field><value name="VALUE"><block type="math_single_basic" id="/-i*-sbO:D!TU},#QTCN"><field name="OP">ABS</field><value name="NUM"><block type="math_div" id="tNQ($77tg3dW_eA{.W__"><value name="VAL1"><block type="code_pin" id="Ho#O^)5rv:^elTerYa/i"><field name="CODE_PIN">(unsigned int)Dividend</field></block></value><value name="VAL2"><block type="math_number" id="TIRieh|^WvQ)IOUq$fi^"><field name="NUM">2</field></block></value></block></value></block></value><next><block type="logic_if" id="gITwD)p3W.y@gfxR4gbG"><value name="IF0"><block type="logic_compare" id="eDcSt_#5NnU08uvz0pgk"><field name="OP">EQ</field><value name="A"><block type="variables_get" id="!XYhs#osSAJTEADJ}6gQ"><field name="VAR" id="BO3Cn-5z+8Y:Zu5ii*{O">Bit</field></block></value><value name="B"><block type="math_number" id="+lm+(l$_$,BcMq?P1c%%"><field name="NUM">1</field></block></value></block></value><statement name="DO0"><block type="set_pixel_color" id="702Ct0l!zs6,HtbKhAT;"><field name="MODE">MODE2</field><value name="FROM"><block type="variables_get" id="qd~K,2KGT``,Qk5=L2Ko"><field name="VAR" id="=ym7+h@?NuGhkbw7=9_v">Bitnummer</field></block></value><value name="TO"><block type="math_number" id="S`I(;g-TR|y%C64eydmY"><field name="NUM">1</field></block></value><value name="H"><block type="variables_get" id="[^#q@00stBpa$0:pt-#f"><field name="VAR" id="8[tP-gnNag|U*w*Y^_4=">Farbe°</field></block></value><value name="S"><block type="variables_get" id="6,z;zXo#*C4h)KwPOI{W"><field name="VAR" id="MO}nJEF/,hGyd-x(^`q+">Sättigung %</field></block></value><value name="B"><block type="math_arithmetic" id="F1Q@ZE3YeG7ZDB|NZkI)"><field name="OP">MULTIPLY</field><value name="A"><block type="variables_get" id="9HO@{A:Y?+a+Y/!N6R[J"><field name="VAR" id="BO3Cn-5z+8Y:Zu5ii*{O">Bit</field></block></value><value name="B"><block type="variables_get" id="AuAXZu#PAnd.R%;}!tlY"><field name="VAR" id="Lb]X9XmRcPagndnTyucG">Helligkeit %</field></block></value></block></value></block></statement><next><block type="variables_set" id="ow7L]s$H4X|57O@gb2#v"><field name="VAR" id="XyR,!P+Ke(tQh=Y)F$j4">Dividend</field><value name="VALUE"><block type="math_arithmetic" id="S3(5ARcsl|s@Y{r:0_x+"><field name="OP">DIVIDE</field><value name="A"><block type="code_pin" id="qef@UewcAWFW!TP)?oC9"><field name="CODE_PIN">(unsigned int)Dividend</field></block></value><value name="B"><block type="math_number" id="cya`+vH7WvVKaKL:8W-1"><field name="NUM">2</field></block></value></block></value></block></next></block></next></block></statement><next><block type="fast_led" id="HC,Y~u:NU%+:U:RnB5z2"><next><block type="fast_led_clear" id="HM+iUc?ZYMU82+=@?%}["></block></next></block></next></block></next></block></statement></block><block type="basic_comment" id="5$!Fk?4$jpZOZi3[UZJY" x="-362" y="244"><field name="COMMENT">90° ist die Mittelposition des Servos (Ruheposition)&amp;#10;Stimmt dies für deinen Roboter oder musst du dies korrigieren?</field></block><block type="procedures_callnoreturn" id="437YsL9XN%em{}Ohn3,b" x="-1503" y="304"><mutation name="Matrix in Zwischenspeicher"><arg name="Dezimalcode"></arg><arg name="Farbe°"></arg><arg name="Sättigung %"></arg><arg name="Helligkeit %"></arg></mutation><value name="ARG0"><block type="math_number" id="6}rQk~R/q.zVpia`AA[s"><field name="NUM">1632</field></block></value><value name="ARG1"><block type="math_number" id="RuG{G{%r]$$NVDOJN3x+"><field name="NUM">250</field></block></value><value name="ARG2"><block type="math_number" id="j]_BOu{B~_-mNoL52/^h"><field name="NUM">100</field></block></value><value name="ARG3"><block type="math_number" id="^QMtS4)|Q59[B(6OKOGv"><field name="NUM">100</field></block></value></block><block type="procedures_defnoreturn" id="}f8qz_?3-H.xNQ7IOd/=" collapsed="true" x="-697" y="309"><mutation><arg name="Dezimalcode" varid="PzJaWVHX--]9?^N_)#wn"></arg><arg name="Farbe°" varid="8[tP-gnNag|U*w*Y^_4="></arg><arg name="Sättigung %" varid="MO}nJEF/,hGyd-x(^`q+"></arg><arg name="Helligkeit %" varid="Lb]X9XmRcPagndnTyucG"></arg></mutation><field name="NAME">Matrix in Zwischenspeicher</field><statement name="STACK"><block type="variables_set" id="Z9CYP7:vA5mvz(_8z*Dt"><field name="VAR" id="XyR,!P+Ke(tQh=Y)F$j4">Dividend</field><value name="VALUE"><block type="variables_get" id="66/66^YY2[p`W/;*LTp)"><field name="VAR" id="PzJaWVHX--]9?^N_)#wn">Dezimalcode</field></block></value><next><block type="flow_for" id="-`XaNw0I4204MC6.:sXL"><field name="VAR" id="=ym7+h@?NuGhkbw7=9_v">Bitnummer</field><value name="FROM"><block type="math_number" id="?o*6]nP1m+MSJ74ak]o^"><field name="NUM">1</field></block></value><value name="TO"><block type="math_number" id="G:_N:4gCwPs6D-i0OF_;"><field name="NUM">16</field></block></value><value name="BY"><block type="math_number" id="/cIa1M(6yC`wziM@iQi;"><field name="NUM">1</field></block></value><statement name="DO"><block type="variables_set" id="]fIfJR#}_^i8J_53/JJ/"><field name="VAR" id="BO3Cn-5z+8Y:Zu5ii*{O">Bit</field><value name="VALUE"><block type="math_single_basic" id="(kQ.?wOh[@,Ll)CNkGu#"><field name="OP">ABS</field><value name="NUM"><block type="math_div" id="GDiE4`iQV%Rem*DYnUNU"><value name="VAL1"><block type="code_pin" id="DP-Ir.`-/he_=junA([#"><field name="CODE_PIN">(unsigned int)Dividend</field></block></value><value name="VAL2"><block type="math_number" id="LwN/4JSj(QT.@ojxo`f$"><field name="NUM">2</field></block></value></block></value></block></value><next><block type="logic_if" id="edL0[5,ZbG%bIJkcDk@v"><value name="IF0"><block type="logic_compare" id="l,kR$cME#rSK~hM}@SJJ"><field name="OP">EQ</field><value name="A"><block type="variables_get" id="ImQNOlWP4*Aoy_3!yUhE"><field name="VAR" id="BO3Cn-5z+8Y:Zu5ii*{O">Bit</field></block></value><value name="B"><block type="math_number" id="xAAq|*@mNPL%TQ*,a]NN"><field name="NUM">1</field></block></value></block></value><statement name="DO0"><block type="set_pixel_color" id="A%!ld+#i%[!Q=-Bjy8p9"><field name="MODE">MODE2</field><value name="FROM"><block type="variables_get" id="2PRjxeTpxt%ErDx$u6*X"><field name="VAR" id="=ym7+h@?NuGhkbw7=9_v">Bitnummer</field></block></value><value name="TO"><block type="math_number" id="Onnp4^BS1]Iy-{z!`mPM"><field name="NUM">1</field></block></value><value name="H"><block type="variables_get" id="5dALxK|(,/_Q.7luty[W"><field name="VAR" id="8[tP-gnNag|U*w*Y^_4=">Farbe°</field></block></value><value name="S"><block type="variables_get" id="S7N[bf3;7QR`C]iGzW!5"><field name="VAR" id="MO}nJEF/,hGyd-x(^`q+">Sättigung %</field></block></value><value name="B"><block type="math_arithmetic" id="}xG0Uc9.8`kZNcO:PvYF"><field name="OP">MULTIPLY</field><value name="A"><block type="variables_get" id="_oo_Oq7L2@7_UzC36.x;"><field name="VAR" id="BO3Cn-5z+8Y:Zu5ii*{O">Bit</field></block></value><value name="B"><block type="variables_get" id="V!Pl2klmOXiI#`]`BXup"><field name="VAR" id="Lb]X9XmRcPagndnTyucG">Helligkeit %</field></block></value></block></value></block></statement><next><block type="variables_set" id="K1S5u~KN7fG09o:@4k-_"><field name="VAR" id="XyR,!P+Ke(tQh=Y)F$j4">Dividend</field><value name="VALUE"><block type="math_arithmetic" id="S!wp|m=b2EpYo0^Z[nUK"><field name="OP">DIVIDE</field><value name="A"><block type="code_pin" id="@MZ8(:-MT=bCc;*%].7="><field name="CODE_PIN">(unsigned int)Dividend</field></block></value><value name="B"><block type="math_number" id=",}2FU}vf,Ub.$`Xq*(6z"><field name="NUM">2</field></block></value></block></value></block></next></block></next></block></statement></block></next></block></statement></block><block type="basic_comment" id="ux~QVc)-`v3xdqjG3B//" x="501" y="252"><field name="COMMENT">Stelle Servo auf Ruheposition</field></block><block type="procedures_callnoreturn" id="t%3LM+nVINgVb)@_u_M|" x="-1371" y="359"><mutation name="Speichere Sensorsignal in Matrix-Zwischenspeicher"><arg name="Sensor"></arg><arg name="Farbe"></arg></mutation><value name="ARG0"><block type="sensor_pin" id="XztH9v==_UQvgKga]Lg+"><field name="SENSOR">SENSOR4</field></block></value><value name="ARG1"><block type="math_number" id="yj+OQ6-_R.z2]Mvh}}7u"><field name="NUM">120</field></block></value></block><block type="procedures_defnoreturn" id="Y4[D;EM3t2H(L3rI^-S(" collapsed="true" x="-696" y="362"><mutation><arg name="Sensor" varid="q?p.CO_^]c.:1)BL`*kZ"></arg><arg name="Farbe" varid="uSI+-od^%Wqd^spA`}u="></arg></mutation><field name="NAME">Speichere Sensorsignal in Matrix-Zwischenspeicher</field><statement name="STACK"><block type="set_pixel_color" id="Vl+j5rF.2PB4|,4nw)Gq"><field name="MODE">MODE2</field><value name="FROM"><block type="math_arithmetic" id="cA+c{@:mc{VvzBNVKQfp"><field name="OP">MULTIPLY</field><value name="A"><block type="sensor_read_percentage" id=".vc[zdUI5wfoI!3lINh{"><value name="SENSOR"><block type="variables_get" id="9?f6UJj?MsfFy;%:d7cf"><field name="VAR" id="q?p.CO_^]c.:1)BL`*kZ">Sensor</field></block></value></block></value><value name="B"><block type="math_number" id="V]}mDgJHiWn*lg[WFRK4"><field name="NUM">0.16</field></block></value></block></value><value name="TO"><block type="math_number" id="%jjLuy7h/Ks=`q-NZh9O"><field name="NUM">1</field></block></value><value name="H"><block type="variables_get" id="sUA+.f:b4bf+3di|56+t"><field name="VAR" id="uSI+-od^%Wqd^spA`}u=">Farbe</field></block></value><value name="S"><block type="math_number" id="iAe#bFv{BTa,=vz|f2,h"><field name="NUM">100</field></block></value><value name="B"><block type="math_number" id="0COp,vQ^;Hx]:OjzIJR]"><field name="NUM">100</field></block></value></block></statement></block><block type="basic_comment" id="`lj=`*pyK-N0v]:CfM6H" x="508" y="376"><field name="COMMENT">Aktiviere Servo und stosse Fahrzeug nach hinten ab. Teste, ob auch mehr als 120° möglich sind</field></block></xml>
3d

Sensor testen

Teste den Lichtsensor und das Potentiometer, gleich wie im Video. Indem der Grüne Punkt auf der Matrix verschoben wird, legst du den Schwellenwert fest. An diesem Punkt wird die Servobewegung ausgeführt und die Matrix leuchtet blau.

Bei welchen Bedingungen funktioniert der Push-Roll-Bot am besten? Ideal sind diese Lichtverhältnisse:
> Möglichst viel gleichmässiges Licht das von oben kommt
> Am besten geht es im Freien, bei bedecktem Himmel
> Achte in Innenräumen auf gleichmässiges Licht von mehreren Deckenleuchten

Challenge: XML-Code in Editor einfügen
<xml xmlns="https://developers.google.com/blockly/xml"><variables><variable id="_DQjdhaJfR6,f$7cgOQ7">Position in °</variable><variable id="Vw5IBG9C#Pa@r0U!+Bbh">Servo Pin</variable><variable id="DoyC0N[TR?Wtuv+]QNjk">von Pos in °</variable><variable id="8M|lsZfG.{JMk^B,=:P[">bis Pos in °</variable><variable id="|H,0pDre=%.#lJkTh33Q">Tempo in %</variable><variable id="PzJaWVHX--]9?^N_)#wn">Dezimalcode</variable><variable id="8[tP-gnNag|U*w*Y^_4=">Farbe°</variable><variable id="MO}nJEF/,hGyd-x(^`q+">Sättigung %</variable><variable id="Lb]X9XmRcPagndnTyucG">Helligkeit %</variable><variable id="q?p.CO_^]c.:1)BL`*kZ">Sensor</variable><variable id="uSI+-od^%Wqd^spA`}u=">Farbe</variable><variable id="Fgi(boC*F5V:]r|tcnW,">Distanz in cm</variable><variable id="XyR,!P+Ke(tQh=Y)F$j4">Dividend</variable><variable id="K:G4UACKdRDr(dE9O39G">Pos 1</variable><variable id="=ym7+h@?NuGhkbw7=9_v">Bitnummer</variable><variable id="BO3Cn-5z+8Y:Zu5ii*{O">Bit</variable><variable id="w#g|TWs[|tK%g)vcs!n5">Verstrichene Zeit</variable></variables><block type="set_neo_pixel" id="!Om9r{B%q#Ax%A]Do=O0" x="-118" y="-34"><value name="NUM_LEDS"><block type="math_number" id="sGg3N3FKmd)8(6;uEI{*"><field name="NUM">16</field></block></value><value name="BRIGHTNESS"><block type="math_number" id="W2KAj#}-gE`P}9v*v)3B"><field name="NUM">100</field></block></value><value name="OUTTURN"><block type="led_pin" id="9-MqZA.)f?Uo,GG(]b7X"><field name="LED">LED1</field></block></value></block><block type="basic_comment" id="|.$x+yKiz`j-,~[?eRLs" x="-700" y="32"><field name="COMMENT">Nicht löschen, Unterprogramme</field></block><block type="procedures_callnoreturn" id="+Dik-l#xDh27XSm4_Ez*" x="-1168" y="88"><mutation name="stelle Servo"><arg name="Position in °"></arg><arg name="Servo Pin"></arg></mutation><value name="ARG0"><block type="math_number" id="FuKA)24e!YPnL!6uVGNQ"><field name="NUM">0</field></block></value><value name="ARG1"><block type="led_pin" id="*N?*%c`@1TVI3UGN1p?N"><field name="LED">LED2</field></block></value></block><block type="procedures_defnoreturn" id="DYYovfp[/{/^ryWHZBvf" collapsed="true" x="-700" y="91"><mutation><arg name="Position in °" varid="_DQjdhaJfR6,f$7cgOQ7"></arg><arg name="Servo Pin" varid="Vw5IBG9C#Pa@r0U!+Bbh"></arg></mutation><field name="NAME">stelle Servo</field><statement name="STACK"><block type="variables_set" id="b*l`jfDpwv@_`yEQ:sQU"><field name="VAR" id="_DQjdhaJfR6,f$7cgOQ7">Position in °</field><value name="VALUE"><block type="math_map" id="wY2I~E@9)6mqH{`4}Min"><value name="VALUE"><block type="variables_get" id="sM%OH#-),/XvNLAfoDgM"><field name="VAR" id="_DQjdhaJfR6,f$7cgOQ7">Position in °</field></block></value><value name="FROMLOW"><block type="math_number" id="5*[TWQi3eTy;dTNqRejO"><field name="NUM">0</field></block></value><value name="FROMHIGH"><block type="math_number" id="3FohKj*x~t~gZ.sYtS2("><field name="NUM">180</field></block></value><value name="TOLOW"><block type="math_number" id="y+3B7BV,l3#e!tC#zP45"><field name="NUM">450</field></block></value><value name="TOHIGH"><block type="math_number" id="n[XOgoHB+-0i.,Gpwf%1"><field name="NUM">2550</field></block></value></block></value><next><block type="variables_set" id=".xsEB~Y8Qx!^%8P%)mh;"><field name="VAR" id="K:G4UACKdRDr(dE9O39G">Pos 1</field><value name="VALUE"><block type="math_arithmetic" id="{F9Honx#=x}}p5s6~3pd"><field name="OP">MINUS</field><value name="A"><block type="math_number" id="nN}B3!9SLvv*1{Zlf(%h"><field name="NUM">20000</field></block></value><value name="B"><block type="variables_get" id="mZbi[2Xx35m9qZ2Wz|b_"><field name="VAR" id="_DQjdhaJfR6,f$7cgOQ7">Position in °</field></block></value></block></value><next><block type="flow_repeat" id="gN=t~3M0%R7Pe)/i-V4G"><value name="REPEATS"><block type="math_number" id="+qOr!,*|C9.5wJ[w,ENN"><field name="NUM">50</field></block></value><statement name="DO"><block type="led_write_state" id="6!l6z?iL+={{9KAi,H|9"><value name="LED"><block type="variables_get" id="0L`R`5_!X{Az,9F)`Qac"><field name="VAR" id="Vw5IBG9C#Pa@r0U!+Bbh">Servo Pin</field></block></value><value name="VALUE"><block type="code_pin" id="+7pwX/P2*!~K,CbqH7gH"><field name="CODE_PIN">HIGH</field></block></value><next><block type="flow_delay_micro" id="Y3736,h2Aea/$FEM%mGd"><value name="DELAY_MICRO"><block type="variables_get" id=")Lg-8viw{x?GWSZtdPfK"><field name="VAR" id="_DQjdhaJfR6,f$7cgOQ7">Position in °</field></block></value><next><block type="led_write_state" id="=R-dB9$gUgUf[f1#amX?"><value name="LED"><block type="variables_get" id="L{aTSjwfCBro[60WW.0E"><field name="VAR" id="Vw5IBG9C#Pa@r0U!+Bbh">Servo Pin</field></block></value><value name="VALUE"><block type="code_pin" id="ZI?r50,S}Q!N4EWcI9rk"><field name="CODE_PIN">LOW</field></block></value><next><block type="flow_delay_micro" id="7il;NbzoR^Es7say`(zt"><value name="DELAY_MICRO"><block type="variables_get" id="|@!H=EXua/xr-NRDCr5g"><field name="VAR" id="K:G4UACKdRDr(dE9O39G">Pos 1</field></block></value></block></next></block></next></block></next></block></statement></block></next></block></next></block></statement></block><block type="procedures_callnoreturn" id="2J_{LmcNIYk{Z?kV+;::" x="-1468" y="141"><mutation name="stelle Servo sanft"><arg name="von Pos in °"></arg><arg name="bis Pos in °"></arg><arg name="Tempo in %"></arg><arg name="Servo Pin"></arg></mutation><value name="ARG0"><block type="math_number" id="]_j_u)];;xHA8-_B3$7B"><field name="NUM">0</field></block></value><value name="ARG1"><block type="math_number" id="]W:g?fprmZ}8_8xDy2JB"><field name="NUM">160</field></block></value><value name="ARG2"><block type="math_number" id="z{3!U)]mou,t,b?*wzax"><field name="NUM">50</field></block></value><value name="ARG3"><block type="led_pin" id="wew.m#TufNiqRG~QVRLG"><field name="LED">LED2</field></block></value></block><block type="basic_main_loop" id="9~210UV)!{|GniQxFn|[" deletable="false" x="-115" y="82"><value name="BLINK"><block type="basic_blinkcode" id="u@6%knhMhK2g(1JYw[10"><field name="SHORT">1</field><field name="LONG">1</field></block></value><statement name="CODE"><block type="logic_if" id="ZszD8XVSk[8UX_z1.=xz"><mutation xmlns="http://www.w3.org/1999/xhtml" else="1"></mutation><value name="IF0"><block type="logic_compare" id="@|ZXtR2~__6Vaqu/3Coi"><field name="OP">LT</field><value name="A"><block type="sensor_read_percentage" id="O|#wJDxK,0$y~[-=YKmR"><value name="SENSOR"><block type="sensor_pin" id="oCrrV#r-+WAaFG[wO!G*"><field name="SENSOR">SENSOR1</field></block></value></block></value><value name="B"><block type="sensor_read_percentage" id="Xb]0Y(](GQ%F5uRu79=!"><value name="SENSOR"><block type="sensor_pin" id="e?Z:s=`8=2Qo{q8V|Sw*"><field name="SENSOR">SENSOR4</field></block></value></block></value></block></value><statement name="DO0"><block type="set_pixel_color" id="sastFyRzYau}qwo`GOYS"><field name="MODE">MODE1</field><value name="FROM"><block type="math_number" id="I(?j(AaA7C/Qt,nC.t?8"><field name="NUM">1</field></block></value><value name="TO"><block type="math_number" id="}I[|st`/NYn,0S.vP5t5"><field name="NUM">16</field></block></value><value name="H"><block type="math_number" id="SB)nXPT^ql:qOBelnSju"><field name="NUM">225</field></block></value><value name="S"><block type="math_number" id="nw/6a.D8X6Z{]M644kfk"><field name="NUM">100</field></block></value><value name="B"><block type="math_number" id="!(1AuGj~w+w@6WeQ9!u$"><field name="NUM">100</field></block></value><next><block type="flow_delay" id="AsF-(5EU|IN`ji(E_EG5"><value name="DELAY"><block type="math_number" id="sBAz9cfVVc,};MFrZWb1"><field name="NUM">500</field></block></value></block></next></block></statement><statement name="ELSE"><block type="procedures_callnoreturn" id="dUUE]oWfv~a%Yilb^?RB"><mutation name="Speichere Sensorsignal in Matrix-Zwischenspeicher"><arg name="Sensor"></arg><arg name="Farbe"></arg></mutation><value name="ARG0"><block type="sensor_pin" id="RlPa`H]t(6(|@6l9T7cj"><field name="SENSOR">SENSOR1</field></block></value><value name="ARG1"><block type="math_number" id="[3TpxRfHBS:l3mKY5H}9"><field name="NUM">10</field></block></value><next><block type="procedures_callnoreturn" id="TB(|m`U9O{;$2%XVf{c^"><mutation name="Speichere Sensorsignal in Matrix-Zwischenspeicher"><arg name="Sensor"></arg><arg name="Farbe"></arg></mutation><value name="ARG0"><block type="sensor_pin" id="Y=G@0kr=B9$XXy349)g@"><field name="SENSOR">SENSOR4</field></block></value><value name="ARG1"><block type="math_number" id="p|^{b_`(dib!u[kEt4%S"><field name="NUM">120</field></block></value><next><block type="fast_led" id="[%0*sxjUP)i*eyDaqVXg"><next><block type="fast_led_clear" id="{RY|sVvTXs0/CB,Fc/S?"></block></next></block></next></block></next></block></statement></block></statement></block><block type="procedures_defnoreturn" id="c^Q=?l{x:FJ?Cm3Ncch(" collapsed="true" x="-701" y="146"><mutation><arg name="von Pos in °" varid="DoyC0N[TR?Wtuv+]QNjk"></arg><arg name="bis Pos in °" varid="8M|lsZfG.{JMk^B,=:P["></arg><arg name="Tempo in %" varid="|H,0pDre=%.#lJkTh33Q"></arg><arg name="Servo Pin" varid="Vw5IBG9C#Pa@r0U!+Bbh"></arg></mutation><field name="NAME">stelle Servo sanft</field><statement name="STACK"><block type="flow_for" id="MoL^$qp,s]q|#V}PCNel"><field name="VAR" id="_DQjdhaJfR6,f$7cgOQ7">Position in °</field><value name="FROM"><block type="math_number" id="V;Ieuii8?o:Tnb.0[a[N"><field name="NUM">0</field></block></value><value name="TO"><block type="math_number" id="^-^,ZT.?5jVw*o/}OAU@"><field name="NUM">3.141</field></block></value><value name="BY"><block type="math_map" id="XD^P~Qk|P($W8{5DOc}p"><value name="VALUE"><block type="variables_get" id="E?Zd6*s)DOd5/Y_5,2lM"><field name="VAR" id="|H,0pDre=%.#lJkTh33Q">Tempo in %</field></block></value><value name="FROMLOW"><block type="math_number" id="%GC=-JD8|y;:B[[f[n#U"><field name="NUM">0</field></block></value><value name="FROMHIGH"><block type="math_number" id=".ZWBxd~-|{*~cc2o9|q7"><field name="NUM">100</field></block></value><value name="TOLOW"><block type="math_number" id="f%@Q!+NEovExdlCD_d#n"><field name="NUM">0.001</field></block></value><value name="TOHIGH"><block type="math_number" id="relQ-8H6-k~[,FEIc#HH"><field name="NUM">0.1</field></block></value></block></value><statement name="DO"><block type="procedures_callnoreturn" id="h,f[+#.Bb}Xe`}luH7k@"><mutation name="stelle Servo"><arg name="Position in °"></arg><arg name="Servo Pin"></arg></mutation><value name="ARG0"><block type="math_map" id="mwXTpN_o):;]m;don~^w"><value name="VALUE"><block type="math_trig" id="*CoOOO~/KSP!ivteXph]"><field name="OP">COS</field><value name="NUM"><block type="variables_get" id="r@^JSALbD:Ryki$nBg.;"><field name="VAR" id="_DQjdhaJfR6,f$7cgOQ7">Position in °</field></block></value></block></value><value name="FROMLOW"><block type="math_number" id="{w-,lfw.uDu:8c/o=obQ"><field name="NUM">1</field></block></value><value name="FROMHIGH"><block type="math_number" id="Xa^2u$_Kn+/@4V/)o(-j"><field name="NUM">-1</field></block></value><value name="TOLOW"><block type="variables_get" id="wU4r,RDpQh@jfxg;EcxR"><field name="VAR" id="DoyC0N[TR?Wtuv+]QNjk">von Pos in °</field></block></value><value name="TOHIGH"><block type="variables_get" id="8P)Er_m+.;4yannpX11Q"><field name="VAR" id="8M|lsZfG.{JMk^B,=:P[">bis Pos in °</field></block></value></block></value><value name="ARG1"><block type="variables_get" id="$cU5xUL=@X?`I5bGb%`r"><field name="VAR" id="Vw5IBG9C#Pa@r0U!+Bbh">Servo Pin</field></block></value></block></statement></block></statement></block><block type="basic_comment" id="B.#/T$lpsTJ-qTQD`a2t" x="637" y="118"><field name="COMMENT">Überprüfe, ob der Sensorwert des Lichtsensors höher ist, als der eingestellte Schwellenwert am Potentiometer</field></block><block type="procedures_callreturn" id="?^r4{(iN#(HdO~:SO2*7" x="-927" y="200"><mutation name="Gemessene Distanz in cm"></mutation></block><block type="procedures_defreturn" id="VnG.[Xi?K@xVOSmR%A:Q" collapsed="true" x="-700" y="202"><field name="NAME">Gemessene Distanz in cm</field><statement name="STACK"><block type="led_write_state" id="(YnUm|J,9fsc(p4r9s;7"><value name="LED"><block type="led_pin" id="H.T)=mm`Ifwv2Fhc|S2f"><field name="LED">LED3</field></block></value><value name="VALUE"><block type="code_pin" id="2?t[*AxO#`+[63!Kbv|4"><field name="CODE_PIN">LOW</field></block></value><next><block type="flow_delay_micro" id="wg)XFQj(bZQ@7;s8Xn)g"><value name="DELAY_MICRO"><block type="math_number" id="+-ylq#`F5bV2s=I1tqw5"><field name="NUM">2</field></block></value><next><block type="led_write_state" id="^{tG^[d%-ztHVl2chmz3"><value name="LED"><block type="led_pin" id="v*lb+hhl[Wi(7pV0Rh2Y"><field name="LED">LED3</field></block></value><value name="VALUE"><block type="code_pin" id="W@AYsU^fM(0P#-M5(rD5"><field name="CODE_PIN">HIGH</field></block></value><next><block type="flow_delay_micro" id="b1cIi4)J^l_l*FFQ9YDW"><value name="DELAY_MICRO"><block type="math_number" id=";%*_lC[QmT=aFvU2dBmT"><field name="NUM">10</field></block></value><next><block type="led_write_state" id=")#=atR)n~|WSuN9-h*qS"><value name="LED"><block type="led_pin" id="vt(XIF^r7P4^(:[t9(|Y"><field name="LED">LED3</field></block></value><value name="VALUE"><block type="code_pin" id="mC9fceq(Z!8lgrV}*q#s"><field name="CODE_PIN">LOW</field></block></value><next><block type="variables_set" id="abkprn]D|R;FJkV?c1X%"><field name="VAR" id="w#g|TWs[|tK%g)vcs!n5">Verstrichene Zeit</field><value name="VALUE"><block type="code_pin" id="^l1C}Yuf?uC!$*grR2(~"><field name="CODE_PIN">pulseIn(16, HIGH)</field></block></value><next><block type="flow_delay" id="^~$p)C+|`cXjw=]|)4vk"><value name="DELAY"><block type="math_number" id="e`),5T9$86+YFbpttWJ4"><field name="NUM">5</field></block></value><next><block type="variables_set" id="%KSHJ,gWN(m1+Bf15WL-"><field name="VAR" id="Fgi(boC*F5V:]r|tcnW,">Distanz in cm</field><value name="VALUE"><block type="math_arithmetic" id="H!$n-us!:]A80ihl_Z)M"><field name="OP">MULTIPLY</field><value name="A"><block type="variables_get" id="5jMKhuU|jo^bbm)GwQ7-"><field name="VAR" id="w#g|TWs[|tK%g)vcs!n5">Verstrichene Zeit</field></block></value><value name="B"><block type="math_number" id="eWh9Q^v9;dBK`FlU1YC]"><field name="NUM">0.0175</field></block></value></block></value></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement><value name="RETURN"><block type="variables_get" id="^0,i^h8Sw0}Qz*WLV`X{"><field name="VAR" id="Fgi(boC*F5V:]r|tcnW,">Distanz in cm</field></block></value></block><block type="procedures_callnoreturn" id="6zA*:f_gj4!Y1wAts=I:" x="-1431" y="252"><mutation name="Leuchte Matrix"><arg name="Dezimalcode"></arg><arg name="Farbe°"></arg><arg name="Sättigung %"></arg><arg name="Helligkeit %"></arg></mutation><value name="ARG0"><block type="math_number" id="6eH}UwR355Ir_o1o}P[A"><field name="NUM">1632</field></block></value><value name="ARG1"><block type="math_number" id="zhx`E`0qUks52ggh-(}="><field name="NUM">250</field></block></value><value name="ARG2"><block type="math_number" id="V;#@D/M5)S6m%xdKz/z+"><field name="NUM">100</field></block></value><value name="ARG3"><block type="math_number" id="!48bdi#]0mb|H[hfs:vz"><field name="NUM">100</field></block></value></block><block type="basic_comment" id="x6(N~Y,gw~3y[3~EdW!1" x="785" y="168"><field name="COMMENT">Wenn ja, leuchte mit allen Pixeln blau, während 500ms</field></block><block type="procedures_defnoreturn" id="uCP4HJbTMu0Zs76)CH^*" collapsed="true" x="-699" y="255"><mutation><arg name="Dezimalcode" varid="PzJaWVHX--]9?^N_)#wn"></arg><arg name="Farbe°" varid="8[tP-gnNag|U*w*Y^_4="></arg><arg name="Sättigung %" varid="MO}nJEF/,hGyd-x(^`q+"></arg><arg name="Helligkeit %" varid="Lb]X9XmRcPagndnTyucG"></arg></mutation><field name="NAME">Leuchte Matrix</field><statement name="STACK"><block type="variables_set" id="nh)v2ZA`5dpjzyDpQX#z"><field name="VAR" id="XyR,!P+Ke(tQh=Y)F$j4">Dividend</field><value name="VALUE"><block type="variables_get" id="^li}kpVfk7H3`Q_jLYoy"><field name="VAR" id="PzJaWVHX--]9?^N_)#wn">Dezimalcode</field></block></value><next><block type="flow_for" id="90kB-:lp[/3CT_350=px"><field name="VAR" id="=ym7+h@?NuGhkbw7=9_v">Bitnummer</field><value name="FROM"><block type="math_number" id="*Xvn5xNcS[?2T`,~7I5q"><field name="NUM">1</field></block></value><value name="TO"><block type="math_number" id="~f`g9tSYD5h]Z)7?:`]4"><field name="NUM">16</field></block></value><value name="BY"><block type="math_number" id=",gmTJOc!M8!inOVHJi;6"><field name="NUM">1</field></block></value><statement name="DO"><block type="variables_set" id="Up9aahxIfp[A%L`*Qnw1"><field name="VAR" id="BO3Cn-5z+8Y:Zu5ii*{O">Bit</field><value name="VALUE"><block type="math_single_basic" id="/-i*-sbO:D!TU},#QTCN"><field name="OP">ABS</field><value name="NUM"><block type="math_div" id="tNQ($77tg3dW_eA{.W__"><value name="VAL1"><block type="code_pin" id="Ho#O^)5rv:^elTerYa/i"><field name="CODE_PIN">(unsigned int)Dividend</field></block></value><value name="VAL2"><block type="math_number" id="TIRieh|^WvQ)IOUq$fi^"><field name="NUM">2</field></block></value></block></value></block></value><next><block type="logic_if" id="gITwD)p3W.y@gfxR4gbG"><value name="IF0"><block type="logic_compare" id="eDcSt_#5NnU08uvz0pgk"><field name="OP">EQ</field><value name="A"><block type="variables_get" id="!XYhs#osSAJTEADJ}6gQ"><field name="VAR" id="BO3Cn-5z+8Y:Zu5ii*{O">Bit</field></block></value><value name="B"><block type="math_number" id="+lm+(l$_$,BcMq?P1c%%"><field name="NUM">1</field></block></value></block></value><statement name="DO0"><block type="set_pixel_color" id="702Ct0l!zs6,HtbKhAT;"><field name="MODE">MODE2</field><value name="FROM"><block type="variables_get" id="qd~K,2KGT``,Qk5=L2Ko"><field name="VAR" id="=ym7+h@?NuGhkbw7=9_v">Bitnummer</field></block></value><value name="TO"><block type="math_number" id="S`I(;g-TR|y%C64eydmY"><field name="NUM">1</field></block></value><value name="H"><block type="variables_get" id="[^#q@00stBpa$0:pt-#f"><field name="VAR" id="8[tP-gnNag|U*w*Y^_4=">Farbe°</field></block></value><value name="S"><block type="variables_get" id="6,z;zXo#*C4h)KwPOI{W"><field name="VAR" id="MO}nJEF/,hGyd-x(^`q+">Sättigung %</field></block></value><value name="B"><block type="math_arithmetic" id="F1Q@ZE3YeG7ZDB|NZkI)"><field name="OP">MULTIPLY</field><value name="A"><block type="variables_get" id="9HO@{A:Y?+a+Y/!N6R[J"><field name="VAR" id="BO3Cn-5z+8Y:Zu5ii*{O">Bit</field></block></value><value name="B"><block type="variables_get" id="AuAXZu#PAnd.R%;}!tlY"><field name="VAR" id="Lb]X9XmRcPagndnTyucG">Helligkeit %</field></block></value></block></value></block></statement><next><block type="variables_set" id="ow7L]s$H4X|57O@gb2#v"><field name="VAR" id="XyR,!P+Ke(tQh=Y)F$j4">Dividend</field><value name="VALUE"><block type="math_arithmetic" id="S3(5ARcsl|s@Y{r:0_x+"><field name="OP">DIVIDE</field><value name="A"><block type="code_pin" id="qef@UewcAWFW!TP)?oC9"><field name="CODE_PIN">(unsigned int)Dividend</field></block></value><value name="B"><block type="math_number" id="cya`+vH7WvVKaKL:8W-1"><field name="NUM">2</field></block></value></block></value></block></next></block></next></block></statement><next><block type="fast_led" id="HC,Y~u:NU%+:U:RnB5z2"><next><block type="fast_led_clear" id="HM+iUc?ZYMU82+=@?%}["></block></next></block></next></block></next></block></statement></block><block type="procedures_callnoreturn" id="437YsL9XN%em{}Ohn3,b" x="-1503" y="304"><mutation name="Matrix in Zwischenspeicher"><arg name="Dezimalcode"></arg><arg name="Farbe°"></arg><arg name="Sättigung %"></arg><arg name="Helligkeit %"></arg></mutation><value name="ARG0"><block type="math_number" id="6}rQk~R/q.zVpia`AA[s"><field name="NUM">1632</field></block></value><value name="ARG1"><block type="math_number" id="RuG{G{%r]$$NVDOJN3x+"><field name="NUM">250</field></block></value><value name="ARG2"><block type="math_number" id="j]_BOu{B~_-mNoL52/^h"><field name="NUM">100</field></block></value><value name="ARG3"><block type="math_number" id="^QMtS4)|Q59[B(6OKOGv"><field name="NUM">100</field></block></value></block><block type="procedures_defnoreturn" id="}f8qz_?3-H.xNQ7IOd/=" collapsed="true" x="-697" y="309"><mutation><arg name="Dezimalcode" varid="PzJaWVHX--]9?^N_)#wn"></arg><arg name="Farbe°" varid="8[tP-gnNag|U*w*Y^_4="></arg><arg name="Sättigung %" varid="MO}nJEF/,hGyd-x(^`q+"></arg><arg name="Helligkeit %" varid="Lb]X9XmRcPagndnTyucG"></arg></mutation><field name="NAME">Matrix in Zwischenspeicher</field><statement name="STACK"><block type="variables_set" id="Z9CYP7:vA5mvz(_8z*Dt"><field name="VAR" id="XyR,!P+Ke(tQh=Y)F$j4">Dividend</field><value name="VALUE"><block type="variables_get" id="66/66^YY2[p`W/;*LTp)"><field name="VAR" id="PzJaWVHX--]9?^N_)#wn">Dezimalcode</field></block></value><next><block type="flow_for" id="-`XaNw0I4204MC6.:sXL"><field name="VAR" id="=ym7+h@?NuGhkbw7=9_v">Bitnummer</field><value name="FROM"><block type="math_number" id="?o*6]nP1m+MSJ74ak]o^"><field name="NUM">1</field></block></value><value name="TO"><block type="math_number" id="G:_N:4gCwPs6D-i0OF_;"><field name="NUM">16</field></block></value><value name="BY"><block type="math_number" id="/cIa1M(6yC`wziM@iQi;"><field name="NUM">1</field></block></value><statement name="DO"><block type="variables_set" id="]fIfJR#}_^i8J_53/JJ/"><field name="VAR" id="BO3Cn-5z+8Y:Zu5ii*{O">Bit</field><value name="VALUE"><block type="math_single_basic" id="(kQ.?wOh[@,Ll)CNkGu#"><field name="OP">ABS</field><value name="NUM"><block type="math_div" id="GDiE4`iQV%Rem*DYnUNU"><value name="VAL1"><block type="code_pin" id="DP-Ir.`-/he_=junA([#"><field name="CODE_PIN">(unsigned int)Dividend</field></block></value><value name="VAL2"><block type="math_number" id="LwN/4JSj(QT.@ojxo`f$"><field name="NUM">2</field></block></value></block></value></block></value><next><block type="logic_if" id="edL0[5,ZbG%bIJkcDk@v"><value name="IF0"><block type="logic_compare" id="l,kR$cME#rSK~hM}@SJJ"><field name="OP">EQ</field><value name="A"><block type="variables_get" id="ImQNOlWP4*Aoy_3!yUhE"><field name="VAR" id="BO3Cn-5z+8Y:Zu5ii*{O">Bit</field></block></value><value name="B"><block type="math_number" id="xAAq|*@mNPL%TQ*,a]NN"><field name="NUM">1</field></block></value></block></value><statement name="DO0"><block type="set_pixel_color" id="A%!ld+#i%[!Q=-Bjy8p9"><field name="MODE">MODE2</field><value name="FROM"><block type="variables_get" id="2PRjxeTpxt%ErDx$u6*X"><field name="VAR" id="=ym7+h@?NuGhkbw7=9_v">Bitnummer</field></block></value><value name="TO"><block type="math_number" id="Onnp4^BS1]Iy-{z!`mPM"><field name="NUM">1</field></block></value><value name="H"><block type="variables_get" id="5dALxK|(,/_Q.7luty[W"><field name="VAR" id="8[tP-gnNag|U*w*Y^_4=">Farbe°</field></block></value><value name="S"><block type="variables_get" id="S7N[bf3;7QR`C]iGzW!5"><field name="VAR" id="MO}nJEF/,hGyd-x(^`q+">Sättigung %</field></block></value><value name="B"><block type="math_arithmetic" id="}xG0Uc9.8`kZNcO:PvYF"><field name="OP">MULTIPLY</field><value name="A"><block type="variables_get" id="_oo_Oq7L2@7_UzC36.x;"><field name="VAR" id="BO3Cn-5z+8Y:Zu5ii*{O">Bit</field></block></value><value name="B"><block type="variables_get" id="V!Pl2klmOXiI#`]`BXup"><field name="VAR" id="Lb]X9XmRcPagndnTyucG">Helligkeit %</field></block></value></block></value></block></statement><next><block type="variables_set" id="K1S5u~KN7fG09o:@4k-_"><field name="VAR" id="XyR,!P+Ke(tQh=Y)F$j4">Dividend</field><value name="VALUE"><block type="math_arithmetic" id="S!wp|m=b2EpYo0^Z[nUK"><field name="OP">DIVIDE</field><value name="A"><block type="code_pin" id="@MZ8(:-MT=bCc;*%].7="><field name="CODE_PIN">(unsigned int)Dividend</field></block></value><value name="B"><block type="math_number" id=",}2FU}vf,Ub.$`Xq*(6z"><field name="NUM">2</field></block></value></block></value></block></next></block></next></block></statement></block></next></block></statement></block><block type="procedures_callnoreturn" id="KNw,|98reeX]F}38MVUp" x="-1372" y="365"><mutation name="Speichere Sensorsignal in Matrix-Zwischenspeicher"><arg name="Sensor"></arg><arg name="Farbe"></arg></mutation><value name="ARG0"><block type="sensor_pin" id="r$AAcV,EZDjOz(1E/OzW"><field name="SENSOR">SENSOR4</field></block></value><value name="ARG1"><block type="math_number" id="+nvTiZ3q*@Su~spy;fAT"><field name="NUM">120</field></block></value></block><block type="basic_comment" id="mC?9iU{k;+F)}7cyX+J$" x="613" y="266"><field name="COMMENT">Zeige Sensorwert von Lichtsensor</field></block><block type="procedures_defnoreturn" id="Y4[D;EM3t2H(L3rI^-S(" collapsed="true" x="-696" y="362"><mutation><arg name="Sensor" varid="q?p.CO_^]c.:1)BL`*kZ"></arg><arg name="Farbe" varid="uSI+-od^%Wqd^spA`}u="></arg></mutation><field name="NAME">Speichere Sensorsignal in Matrix-Zwischenspeicher</field><statement name="STACK"><block type="set_pixel_color" id="Vl+j5rF.2PB4|,4nw)Gq"><field name="MODE">MODE2</field><value name="FROM"><block type="math_arithmetic" id="cA+c{@:mc{VvzBNVKQfp"><field name="OP">MULTIPLY</field><value name="A"><block type="sensor_read_percentage" id=".vc[zdUI5wfoI!3lINh{"><value name="SENSOR"><block type="variables_get" id="9?f6UJj?MsfFy;%:d7cf"><field name="VAR" id="q?p.CO_^]c.:1)BL`*kZ">Sensor</field></block></value></block></value><value name="B"><block type="math_number" id="V]}mDgJHiWn*lg[WFRK4"><field name="NUM">0.16</field></block></value></block></value><value name="TO"><block type="math_number" id="%jjLuy7h/Ks=`q-NZh9O"><field name="NUM">1</field></block></value><value name="H"><block type="variables_get" id="sUA+.f:b4bf+3di|56+t"><field name="VAR" id="uSI+-od^%Wqd^spA`}u=">Farbe</field></block></value><value name="S"><block type="math_number" id="iAe#bFv{BTa,=vz|f2,h"><field name="NUM">100</field></block></value><value name="B"><block type="math_number" id="0COp,vQ^;Hx]:OjzIJR]"><field name="NUM">100</field></block></value></block></statement></block><block type="basic_comment" id="9A?.@|eg7,N2Ga(z+-l!" x="601" y="305"><field name="COMMENT">Zeige Sensorwert von Potentiometer</field></block><block type="basic_comment" id="lv,t2V{VZP^s+619fy!F" x="306" y="356"><field name="COMMENT">Zwischenspeicher Matrix verstehen: PGLU &gt; TTG &gt; NEOPIXEL CODING &gt; Aufgabe/Video 4</field></block></xml>
3e

Programmieren

Das Programmieren des Push-Roll-Bots ist keine Hexerei, denn es gibt nur zwei Bedingungen, für die Funktion. Entweder schaut der Lichtsensor nach oben gegen das Licht, dann ist das Fahrzeug am Rollen und das Servo kann in der Ruheposition bleiben. Oder der Lichtsensor berührt den Boden und sieht kein Licht. In diesem Fall kann die Servobewegung ausgeführt werden

Den Schwellenwert zwischen hell und dunkel, stellst du mit dem Potentiometer ein, denn er ist in jeder Umgebung etwas anders.

Challenge:

Challenge: XML-Code in Editor einfügen
<xml xmlns="https://developers.google.com/blockly/xml"><variables><variable id="_DQjdhaJfR6,f$7cgOQ7">Position in °</variable><variable id="Vw5IBG9C#Pa@r0U!+Bbh">Servo Pin</variable><variable id="DoyC0N[TR?Wtuv+]QNjk">von Pos in °</variable><variable id="8M|lsZfG.{JMk^B,=:P[">bis Pos in °</variable><variable id="|H,0pDre=%.#lJkTh33Q">Tempo in %</variable><variable id="PzJaWVHX--]9?^N_)#wn">Dezimalcode</variable><variable id="8[tP-gnNag|U*w*Y^_4=">Farbe°</variable><variable id="MO}nJEF/,hGyd-x(^`q+">Sättigung %</variable><variable id="Lb]X9XmRcPagndnTyucG">Helligkeit %</variable><variable id="q?p.CO_^]c.:1)BL`*kZ">Sensor</variable><variable id="uSI+-od^%Wqd^spA`}u=">Farbe</variable><variable id="Fgi(boC*F5V:]r|tcnW,">Distanz in cm</variable><variable id="XyR,!P+Ke(tQh=Y)F$j4">Dividend</variable><variable id="K:G4UACKdRDr(dE9O39G">Pos 1</variable><variable id="=ym7+h@?NuGhkbw7=9_v">Bitnummer</variable><variable id="BO3Cn-5z+8Y:Zu5ii*{O">Bit</variable><variable id="w#g|TWs[|tK%g)vcs!n5">Verstrichene Zeit</variable></variables><block type="set_neo_pixel" id="!Om9r{B%q#Ax%A]Do=O0" x="42" y="-57"><value name="NUM_LEDS"><block type="math_number" id="sGg3N3FKmd)8(6;uEI{*"><field name="NUM">16</field></block></value><value name="BRIGHTNESS"><block type="math_number" id="W2KAj#}-gE`P}9v*v)3B"><field name="NUM">100</field></block></value><value name="OUTTURN"><block type="led_pin" id="9-MqZA.)f?Uo,GG(]b7X"><field name="LED">LED1</field></block></value></block><block type="basic_comment" id="|.$x+yKiz`j-,~[?eRLs" x="-700" y="32"><field name="COMMENT">Nicht löschen, Unterprogramme</field></block><block type="basic_comment" id="YW?Z634kdB[|Kr*9rm)r" x="45" y="20"><field name="COMMENT">Welche der untenstehenden Blöcke müssen in welchem Fall aktiv sein?&amp;#10;Setze sie richtig in den Hauptloop ein.</field></block><block type="procedures_callnoreturn" id="+Dik-l#xDh27XSm4_Ez*" x="-1168" y="88"><mutation name="stelle Servo"><arg name="Position in °"></arg><arg name="Servo Pin"></arg></mutation><value name="ARG0"><block type="math_number" id="FuKA)24e!YPnL!6uVGNQ"><field name="NUM">0</field></block></value><value name="ARG1"><block type="led_pin" id="*N?*%c`@1TVI3UGN1p?N"><field name="LED">LED2</field></block></value></block><block type="procedures_defnoreturn" id="DYYovfp[/{/^ryWHZBvf" collapsed="true" x="-700" y="91"><mutation><arg name="Position in °" varid="_DQjdhaJfR6,f$7cgOQ7"></arg><arg name="Servo Pin" varid="Vw5IBG9C#Pa@r0U!+Bbh"></arg></mutation><field name="NAME">stelle Servo</field><statement name="STACK"><block type="variables_set" id="b*l`jfDpwv@_`yEQ:sQU"><field name="VAR" id="_DQjdhaJfR6,f$7cgOQ7">Position in °</field><value name="VALUE"><block type="math_map" id="wY2I~E@9)6mqH{`4}Min"><value name="VALUE"><block type="variables_get" id="sM%OH#-),/XvNLAfoDgM"><field name="VAR" id="_DQjdhaJfR6,f$7cgOQ7">Position in °</field></block></value><value name="FROMLOW"><block type="math_number" id="5*[TWQi3eTy;dTNqRejO"><field name="NUM">0</field></block></value><value name="FROMHIGH"><block type="math_number" id="3FohKj*x~t~gZ.sYtS2("><field name="NUM">180</field></block></value><value name="TOLOW"><block type="math_number" id="y+3B7BV,l3#e!tC#zP45"><field name="NUM">450</field></block></value><value name="TOHIGH"><block type="math_number" id="n[XOgoHB+-0i.,Gpwf%1"><field name="NUM">2550</field></block></value></block></value><next><block type="variables_set" id=".xsEB~Y8Qx!^%8P%)mh;"><field name="VAR" id="K:G4UACKdRDr(dE9O39G">Pos 1</field><value name="VALUE"><block type="math_arithmetic" id="{F9Honx#=x}}p5s6~3pd"><field name="OP">MINUS</field><value name="A"><block type="math_number" id="nN}B3!9SLvv*1{Zlf(%h"><field name="NUM">20000</field></block></value><value name="B"><block type="variables_get" id="mZbi[2Xx35m9qZ2Wz|b_"><field name="VAR" id="_DQjdhaJfR6,f$7cgOQ7">Position in °</field></block></value></block></value><next><block type="flow_repeat" id="gN=t~3M0%R7Pe)/i-V4G"><value name="REPEATS"><block type="math_number" id="+qOr!,*|C9.5wJ[w,ENN"><field name="NUM">50</field></block></value><statement name="DO"><block type="led_write_state" id="6!l6z?iL+={{9KAi,H|9"><value name="LED"><block type="variables_get" id="0L`R`5_!X{Az,9F)`Qac"><field name="VAR" id="Vw5IBG9C#Pa@r0U!+Bbh">Servo Pin</field></block></value><value name="VALUE"><block type="code_pin" id="+7pwX/P2*!~K,CbqH7gH"><field name="CODE_PIN">HIGH</field></block></value><next><block type="flow_delay_micro" id="Y3736,h2Aea/$FEM%mGd"><value name="DELAY_MICRO"><block type="variables_get" id=")Lg-8viw{x?GWSZtdPfK"><field name="VAR" id="_DQjdhaJfR6,f$7cgOQ7">Position in °</field></block></value><next><block type="led_write_state" id="=R-dB9$gUgUf[f1#amX?"><value name="LED"><block type="variables_get" id="L{aTSjwfCBro[60WW.0E"><field name="VAR" id="Vw5IBG9C#Pa@r0U!+Bbh">Servo Pin</field></block></value><value name="VALUE"><block type="code_pin" id="ZI?r50,S}Q!N4EWcI9rk"><field name="CODE_PIN">LOW</field></block></value><next><block type="flow_delay_micro" id="7il;NbzoR^Es7say`(zt"><value name="DELAY_MICRO"><block type="variables_get" id="|@!H=EXua/xr-NRDCr5g"><field name="VAR" id="K:G4UACKdRDr(dE9O39G">Pos 1</field></block></value></block></next></block></next></block></next></block></statement></block></next></block></next></block></statement></block><block type="procedures_callnoreturn" id="2J_{LmcNIYk{Z?kV+;::" x="-1468" y="141"><mutation name="stelle Servo sanft"><arg name="von Pos in °"></arg><arg name="bis Pos in °"></arg><arg name="Tempo in %"></arg><arg name="Servo Pin"></arg></mutation><value name="ARG0"><block type="math_number" id="]_j_u)];;xHA8-_B3$7B"><field name="NUM">0</field></block></value><value name="ARG1"><block type="math_number" id="]W:g?fprmZ}8_8xDy2JB"><field name="NUM">160</field></block></value><value name="ARG2"><block type="math_number" id="z{3!U)]mou,t,b?*wzax"><field name="NUM">50</field></block></value><value name="ARG3"><block type="led_pin" id="wew.m#TufNiqRG~QVRLG"><field name="LED">LED2</field></block></value></block><block type="basic_main_loop" id="9~210UV)!{|GniQxFn|[" deletable="false" x="44" y="96"><value name="BLINK"><block type="basic_blinkcode" id="u@6%knhMhK2g(1JYw[10"><field name="SHORT">1</field><field name="LONG">1</field></block></value></block><block type="procedures_defnoreturn" id="c^Q=?l{x:FJ?Cm3Ncch(" collapsed="true" x="-701" y="146"><mutation><arg name="von Pos in °" varid="DoyC0N[TR?Wtuv+]QNjk"></arg><arg name="bis Pos in °" varid="8M|lsZfG.{JMk^B,=:P["></arg><arg name="Tempo in %" varid="|H,0pDre=%.#lJkTh33Q"></arg><arg name="Servo Pin" varid="Vw5IBG9C#Pa@r0U!+Bbh"></arg></mutation><field name="NAME">stelle Servo sanft</field><statement name="STACK"><block type="flow_for" id="MoL^$qp,s]q|#V}PCNel"><field name="VAR" id="_DQjdhaJfR6,f$7cgOQ7">Position in °</field><value name="FROM"><block type="math_number" id="V;Ieuii8?o:Tnb.0[a[N"><field name="NUM">0</field></block></value><value name="TO"><block type="math_number" id="^-^,ZT.?5jVw*o/}OAU@"><field name="NUM">3.141</field></block></value><value name="BY"><block type="math_map" id="XD^P~Qk|P($W8{5DOc}p"><value name="VALUE"><block type="variables_get" id="E?Zd6*s)DOd5/Y_5,2lM"><field name="VAR" id="|H,0pDre=%.#lJkTh33Q">Tempo in %</field></block></value><value name="FROMLOW"><block type="math_number" id="%GC=-JD8|y;:B[[f[n#U"><field name="NUM">0</field></block></value><value name="FROMHIGH"><block type="math_number" id=".ZWBxd~-|{*~cc2o9|q7"><field name="NUM">100</field></block></value><value name="TOLOW"><block type="math_number" id="f%@Q!+NEovExdlCD_d#n"><field name="NUM">0.001</field></block></value><value name="TOHIGH"><block type="math_number" id="relQ-8H6-k~[,FEIc#HH"><field name="NUM">0.1</field></block></value></block></value><statement name="DO"><block type="procedures_callnoreturn" id="h,f[+#.Bb}Xe`}luH7k@"><mutation name="stelle Servo"><arg name="Position in °"></arg><arg name="Servo Pin"></arg></mutation><value name="ARG0"><block type="math_map" id="mwXTpN_o):;]m;don~^w"><value name="VALUE"><block type="math_trig" id="*CoOOO~/KSP!ivteXph]"><field name="OP">COS</field><value name="NUM"><block type="variables_get" id="r@^JSALbD:Ryki$nBg.;"><field name="VAR" id="_DQjdhaJfR6,f$7cgOQ7">Position in °</field></block></value></block></value><value name="FROMLOW"><block type="math_number" id="{w-,lfw.uDu:8c/o=obQ"><field name="NUM">1</field></block></value><value name="FROMHIGH"><block type="math_number" id="Xa^2u$_Kn+/@4V/)o(-j"><field name="NUM">-1</field></block></value><value name="TOLOW"><block type="variables_get" id="wU4r,RDpQh@jfxg;EcxR"><field name="VAR" id="DoyC0N[TR?Wtuv+]QNjk">von Pos in °</field></block></value><value name="TOHIGH"><block type="variables_get" id="8P)Er_m+.;4yannpX11Q"><field name="VAR" id="8M|lsZfG.{JMk^B,=:P[">bis Pos in °</field></block></value></block></value><value name="ARG1"><block type="variables_get"