3 – Neopixel Uhr mit Clock-Modul DS1307

1

Zeit mit Licht anzeigen: Neopixel Uhr

Das lernst du hier:

Mit der Neopixel-Uhr kannst du die Zeit als farbige Pixel anzeigen und diese damit das Zifferblatt frei gestalten. Ob eine einfache Fläche, die das Licht reflektiert oder eine aufwändige Konstruktion, wie hier im Bild unten: Erfinde die Möglichkeiten der Zeitanzeige neu!

Das Projekt verwendet optional das Clock-Modul RTC DS1307, welches dafür sorgt, dass die Uhr sehr genau läuft. Demgegenüber kannst du die Uhr auch ohne dieses Modul bauen, denn die eigentliche Zeitmessung gelingt auch ohne diesen Zusatz. Egal, wofür du dich entscheidest, wir haben die Programmierung so gemacht, dass sich daran nichts ändert.

Neopixel Uhr mit RTC DS1307

By the way: Muss eine Uhr immer rund sein? Obwohl wir uns dies so gewohnt sind, sind auch andere Formen denkbar. Zum Beipiel eine lineare Uhr, welche die Zeit auf einer Linie anzeigt. Tüftle an der Form der Uhr!

Tipp: Es gibt noch andere interessante Arten, die Zeit anzuzeigen.
> Lienaruhr von Designer Peter Herta und Video
> Lichtzeitpegel Rheinturm Düsseldorf
> Teste die binäre Anzeige auf einer Matrix (klick) ähnlich, wie am Bahnhof in St.Gallen

1a

Neopixel Uhr bauen

Wie geht das?

Ob rund oder linear, beide Versionen funktionieren gleich. Falls deine Uhr rund sein soll, dann besteht sie im Wesentlichen aus einer inneren Holzscheibe, auf deren Kante der Neopixel Streifen aufgeklebt wird. Der Durchmesser dieser Scheibe entspricht: Länge Pixelstreifen ÷ π.

Dies ergibt folgende Masse: z.B. Sperrholz Pappel D = 12mm, Ø 132mm

Neopixel Uhr konstruieren
1b

Clock Modul RTC DS1307 und Neopixel anschliessen

Anschlussschema für die Neopixel und das USB-Kabel:

Anschlussschema Neopixel Uhr mit RTC DS1307 und Arduino

Dies ist das Anschlussschema für das Uhrenmodul RTC DS1307, für eine hohe Genauigkeit der Uhr. Für eine ungenaue Uhr, kannst du dieses Modul einfach weglassen. Aber bedenke, dass dein Arduino ohne das Modul die Zeit bei einem Stromunterbruch nicht speichert und einfach “vergisst”.

Anschlussschema Neopixel Uhr mit RTC DS1307 und Arduino
1c

Grundfunktion des Echtzeit Uhrenmoduls RTC DS1307

Grundfunktion zum Programmieren des Echtzeitmoduls RTC DS1307

Beschreibung: Dieses Sketch zeigt die Blöcke, mit denen du Zeit und Datum in unterschiedlichen Formaten in deinen Projekten nutzen kannst. Die Library <DS1307.h> stellt dabei die Kommunikation mit dem Echtzeitmodul her, während <TimeLib.h> die Signale des Moduls in lesbare Zeit- und Datumsangaben übersetzt.

Die Zeit muss nur einmal eingestellt werden, solange die Batterie im Modul eingesetzt ist. Setze dazu die Blöcke setTime(Std, Min, Sek, Tag, Mon, Jahr) und RTC.set(now()) in «vor Hauptloop 1x» ein (siehe Screenshot oben). Den Hauptloop kannst du leerlassen. Lade das Sketch genau zur angegebenen Zeit (im Beispiel 15:11 Uhr, am 6.7.2021) auf den Mikrocontroller und entferne die Blöcke für das einmalige Einstellen der Zeit wieder.

Eine etwas elegantere Art, die Zeit der Uhr jederzeit mit einem Poti einzustellen, findest du in Beispiel 1d (Neopixel-Uhr).

1d

Neopixel Uhr programmieren

Dieses Sketch zeigt, wie du mit einfachen Neopixel-Blöcken die Zeit auf einem Stripe mit 60 Pixeln anzeigen kannst. Experimentiere mit der Farbe und Anzahl der Pixel für die einzelnen Zeiger.

Besonders spannend: Beachte, dass die Pixelblöcke von «setze LED-Stripe» auf «setze Zwischenspeicher» umgeschaltet werden müssen. So kannst du die Zeitanzeige in Farb-Ebenen (Layers) organisieren und bestimmen, welcher Zeiger, welchen überdecken soll.  Der Pixelblock, der im Hauptloop als letzter eingefügt ist, wird auf dem Stripe «zuoberst» angezeigt. Experimentiere!

Challenge:

Challenge: XML-Code in Editor einfügen
<xml xmlns="https://developers.google.com/blockly/xml"><variables><variable id="HWPMBubduqzal^eA-y_;">Minute</variable><variable id="N[C05SuDli-cVW+0w;D_">Stunde</variable><variable id="#6OjxR^kW_2wQVDEWY2{">Sekunde</variable><variable id="tbi$jlST90ExcGRp!^Cx">Poti an S4</variable><variable id="=Y}d?0zE#5jZm3xas.Ct">Zeitstempel</variable></variables><block type="basic_comment" id="8*19;$Ht[.+n^f?wT4N2" x="11" y="-633"><field name="COMMENT">Arduino Uhgr mit Neopixel Anzeige (Makerclock)&amp;#10;*****************************************&amp;#10;Anleitung: PGLU.CH &gt; BAU &gt; MEHR PROJEKTE &gt; NEOPIXEL UHR</field></block><block type="set_neo_pixel" id="8my8|uX_$Q,Q~A[}~3fU" x="13" y="-540"><value name="NUM_LEDS"><block type="math_number" id="wX6FP)i_rPAUzNlJ-Z#/"><field name="NUM">60</field></block></value><value name="BRIGHTNESS"><block type="math_number" id="90EHqi%,nntql.Sx!R4p"><field name="NUM">100</field></block></value><value name="OUTTURN"><block type="led_pin" id="_64pTuFy=!VRJg.V@(l6"><field name="LED">LED1</field></block></value></block><block type="code_declaration" id="{ZBf3~!:%([@kB1yc9*v" x="13" y="-480"><field name="CODE_DECLRATION">#include &lt;TimeLib.h&gt;&amp;#10;#include &lt;Wire.h&gt;&amp;#10;#include &lt;DS1307RTC.h&gt;</field></block><block type="basic_main_loop" id="W)MN9?kSM7MH9XD]wS{~" deletable="false" x="11" y="-389"><value name="BLINK"><block type="basic_blinkcode" id="z+Gke.W9Eh-gcwmzRZwo"><field name="SHORT">1</field><field name="LONG">1</field></block></value></block><block type="basic_comment" id=".B#.y/RRa?iY)`dh=T{]" x="-589" y="-266"><field name="COMMENT">Nicht verändern!</field></block><block type="basic_comment" id="fkzyLF|Iw@KbFt*VVDA:" x="-592" y="-222"><field name="COMMENT">Hilfsfunktionen zum Einstellen der Zeit und zum Umrechnen der Zeit in Pixel</field></block><block type="basic_comment" id="7]*B?qP}2s.^$%EuPJ.W" x="9" y="-219"><field name="COMMENT">Setze diese Blöcke in den Hauptloop ein und programmiere damit deine Uhr</field></block><block type="procedures_defreturn" id="J7GG|e9RJIZl8kHHw`^I" collapsed="true" x="-592" y="-172"><field name="NAME">Position Minutenzeiger</field><statement name="STACK"><block type="logic_if" id="]8v1~JW|Yc#)m6YD:lfD"><mutation xmlns="http://www.w3.org/1999/xhtml" else="1"></mutation><value name="IF0"><block type="logic_compare" id="3lsW!hhlRVQWW^NN0@cW"><field name="OP">EQ</field><value name="A"><block type="code_pin" id="N97I+D(EKnxeUq1,,?h#"><field name="CODE_PIN">minute()</field></block></value><value name="B"><block type="math_number" id="BN3[,XO-9qgfStNwlt^C"><field name="NUM">0</field></block></value></block></value><statement name="DO0"><block type="variables_set" id="?=)r`ZfJwzB8Tn|QXUj@"><field name="VAR" id="HWPMBubduqzal^eA-y_;">Minute</field><value name="VALUE"><block type="math_number" id="qqPARp5mY6Rs{$E-w/?d"><field name="NUM">60</field></block></value></block></statement><statement name="ELSE"><block type="variables_set" id=")?yTUn0kUye2[N4-iWa:"><field name="VAR" id="HWPMBubduqzal^eA-y_;">Minute</field><value name="VALUE"><block type="code_pin" id="//Wdm6_x6(}8r}O@iep*"><field name="CODE_PIN">minute()</field></block></value></block></statement></block></statement><value name="RETURN"><block type="variables_get" id="wUl:$(+Va0P6fkMYzb5z"><field name="VAR" id="HWPMBubduqzal^eA-y_;">Minute</field></block></value></block><block type="procedures_callreturn" id="(_X$h#Fm/i3lr%$H]f^$" x="5" y="-159"><mutation name="Position Stundenzeiger"></mutation></block><block type="procedures_defreturn" id="4f,8vzy?[B7Td!NwrxcL" collapsed="true" x="-592" y="-122"><field name="NAME">Position Stundenzeiger</field><statement name="STACK"><block type="logic_if" id="Vp?=@$h0lsHTZn]a3.:3"><mutation xmlns="http://www.w3.org/1999/xhtml" else="1"></mutation><value name="IF0"><block type="logic_compare" id="TOv=)./0V9Br9VaFl5Pn"><field name="OP">GT</field><value name="A"><block type="code_pin" id="H5SG*{XT/7KhF+(oxWPb"><field name="CODE_PIN">hourFormat12()*5+minute()/12</field></block></value><value name="B"><block type="math_number" id="Bz]K7(d9:K^,~]woH;Ij"><field name="NUM">60</field></block></value></block></value><statement name="DO0"><block type="variables_set" id="9sGc7e^uqY%_-Z0]ZFfC"><field name="VAR" id="N[C05SuDli-cVW+0w;D_">Stunde</field><value name="VALUE"><block type="code_pin" id="=0.+Y;fXM^5vXA^rjLSL"><field name="CODE_PIN">(hourFormat12()*5+minute()/12)-60</field></block></value></block></statement><statement name="ELSE"><block type="variables_set" id="T?)jAGeq4jA@!tPO=Y7T"><field name="VAR" id="N[C05SuDli-cVW+0w;D_">Stunde</field><value name="VALUE"><block type="code_pin" id="!8#L8tJ.+Q#K=j1MESBX"><field name="CODE_PIN">hourFormat12()*5+minute()/12</field></block></value></block></statement></block></statement><value name="RETURN"><block type="variables_get" id="@8q(x#vW/d7r[7SSGRe+"><field name="VAR" id="N[C05SuDli-cVW+0w;D_">Stunde</field></block></value></block><block type="procedures_callreturn" id="`p|*)AqSKt}b6MuLIOd#" x="5" y="-106"><mutation name="Position Minutenzeiger"></mutation></block><block type="procedures_defreturn" id="yS!f01pn%`6u3evErJ``" collapsed="true" x="-592" y="-71"><field name="NAME">Position Sekundenzeiger</field><statement name="STACK"><block type="logic_if" id="9cCl-iC(Y9t,HVF{R|]|"><mutation xmlns="http://www.w3.org/1999/xhtml" else="1"></mutation><value name="IF0"><block type="logic_compare" id="@xS3T,nyv!Z#+U|pl9PY"><field name="OP">EQ</field><value name="A"><block type="code_pin" id="$@iIZ`_`wyI#(/)=Cw:*"><field name="CODE_PIN">second()</field></block></value><value name="B"><block type="math_number" id="DC_tNSAnB}^v-a0C^kz1"><field name="NUM">0</field></block></value></block></value><statement name="DO0"><block type="variables_set" id="~(.v@lt59%$3pND?G+Rn"><field name="VAR" id="#6OjxR^kW_2wQVDEWY2{">Sekunde</field><value name="VALUE"><block type="math_number" id="}DL|6/e#uU9`/^I8[3H^"><field name="NUM">60</field></block></value></block></statement><statement name="ELSE"><block type="variables_set" id="1xUFk=U_u._KhTMmZ0C*"><field name="VAR" id="#6OjxR^kW_2wQVDEWY2{">Sekunde</field><value name="VALUE"><block type="code_pin" id="jjJZ9hg}YE)99g:JZ4.Y"><field name="CODE_PIN">second()</field></block></value></block></statement></block></statement><value name="RETURN"><block type="variables_get" id="(~ncQk5U-mL=J`B?=}._"><field name="VAR" id="#6OjxR^kW_2wQVDEWY2{">Sekunde</field></block></value></block><block type="basic_comment" id="Uc)+9otFpalUy/`{P?xu" x="906" y="-149"><field name="COMMENT">Steuere die Pixel mit den Positionen der Zeiger</field></block><block type="procedures_callreturn" id="+G`}bG*vs[u;45Fxak0F" x="7" y="-53"><mutation name="Position Sekundenzeiger"></mutation></block><block type="expert_setup" id="[6X=v^!yb]QQf/n}heZ|" collapsed="true" x="-592" y="-19"><statement name="CODE"><block type="set_pixel_color" id="@b!On_Y7tvs^.j6%f-}D"><field name="MODE">MODE1</field><value name="FROM"><block type="math_number" id="S~SK2b]]H:-T*LbdAsxl"><field name="NUM">60</field></block></value><value name="TO"><block type="math_number" id="O)=e[pp:+B5;-wJ(Y/rP"><field name="NUM">1</field></block></value><value name="H"><block type="math_number" id=":dWPz*X/t?lma_Ii-[]v"><field name="NUM">20</field></block></value><value name="S"><block type="math_number" id="1Jytw72SqynR*8xaL0t7"><field name="NUM">100</field></block></value><value name="B"><block type="math_number" id="zv+!{Xi-D~![T!r6izrb"><field name="NUM">100</field></block></value><next><block type="variables_set" id="KnMQ*3MI;KhmxC2nQrU!"><field name="VAR" id="tbi$jlST90ExcGRp!^Cx">Poti an S4</field><value name="VALUE"><block type="sensor_read_percentage" id="-d5a5Ncui,w8*u=X=?Fz"><value name="SENSOR"><block type="sensor_pin" id="?doM0m^@mgjk*6,!/QE@"><field name="SENSOR">SENSOR4</field></block></value></block></value><next><block type="flow_delay" id="oE#l,qXbM26zl!/$JNqp"><value name="DELAY"><block type="math_number" id="m9(VrudF:xeqieRfn_OU"><field name="NUM">2700</field></block></value><next><block type="logic_if" id="u{l,I@K85(-*l)zGauir"><value name="IF0"><block type="logic_compare" id=".Ubl1r2ixtS]L#O8B$pg"><field name="OP">GT</field><value name="A"><block type="math_single_basic" id="?p.NxRmn:UaD#LHZe@+c"><field name="OP">ABS</field><value name="NUM"><block type="math_arithmetic" id="C](rBo!;tZAzqz!N0lrM"><field name="OP">MINUS</field><value name="A"><block type="variables_get" id="7P(ZjVk@Qcrqgg*q/3CW"><field name="VAR" id="tbi$jlST90ExcGRp!^Cx">Poti an S4</field></block></value><value name="B"><block type="sensor_read_percentage" id="|zdZSiS2HZm{-V=L6s+o"><value name="SENSOR"><block type="sensor_pin" id=";i}bHT!oRp[L]Jq^N4}~"><field name="SENSOR">SENSOR4</field></block></value></block></value></block></value></block></value><value name="B"><block type="math_number" id="~,)Tbt`BP7}/t=5zLWr;"><field name="NUM">5</field></block></value></block></value><statement name="DO0"><block type="set_pixel_color" id="|6j%mJ$F+j@7+P9`HA+R"><field name="MODE">MODE2</field><value name="FROM"><block type="math_number" id="$^$KP-:(cdn+@{YDV5+#"><field name="NUM">1</field></block></value><value name="TO"><block type="math_number" id="jo%-_^j^ILzs4fgPOEx%"><field name="NUM">1</field></block></value><value name="H"><block type="math_number" id="u{Iu-Dn#$n(K)0-L`a^5"><field name="NUM">220</field></block></value><value name="S"><block type="math_number" id="EsVeqHNTv`~CKpiX|R^N"><field name="NUM">100</field></block></value><value name="B"><block type="math_number" id="!:busx5Zp#4/^`hJj}^?"><field name="NUM">100</field></block></value><next><block type="variables_set" id=";|b87`UcfCy[N_SRINUr"><field name="VAR" id="=Y}d?0zE#5jZm3xas.Ct">Zeitstempel</field><value name="VALUE"><block type="flow_ms" id="IqRyg,CcAF.J[NC0/hy?"></block></value><next><block type="flow_while" id="E{QBkoX#8JVF9J:piWk%"><value name="CONDITION"><block type="logic_compare" id="=fuj9$ti|Z1e?enG!lrS"><field name="OP">LT</field><value name="A"><block type="math_arithmetic" id="{1p.VLz,MOUrbZ+AY`[W"><field name="OP">MINUS</field><value name="A"><block type="flow_ms" id="{9vUkB/ngBL|8j.fW(W`"></block></value><value name="B"><block type="variables_get" id="N-J5sgJ;z~P%auVrZHrK"><field name="VAR" id="=Y}d?0zE#5jZm3xas.Ct">Zeitstempel</field></block></value></block></value><value name="B"><block type="math_number" id="%rEAMi6YC_7-;lv*^wcQ"><field name="NUM">8000</field></block></value></block></value><statement name="DO"><block type="variables_set" id="%qM(5t?:7R+Yg}n$/|cr"><field name="VAR" id="N[C05SuDli-cVW+0w;D_">Stunde</field><value name="VALUE"><block type="math_round_precision" id="R7sV]?iAF9LgUq(0h-Cp"><field name="PRECISION">0</field><value name="VALUE"><block type="math_constrain" id="+i]PU=C!F-)W0mHWz!0*"><value name="VALUE"><block type="math_map" id="~(iq_/Gj5_oO?Be9Zs@*"><value name="VALUE"><block type="sensor_read_percentage" id="V0]-Z1pgcyvS_.PRKZc^"><value name="SENSOR"><block type="sensor_pin" id="]./mO@37kx7hxI3~%s1#"><field name="SENSOR">SENSOR4</field></block></value></block></value><value name="FROMLOW"><block type="math_number" id="W`7?*udzzaP]VFhRT4Rh"><field name="NUM">0</field></block></value><value name="FROMHIGH"><block type="math_number" id="-O!JuUEx9sR#iNE}%~Wm"><field name="NUM">100</field></block></value><value name="TOLOW"><block type="math_number" id="pP+f7M/OLUu7Zk|@9H)^"><field name="NUM">0</field></block></value><value name="TOHIGH"><block type="math_number" id="Oy)cb(SuZjGAm%pld9n|"><field name="NUM">14</field></block></value></block></value><value name="MIN"><block type="math_number" id="3n8b{Q2KhFQwu^2G]VSG"><field name="NUM">1</field></block></value><value name="MAX"><block type="math_number" id="Q:?6b-yA`BAE0~-ScK[|"><field name="NUM">12</field></block></value></block></value></block></value><next><block type="set_pixel_color" id="R,)VL1b{-8ivkaI($!tN"><field name="MODE">MODE1</field><value name="FROM"><block type="code_pin" id="0E:n~0l,x1zYqOYnd?AH"><field name="CODE_PIN">Stunde * 5</field></block></value><value name="TO"><block type="math_number" id="s1%`_XpF!x0c1EC}FAXR"><field name="NUM">1</field></block></value><value name="H"><block type="math_number" id="0d?f[m%V2rkXTiGuQ2hN"><field name="NUM">300</field></block></value><value name="S"><block type="math_number" id="Aty5,fZUMN-Yg]lzo2$."><field name="NUM">100</field></block></value><value name="B"><block type="math_number" id="o]Q:dkFn*c$1a[u]Z,[/"><field name="NUM">100</field></block></value></block></next></block></statement><next><block type="variables_set" id="JiU-x@)R3yh?{xfV@36`"><field name="VAR" id="=Y}d?0zE#5jZm3xas.Ct">Zeitstempel</field><value name="VALUE"><block type="flow_ms" id="rV65vbv`skKV6]ut?ftS"></block></value><next><block type="flow_while" id="]C-6tE2)3h#a03mM-+(@"><value name="CONDITION"><block type="logic_compare" id="RiEWV@Vn*yAX@[5Pw@f7"><field name="OP">LT</field><value name="A"><block type="math_arithmetic" id="vB66f4XZMLJFr#mN_o+^"><field name="OP">MINUS</field><value name="A"><block type="flow_ms" id="4,y):[+6hn:WN`@/s-G{"></block></value><value name="B"><block type="variables_get" id="sW6eRi|1t?NyfF_n*Kq1"><field name="VAR" id="=Y}d?0zE#5jZm3xas.Ct">Zeitstempel</field></block></value></block></value><value name="B"><block type="math_number" id="*?/IP=)wLBm/]F?:gFE="><field name="NUM">8000</field></block></value></block></value><statement name="DO"><block type="variables_set" id="l?2^icbfUuTkM1,!*XVy"><field name="VAR" id="HWPMBubduqzal^eA-y_;">Minute</field><value name="VALUE"><block type="math_round_precision" id="HqRE|E6b-aqY_-D;bgrp"><field name="PRECISION">0</field><value name="VALUE"><block type="math_constrain" id="bYgvGK$bwo3X^j!E`,gS"><value name="VALUE"><block type="math_map" id="*u+v9yE_#M|KA5s8hM3]"><value name="VALUE"><block type="sensor_read_percentage" id="R{X/]ruS6{ZOMco^T_BS"><value name="SENSOR"><block type="sensor_pin" id="}xjmCNo*==NV7xdT].F]"><field name="SENSOR">SENSOR4</field></block></value></block></value><value name="FROMLOW"><block type="math_number" id="1lS4+3-y2f`,z)O4rahx"><field name="NUM">0</field></block></value><value name="FROMHIGH"><block type="math_number" id="sJ0tpkTIcXbJK-LmJNT%"><field name="NUM">100</field></block></value><value name="TOLOW"><block type="math_number" id="WYE1nEiCgS$O10}K1w7U"><field name="NUM">0</field></block></value><value name="TOHIGH"><block type="math_number" id="=e|oi^dMS)nVEy6JlK#{"><field name="NUM">70</field></block></value></block></value><value name="MIN"><block type="math_number" id="]hfLO,sEw@+ZH:0uVj$."><field name="NUM">0</field></block></value><value name="MAX"><block type="math_number" id="TZSa[`MT_G8Y`2XvU}|j"><field name="NUM">59</field></block></value></block></value></block></value><next><block type="logic_if" id="l!C_U?`BA+0Lb(P!/s03"><mutation xmlns="http://www.w3.org/1999/xhtml" else="1"></mutation><value name="IF0"><block type="logic_compare" id=".vB7!cMjK;:L2ckY0tnm"><field name="OP">EQ</field><value name="A"><block type="variables_get" id="FlMK}[pp_vlis1bQ`iR5"><field name="VAR" id="HWPMBubduqzal^eA-y_;">Minute</field></block></value><value name="B"><block type="math_number" id="Lu*2o(DelY3hnMm]NfZ%"><field name="NUM">0</field></block></value></block></value><statement name="DO0"><block type="set_pixel_color" id="/r,-W)5*N0;DZfb.]hL|"><field name="MODE">MODE1</field><value name="FROM"><block type="math_number" id="b`jh6yR~pV.ddbP|xv5R"><field name="NUM">60</field></block></value><value name="TO"><block type="math_number" id=",x@7y+v3?g-HIaav0|i."><field name="NUM">1</field></block></value><value name="H"><block type="math_number" id="9lgaK+Y..r0,*d/MJxU`"><field name="NUM">180</field></block></value><value name="S"><block type="math_number" id="+y]{DQ,rdrRbr6hm-i]{"><field name="NUM">100</field></block></value><value name="B"><block type="math_number" id="ptxq4hFw~q$qX8@p(a::"><field name="NUM">100</field></block></value></block></statement><statement name="ELSE"><block type="set_pixel_color" id="kccNb$lf0MkCL3/a=D7C"><field name="MODE">MODE1</field><value name="FROM"><block type="code_pin" id="x3QHg,O~;?4pfK_W/-_I"><field name="CODE_PIN">Minute</field></block></value><value name="TO"><block type="math_number" id="UPY}zf2(dr{poc:VKt^X"><field name="NUM">1</field></block></value><value name="H"><block type="math_number" id="XoMVq@7f.l)otK`}DO69"><field name="NUM">180</field></block></value><value name="S"><block type="math_number" id="zHWWwy*hR^H:;Mp1hm77"><field name="NUM">100</field></block></value><value name="B"><block type="math_number" id="p+F?_ncmx+h]TiQa6?UO"><field name="NUM">100</field></block></value></block></statement></block></next></block></statement><next><block type="code_input" id="Bh6WKIKyr]jTMZoR)5hE"><field name="CODE_INPUT">setTime(Stunde,Minute,00,1,1,2021);</field><next><block type="code_input" id="{k5Ex;H5[ribtSL6m#aM"><field name="CODE_INPUT">RTC.set(now());</field></block></next></block></next></block></next></block></next></block></next></block></next></block></statement><next><block type="code_input" id="}[LJ/^@,qPR@65hp}|}6"><field name="CODE_INPUT"> setSyncProvider(RTC.get); </field><next><block type="code_input" id="@!(IpX_edr::HllnL#f^"><field name="CODE_INPUT">setSyncInterval(120);</field><next><block type="logic_if" id="iOij=pf5(exTz?:FH93("><mutation xmlns="http://www.w3.org/1999/xhtml" else="1"></mutation><value name="IF0"><block type="code_pin" id="P:%SMx5%5*_rnlR/TS/y"><field name="CODE_PIN">timeStatus()!= timeSet</field></block></value><statement name="DO0"><block type="set_pixel_color" id="Y.7|V8tP/j|@X8el%r*d"><field name="MODE">MODE1</field><value name="FROM"><block type="math_number" id="D#-[H6|gS9m9O@IpWSy2"><field name="NUM">60</field></block></value><value name="TO"><block type="math_number" id="T?oZk|SP9;Kr4H;~kQN%"><field name="NUM">1</field></block></value><value name="H"><block type="math_number" id="2|X~O2B),g)$.:Vq,;Mw"><field name="NUM">0</field></block></value><value name="S"><block type="math_number" id="eD~$fokvl-G=-0jY`kt}"><field name="NUM">100</field></block></value><value name="B"><block type="math_number" id="#J,,t-CpHp`YL.2R^1a_"><field name="NUM">100</field></block></value></block></statement><statement name="ELSE"><block type="set_pixel_color" id="zt]=ej@*%7BXV?JU$F^L"><field name="MODE">MODE1</field><value name="FROM"><block type="math_number" id="634c}z]VNawoy{J7`[,E"><field name="NUM">60</field></block></value><value name="TO"><block type="math_number" id="vAoW9*]?-nGg?Ut/(,#b"><field name="NUM">1</field></block></value><value name="H"><block type="math_number" id="64+DeyTn_RFK=@?tDm_e"><field name="NUM">120</field></block></value><value name="S"><block type="math_number" id="Zg;$MQGosGD~Ln+AOT{-"><field name="NUM">100</field></block></value><value name="B"><block type="math_number" id="vkADTiEo0,J7u%M]Qync"><field name="NUM">100</field></block></value></block></statement><next><block type="flow_delay" id="dh,6AOG+xRh4GeDm`;]E"><value name="DELAY"><block type="math_number" id="g.0ifI7|FvbJ$_LenA+H"><field name="NUM">2000</field></block></value></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block><block type="set_pixel_color" id="#saJ-[hRm=kbO[@?b5?]" x="12" y="12"><field name="MODE">MODE2</field><value name="FROM"><block type="math_number" id=":-QGU06Guaz`zzfY3r%P"><field name="NUM">1</field></block></value><value name="TO"><block type="math_number" id="/s8]jKCm,0**Le]Ddsd("><field name="NUM">1</field></block></value><value name="H"><block type="math_number" id="0*NL*)SB:;|Y?`%8DoP0"><field name="NUM">110</field></block></value><value name="S"><block type="math_number" id="a~II0fZi]}gNICi8Fm?4"><field name="NUM">100</field></block></value><value name="B"><block type="math_number" id="-:{v^::Tmh!b^O#o5kts"><field name="NUM">100</field></block></value></block><block type="basic_comment" id=".}f1CHWqe0Gs,.Na=A;J" x="896" y="9"><field name="COMMENT">Baue das "Bild" mit den Zeigern (und ev. einem Hintergrund) im&amp;#10;Zwischenspeicher Schicht für Schicht auf</field></block><block type="set_pixel_color" id="=vo_0KQq_m,MZjEVoD)m" x="14" y="94"><field name="MODE">MODE2</field><value name="FROM"><block type="math_number" id="Ef.YRwBS!8VXngyRn.,{"><field name="NUM">1</field></block></value><value name="TO"><block type="math_number" id=".TJ]JmWjRIx0~{[9(IuF"><field name="NUM">1</field></block></value><value name="H"><block type="math_number" id="#:l._FiWszPTrTW41h+|"><field name="NUM">110</field></block></value><value name="S"><block type="math_number" id="JKI|OSxE{oG6N%UftMvV"><field name="NUM">100</field></block></value><value name="B"><block type="math_number" id="]ICNTl3##m|TZPFFqx`;"><field name="NUM">100</field></block></value></block><block type="set_pixel_color" id="Nldyh)BODK}PQsu4B3nF" x="13" y="173"><field name="MODE">MODE2</field><value name="FROM"><block type="math_number" id="0V)B$gOc*9Ps+fYqqGG{"><field name="NUM">1</field></block></value><value name="TO"><block type="math_number" id=".OlQRZ*UIq79kfi/p#K7"><field name="NUM">1</field></block></value><value name="H"><block type="math_number" id="AtIAHr;ZP{%wE2_7o$$p"><field name="NUM">110</field></block></value><value name="S"><block type="math_number" id="UDbO/O!Xs~3/Ga0QCme0"><field name="NUM">100</field></block></value><value name="B"><block type="math_number" id="xfQs?IX/U##3_M|Q.?M|"><field name="NUM">100</field></block></value></block><block type="fast_led" id="Y)]7~Jz{1q=.;?mJ:SjA" x="14" y="273"><next><block type="fast_led_clear" id="c:gK9[$Ud.K;@M4hU/zQ"></block></next></block><block type="basic_comment" id=":h|X!0e=1G]eUNq~PrwX" x="900" y="266"><field name="COMMENT">Zwischenspeicher wird an Pixel gesendet</field></block><block type="basic_comment" id="#!o,ABC{WVQfokH-/Vf;" x="901" y="314"><field name="COMMENT">Zwischenspeicher wird gelöscht, Pixel leuchten aber&amp;#10;bis zum nächsten Senden weiter!</field></block></xml>

Mögliche Lösung:

Lösung: XML-Code in Editor einfügen
<xml xmlns="https://developers.google.com/blockly/xml"><variables><variable id="HWPMBubduqzal^eA-y_;">Minute</variable><variable id="N[C05SuDli-cVW+0w;D_">Stunde</variable><variable id="#6OjxR^kW_2wQVDEWY2{">Sekunde</variable><variable id="tbi$jlST90ExcGRp!^Cx">Poti an S4</variable><variable id="=Y}d?0zE#5jZm3xas.Ct">Zeitstempel</variable></variables><block type="basic_comment" id="8*19;$Ht[.+n^f?wT4N2" x="12" y="-536"><field name="COMMENT">Arduino Uhgr mit Neopixel Anzeige (Makerclock)&amp;#10;*****************************************&amp;#10;Anleitung: PGLU.CH &gt; BAU &gt; MEHR PROJEKTE &gt; NEOPIXEL UHR</field></block><block type="set_neo_pixel" id="8my8|uX_$Q,Q~A[}~3fU" x="13" y="-450"><value name="NUM_LEDS"><block type="math_number" id="wX6FP)i_rPAUzNlJ-Z#/"><field name="NUM">60</field></block></value><value name="BRIGHTNESS"><block type="math_number" id="90EHqi%,nntql.Sx!R4p"><field name="NUM">100</field></block></value><value name="OUTTURN"><block type="led_pin" id="_64pTuFy=!VRJg.V@(l6"><field name="LED">LED1</field></block></value></block><block type="code_declaration" id="{ZBf3~!:%([@kB1yc9*v" x="12" y="-394"><field name="CODE_DECLRATION">#include &lt;TimeLib.h&gt;&amp;#10;#include &lt;Wire.h&gt;&amp;#10;#include &lt;DS1307RTC.h&gt;</field></block><block type="basic_comment" id="fkzyLF|Iw@KbFt*VVDA:" x="-522" y="-299"><field name="COMMENT">Hilfsfunktionen zum Einstellen der Zeit und Umrechnen der Zeit in Pixel</field></block><block type="basic_comment" id="7]*B?qP}2s.^$%EuPJ.W" x="14" y="-301"><field name="COMMENT">Haupt Sketch - Experimentiere hier mit Änderungen</field></block><block type="expert_setup" id="[6X=v^!yb]QQf/n}heZ|" collapsed="true" x="-522" y="-247"><statement name="CODE"><block type="set_pixel_color" id="@b!On_Y7tvs^.j6%f-}D"><field name="MODE">MODE1</field><value name="FROM"><block type="math_number" id="S~SK2b]]H:-T*LbdAsxl"><field name="NUM">60</field></block></value><value name="TO"><block type="math_number" id="O)=e[pp:+B5;-wJ(Y/rP"><field name="NUM">1</field></block></value><value name="H"><block type="math_number" id=":dWPz*X/t?lma_Ii-[]v"><field name="NUM">20</field></block></value><value name="S"><block type="math_number" id="1Jytw72SqynR*8xaL0t7"><field name="NUM">100</field></block></value><value name="B"><block type="math_number" id="zv+!{Xi-D~![T!r6izrb"><field name="NUM">100</field></block></value><next><block type="variables_set" id="KnMQ*3MI;KhmxC2nQrU!"><field name="VAR" id="tbi$jlST90ExcGRp!^Cx">Poti an S4</field><value name="VALUE"><block type="sensor_read_percentage" id="-d5a5Ncui,w8*u=X=?Fz"><value name="SENSOR"><block type="sensor_pin" id="?doM0m^@mgjk*6,!/QE@"><field name="SENSOR">SENSOR4</field></block></value></block></value><next><block type="flow_delay" id="oE#l,qXbM26zl!/$JNqp"><value name="DELAY"><block type="math_number" id="m9(VrudF:xeqieRfn_OU"><field name="NUM">2700</field></block></value><next><block type="logic_if" id="u{l,I@K85(-*l)zGauir"><value name="IF0"><block type="logic_compare" id=".Ubl1r2ixtS]L#O8B$pg"><field name="OP">GT</field><value name="A"><block type="math_single_basic" id="?p.NxRmn:UaD#LHZe@+c"><field name="OP">ABS</field><value name="NUM"><block type="math_arithmetic" id="C](rBo!;tZAzqz!N0lrM"><field name="OP">MINUS</field><value name="A"><block type="variables_get" id="7P(ZjVk@Qcrqgg*q/3CW"><field name="VAR" id="tbi$jlST90ExcGRp!^Cx">Poti an S4</field></block></value><value name="B"><block type="sensor_read_percentage" id="|zdZSiS2HZm{-V=L6s+o"><value name="SENSOR"><block type="sensor_pin" id=";i}bHT!oRp[L]Jq^N4}~"><field name="SENSOR">SENSOR4</field></block></value></block></value></block></value></block></value><value name="B"><block type="math_number" id="~,)Tbt`BP7}/t=5zLWr;"><field name="NUM">5</field></block></value></block></value><statement name="DO0"><block type="set_pixel_color" id="|6j%mJ$F+j@7+P9`HA+R"><field name="MODE">MODE2</field><value name="FROM"><block type="math_number" id="$^$KP-:(cdn+@{YDV5+#"><field name="NUM">1</field></block></value><value name="TO"><block type="math_number" id="jo%-_^j^ILzs4fgPOEx%"><field name="NUM">1</field></block></value><value name="H"><block type="math_number" id="u{Iu-Dn#$n(K)0-L`a^5"><field name="NUM">220</field></block></value><value name="S"><block type="math_number" id="EsVeqHNTv`~CKpiX|R^N"><field name="NUM">100</field></block></value><value name="B"><block type="math_number" id="!:busx5Zp#4/^`hJj}^?"><field name="NUM">100</field></block></value><next><block type="variables_set" id=";|b87`UcfCy[N_SRINUr"><field name="VAR" id="=Y}d?0zE#5jZm3xas.Ct">Zeitstempel</field><value name="VALUE"><block type="flow_ms" id="IqRyg,CcAF.J[NC0/hy?"></block></value><next><block type="flow_while" id="E{QBkoX#8JVF9J:piWk%"><value name="CONDITION"><block type="logic_compare" id="=fuj9$ti|Z1e?enG!lrS"><field name="OP">LT</field><value name="A"><block type="math_arithmetic" id="{1p.VLz,MOUrbZ+AY`[W"><field name="OP">MINUS</field><value name="A"><block type="flow_ms" id="{9vUkB/ngBL|8j.fW(W`"></block></value><value name="B"><block type="variables_get" id="N-J5sgJ;z~P%auVrZHrK"><field name="VAR" id="=Y}d?0zE#5jZm3xas.Ct">Zeitstempel</field></block></value></block></value><value name="B"><block type="math_number" id="%rEAMi6YC_7-;lv*^wcQ"><field name="NUM">8000</field></block></value></block></value><statement name="DO"><block type="variables_set" id="%qM(5t?:7R+Yg}n$/|cr"><field name="VAR" id="N[C05SuDli-cVW+0w;D_">Stunde</field><value name="VALUE"><block type="math_round_precision" id="R7sV]?iAF9LgUq(0h-Cp"><field name="PRECISION">0</field><value name="VALUE"><block type="math_constrain" id="+i]PU=C!F-)W0mHWz!0*"><value name="VALUE"><block type="math_map" id="~(iq_/Gj5_oO?Be9Zs@*"><value name="VALUE"><block type="sensor_read_percentage" id="V0]-Z1pgcyvS_.PRKZc^"><value name="SENSOR"><block type="sensor_pin" id="]./mO@37kx7hxI3~%s1#"><field name="SENSOR">SENSOR4</field></block></value></block></value><value name="FROMLOW"><block type="math_number" id="W`7?*udzzaP]VFhRT4Rh"><field name="NUM">0</field></block></value><value name="FROMHIGH"><block type="math_number" id="-O!JuUEx9sR#iNE}%~Wm"><field name="NUM">100</field></block></value><value name="TOLOW"><block type="math_number" id="pP+f7M/OLUu7Zk|@9H)^"><field name="NUM">0</field></block></value><value name="TOHIGH"><block type="math_number" id="Oy)cb(SuZjGAm%pld9n|"><field name="NUM">14</field></block></value></block></value><value name="MIN"><block type="math_number" id="3n8b{Q2KhFQwu^2G]VSG"><field name="NUM">1</field></block></value><value name="MAX"><block type="math_number" id="Q:?6b-yA`BAE0~-ScK[|"><field name="NUM">12</field></block></value></block></value></block></value><next><block type="set_pixel_color" id="R,)VL1b{-8ivkaI($!tN"><field name="MODE">MODE1</field><value name="FROM"><block type="code_pin" id="0E:n~0l,x1zYqOYnd?AH"><field name="CODE_PIN">Stunde * 5</field></block></value><value name="TO"><block type="math_number" id="s1%`_XpF!x0c1EC}FAXR"><field name="NUM">1</field></block></value><value name="H"><block type="math_number" id="0d?f[m%V2rkXTiGuQ2hN"><field name="NUM">300</field></block></value><value name="S"><block type="math_number" id="Aty5,fZUMN-Yg]lzo2$."><field name="NUM">100</field></block></value><value name="B"><block type="math_number" id="o]Q:dkFn*c$1a[u]Z,[/"><field name="NUM">100</field></block></value></block></next></block></statement><next><block type="variables_set" id="JiU-x@)R3yh?{xfV@36`"><field name="VAR" id="=Y}d?0zE#5jZm3xas.Ct">Zeitstempel</field><value name="VALUE"><block type="flow_ms" id="rV65vbv`skKV6]ut?ftS"></block></value><next><block type="flow_while" id="]C-6tE2)3h#a03mM-+(@"><value name="CONDITION"><block type="logic_compare" id="RiEWV@Vn*yAX@[5Pw@f7"><field name="OP">LT</field><value name="A"><block type="math_arithmetic" id="vB66f4XZMLJFr#mN_o+^"><field name="OP">MINUS</field><value name="A"><block type="flow_ms" id="4,y):[+6hn:WN`@/s-G{"></block></value><value name="B"><block type="variables_get" id="sW6eRi|1t?NyfF_n*Kq1"><field name="VAR" id="=Y}d?0zE#5jZm3xas.Ct">Zeitstempel</field></block></value></block></value><value name="B"><block type="math_number" id="*?/IP=)wLBm/]F?:gFE="><field name="NUM">8000</field></block></value></block></value><statement name="DO"><block type="variables_set" id="l?2^icbfUuTkM1,!*XVy"><field name="VAR" id="HWPMBubduqzal^eA-y_;">Minute</field><value name="VALUE"><block type="math_round_precision" id="HqRE|E6b-aqY_-D;bgrp"><field name="PRECISION">0</field><value name="VALUE"><block type="math_constrain" id="bYgvGK$bwo3X^j!E`,gS"><value name="VALUE"><block type="math_map" id="*u+v9yE_#M|KA5s8hM3]"><value name="VALUE"><block type="sensor_read_percentage" id="R{X/]ruS6{ZOMco^T_BS"><value name="SENSOR"><block type="sensor_pin" id="}xjmCNo*==NV7xdT].F]"><field name="SENSOR">SENSOR4</field></block></value></block></value><value name="FROMLOW"><block type="math_number" id="1lS4+3-y2f`,z)O4rahx"><field name="NUM">0</field></block></value><value name="FROMHIGH"><block type="math_number" id="sJ0tpkTIcXbJK-LmJNT%"><field name="NUM">100</field></block></value><value name="TOLOW"><block type="math_number" id="WYE1nEiCgS$O10}K1w7U"><field name="NUM">0</field></block></value><value name="TOHIGH"><block type="math_number" id="=e|oi^dMS)nVEy6JlK#{"><field name="NUM">70</field></block></value></block></value><value name="MIN"><block type="math_number" id="]hfLO,sEw@+ZH:0uVj$."><field name="NUM">0</field></block></value><value name="MAX"><block type="math_number" id="TZSa[`MT_G8Y`2XvU}|j"><field name="NUM">59</field></block></value></block></value></block></value><next><block type="logic_if" id="l!C_U?`BA+0Lb(P!/s03"><mutation xmlns="http://www.w3.org/1999/xhtml" else="1"></mutation><value name="IF0"><block type="logic_compare" id=".vB7!cMjK;:L2ckY0tnm"><field name="OP">EQ</field><value name="A"><block type="variables_get" id="FlMK}[pp_vlis1bQ`iR5"><field name="VAR" id="HWPMBubduqzal^eA-y_;">Minute</field></block></value><value name="B"><block type="math_number" id="Lu*2o(DelY3hnMm]NfZ%"><field name="NUM">0</field></block></value></block></value><statement name="DO0"><block type="set_pixel_color" id="/r,-W)5*N0;DZfb.]hL|"><field name="MODE">MODE1</field><value name="FROM"><block type="math_number" id="b`jh6yR~pV.ddbP|xv5R"><field name="NUM">60</field></block></value><value name="TO"><block type="math_number" id=",x@7y+v3?g-HIaav0|i."><field name="NUM">1</field></block></value><value name="H"><block type="math_number" id="9lgaK+Y..r0,*d/MJxU`"><field name="NUM">180</field></block></value><value name="S"><block type="math_number" id="+y]{DQ,rdrRbr6hm-i]{"><field name="NUM">100</field></block></value><value name="B"><block type="math_number" id="ptxq4hFw~q$qX8@p(a::"><field name="NUM">100</field></block></value></block></statement><statement name="ELSE"><block type="set_pixel_color" id="kccNb$lf0MkCL3/a=D7C"><field name="MODE">MODE1</field><value name="FROM"><block type="code_pin" id="x3QHg,O~;?4pfK_W/-_I"><field name="CODE_PIN">Minute</field></block></value><value name="TO"><block type="math_number" id="UPY}zf2(dr{poc:VKt^X"><field name="NUM">1</field></block></value><value name="H"><block type="math_number" id="XoMVq@7f.l)otK`}DO69"><field name="NUM">180</field></block></value><value name="S"><block type="math_number" id="zHWWwy*hR^H:;Mp1hm77"><field name="NUM">100</field></block></value><value name="B"><block type="math_number" id="p+F?_ncmx+h]TiQa6?UO"><field name="NUM">100</field></block></value></block></statement></block></next></block></statement><next><block type="code_input" id="Bh6WKIKyr]jTMZoR)5hE"><field name="CODE_INPUT">setTime(Stunde,Minute,00,1,1,2021);</field><next><block type="code_input" id="{k5Ex;H5[ribtSL6m#aM"><field name="CODE_INPUT">RTC.set(now());</field></block></next></block></next></block></next></block></next></block></next></block></next></block></statement><next><block type="code_input" id="}[LJ/^@,qPR@65hp}|}6"><field name="CODE_INPUT"> setSyncProvider(RTC.get); </field><next><block type="code_input" id="@!(IpX_edr::HllnL#f^"><field name="CODE_INPUT">setSyncInterval(120);</field><next><block type="logic_if" id="iOij=pf5(exTz?:FH93("><mutation xmlns="http://www.w3.org/1999/xhtml" else="1"></mutation><value name="IF0"><block type="code_pin" id="P:%SMx5%5*_rnlR/TS/y"><field name="CODE_PIN">timeStatus()!= timeSet</field></block></value><statement name="DO0"><block type="set_pixel_color" id="Y.7|V8tP/j|@X8el%r*d"><field name="MODE">MODE1</field><value name="FROM"><block type="math_number" id="D#-[H6|gS9m9O@IpWSy2"><field name="NUM">60</field></block></value><value name="TO"><block type="math_number" id="T?oZk|SP9;Kr4H;~kQN%"><field name="NUM">1</field></block></value><value name="H"><block type="math_number" id="2|X~O2B),g)$.:Vq,;Mw"><field name="NUM">0</field></block></value><value name="S"><block type="math_number" id="eD~$fokvl-G=-0jY`kt}"><field name="NUM">100</field></block></value><value name="B"><block type="math_number" id="#J,,t-CpHp`YL.2R^1a_"><field name="NUM">100</field></block></value></block></statement><statement name="ELSE"><block type="set_pixel_color" id="zt]=ej@*%7BXV?JU$F^L"><field name="MODE">MODE1</field><value name="FROM"><block type="math_number" id="634c}z]VNawoy{J7`[,E"><field name="NUM">60</field></block></value><value name="TO"><block type="math_number" id="vAoW9*]?-nGg?Ut/(,#b"><field name="NUM">1</field></block></value><value name="H"><block type="math_number" id="64+DeyTn_RFK=@?tDm_e"><field name="NUM">120</field></block></value><value name="S"><block type="math_number" id="Zg;$MQGosGD~Ln+AOT{-"><field name="NUM">100</field></block></value><value name="B"><block type="math_number" id="vkADTiEo0,J7u%M]Qync"><field name="NUM">100</field></block></value></block></statement><next><block type="flow_delay" id="dh,6AOG+xRh4GeDm`;]E"><value name="DELAY"><block type="math_number" id="g.0ifI7|FvbJ$_LenA+H"><field name="NUM">2000</field></block></value></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block><block type="procedures_defreturn" id="J7GG|e9RJIZl8kHHw`^I" collapsed="true" x="-292" y="-245"><field name="NAME">Minutenzeiger</field><statement name="STACK"><block type="logic_if" id="]8v1~JW|Yc#)m6YD:lfD"><mutation xmlns="http://www.w3.org/1999/xhtml" else="1"></mutation><value name="IF0"><block type="logic_compare" id="3lsW!hhlRVQWW^NN0@cW"><field name="OP">EQ</field><value name="A"><block type="code_pin" id="N97I+D(EKnxeUq1,,?h#"><field name="CODE_PIN">minute()</field></block></value><value name="B"><block type="math_number" id="BN3[,XO-9qgfStNwlt^C"><field name="NUM">0</field></block></value></block></value><statement name="DO0"><block type="variables_set" id="?=)r`ZfJwzB8Tn|QXUj@"><field name="VAR" id="HWPMBubduqzal^eA-y_;">Minute</field><value name="VALUE"><block type="math_number" id="qqPARp5mY6Rs{$E-w/?d"><field name="NUM">60</field></block></value></block></statement><statement name="ELSE"><block type="variables_set" id=")?yTUn0kUye2[N4-iWa:"><field name="VAR" id="HWPMBubduqzal^eA-y_;">Minute</field><value name="VALUE"><block type="code_pin" id="//Wdm6_x6(}8r}O@iep*"><field name="CODE_PIN">minute()</field></block></value></block></statement></block></statement><value name="RETURN"><block type="variables_get" id="wUl:$(+Va0P6fkMYzb5z"><field name="VAR" id="HWPMBubduqzal^eA-y_;">Minute</field></block></value></block><block type="basic_main_loop" id="W)MN9?kSM7MH9XD]wS{~" deletable="false" x="14" y="-254"><value name="BLINK"><block type="basic_blinkcode" id="z+Gke.W9Eh-gcwmzRZwo"><field name="SHORT">1</field><field name="LONG">1</field></block></value><statement name="CODE"><block type="set_pixel_color" id="Lqj9.@+LbzROotnYw.rK"><field name="MODE">MODE2</field><value name="FROM"><block type="math_number" id="br!OlBmm`Er-`(Veeh^k"><field name="NUM">1</field></block></value><value name="TO"><block type="math_number" id="`LY(|}E{bC5p}Q)`;)l2"><field name="NUM">60</field></block></value><value name="H"><block type="math_number" id="U@39wR}!zaAdDjkAqT%3"><field name="NUM">225</field></block></value><value name="S"><block type="math_number" id="y0N;2bsf_Wrt_]s:]e,L"><field name="NUM">100</field></block></value><value name="B"><block type="math_number" id="8;Lu5j|rz3zd$IsXK;_f"><field name="NUM">20</field></block></value><next><block type="set_pixel_color" id="#saJ-[hRm=kbO[@?b5?]"><field name="MODE">MODE2</field><value name="FROM"><block type="procedures_callreturn" id="`p|*)AqSKt}b6MuLIOd#"><mutation name="Minutenzeiger"></mutation></block></value><value name="TO"><block type="math_number" id="/s8]jKCm,0**Le]Ddsd("><field name="NUM">1</field></block></value><value name="H"><block type="math_number" id="0*NL*)SB:;|Y?`%8DoP0"><field name="NUM">110</field></block></value><value name="S"><block type="math_number" id="a~II0fZi]}gNICi8Fm?4"><field name="NUM">100</field></block></value><value name="B"><block type="math_number" id="-:{v^::Tmh!b^O#o5kts"><field name="NUM">100</field></block></value><next><block type="set_pixel_color" id="{dr94aDGC,RYt.bYo*~L"><field name="MODE">MODE2</field><value name="FROM"><block type="procedures_callreturn" id="(_X$h#Fm/i3lr%$H]f^$"><mutation name="Stundenzeiger"></mutation></block></value><value name="TO"><block type="math_number" id="Go2;8.p=N!ZoSd+$K^+T"><field name="NUM">1</field></block></value><value name="H"><block type="math_number" id="c{UB;89^X185-v`oeqk*"><field name="NUM">160</field></block></value><value name="S"><block type="math_number" id="0iJ!%s~)?Z+i_W9@XUp#"><field name="NUM">100</field></block></value><value name="B"><block type="math_number" id="yhCy2LKY,upl!5#]DnRf"><field name="NUM">100</field></block></value><next><block type="set_pixel_color" id="r8WJ(vDtMtME)GcZY7FP"><field name="MODE">MODE2</field><value name="FROM"><block type="procedures_callreturn" id="+G`}bG*vs[u;45Fxak0F"><mutation name="Sekundenzeiger"></mutation></block></value><value name="TO"><block type="math_number" id="TEawF~M,*j,M[h7mWkc)"><field name="NUM">1</field></block></value><value name="H"><block type="math_number" id="DQis^G2`Tq+D*hqQ9?_("><field name="NUM">110</field></block></value><value name="S"><block type="math_number" id="h8UXo`5g`OpZWY]kZJ21"><field name="NUM">100</field></block></value><value name="B"><block type="math_number" id="4YifjzH#fF^TEy,*!+p5"><field name="NUM">100</field></block></value><next><block type="fast_led" id="Y)]7~Jz{1q=.;?mJ:SjA"><next><block type="fast_led_clear" id="c:gK9[$Ud.K;@M4hU/zQ"></block></next></block></next></block></next></block></next></block></next></block></statement></block><block type="procedures_defreturn" id="4f,8vzy?[B7Td!NwrxcL" collapsed="true" x="-291" y="-201"><field name="NAME">Stundenzeiger</field><statement name="STACK"><block type="logic_if" id="Vp?=@$h0lsHTZn]a3.:3"><mutation xmlns="http://www.w3.org/1999/xhtml" else="1"></mutation><value name="IF0"><block type="logic_compare" id="TOv=)./0V9Br9VaFl5Pn"><field name="OP">GT</field><value name="A"><block type="code_pin" id="H5SG*{XT/7KhF+(oxWPb"><field name="CODE_PIN">hourFormat12()*5+minute()/12</field></block></value><value name="B"><block type="math_number" id="Bz]K7(d9:K^,~]woH;Ij"><field name="NUM">60</field></block></value></block></value><statement name="DO0"><block type="variables_set" id="9sGc7e^uqY%_-Z0]ZFfC"><field name="VAR" id="N[C05SuDli-cVW+0w;D_">Stunde</field><value name="VALUE"><block type="code_pin" id="=0.+Y;fXM^5vXA^rjLSL"><field name="CODE_PIN">(hourFormat12()*5+minute()/12)-60</field></block></value></block></statement><statement name="ELSE"><block type="variables_set" id="T?)jAGeq4jA@!tPO=Y7T"><field name="VAR" id="N[C05SuDli-cVW+0w;D_">Stunde</field><value name="VALUE"><block type="code_pin" id="!8#L8tJ.+Q#K=j1MESBX"><field name="CODE_PIN">hourFormat12()*5+minute()/12</field></block></value></block></statement></block></statement><value name="RETURN"><block type="variables_get" id="@8q(x#vW/d7r[7SSGRe+"><field name="VAR" id="N[C05SuDli-cVW+0w;D_">Stunde</field></block></value></block><block type="basic_comment" id="{ha$ug_,?`9x^*`C5E`(" x="900" y="-224"><field name="COMMENT">Hintergrundfarbe (Achtung: nicht zu hell einstellen - Stromverbrauch!)</field></block><block type="procedures_defreturn" id="yS!f01pn%`6u3evErJ``" collapsed="true" x="-290" y="-153"><field name="NAME">Sekundenzeiger</field><statement name="STACK"><block type="logic_if" id="9cCl-iC(Y9t,HVF{R|]|"><mutation xmlns="http://www.w3.org/1999/xhtml" else="1"></mutation><value name="IF0"><block type="logic_compare" id="@xS3T,nyv!Z#+U|pl9PY"><field name="OP">EQ</field><value name="A"><block type="code_pin" id="$@iIZ`_`wyI#(/)=Cw:*"><field name="CODE_PIN">second()</field></block></value><value name="B"><block type="math_number" id="DC_tNSAnB}^v-a0C^kz1"><field name="NUM">0</field></block></value></block></value><statement name="DO0"><block type="variables_set" id="~(.v@lt59%$3pND?G+Rn"><field name="VAR" id="#6OjxR^kW_2wQVDEWY2{">Sekunde</field><value name="VALUE"><block type="math_number" id="}DL|6/e#uU9`/^I8[3H^"><field name="NUM">60</field></block></value></block></statement><statement name="ELSE"><block type="variables_set" id="1xUFk=U_u._KhTMmZ0C*"><field name="VAR" id="#6OjxR^kW_2wQVDEWY2{">Sekunde</field><value name="VALUE"><block type="code_pin" id="jjJZ9hg}YE)99g:JZ4.Y"><field name="CODE_PIN">second()</field></block></value></block></statement></block></statement><value name="RETURN"><block type="variables_get" id="(~ncQk5U-mL=J`B?=}._"><field name="VAR" id="#6OjxR^kW_2wQVDEWY2{">Sekunde</field></block></value></block></xml>

Einstellen der Uhr

  • Controller mit Strom verbinden oder Reset drücken (schwarze Taste auf Nano)
  • 12.00 Uhr leuchtet orange: drehe sofort kurz am Poti
  • Stundenzeiger-Modus: der Zeiger leuchtet für 8 Sekunden pink: stelle die Stunde ein
  • Minutenzeiger-Modus: der Zeiger leuchtet für 8 Sekunden cyan: stelle die Minute ein
  • 12.00 Uhr leuchtet kurz grün: die Zeit wurde erfolgreich eingestellt
  • 12.00 Uhr leuchtet kurz  rot: die Zeit wurde nicht eingestellt, die Uhr läuft ab 12.00 Uhr

Arduino Libraries

Falls du ohne Teacher’s Box arbeitest, musst du diese Libraries in deiner Arduino IDE installieren:

  • DS1307RTC.h für den Betrieb des Moduls
  • TimeLib.h für die Übersetzung des Signals in Sekunden, Minuten, Stunden, Tage, Monate, Jahre
  • Wire.h für den I2C Anschluss
  • FastLED für die Neopixel

Erweiterung mit binärer Anzeige auf einer Matrix

Experimentiere mit linearen Uhren und anderen Programmierungen für die Anzeige der Zeit, wie wir oben beschrieben haben. Aber auch mit einer Matrix lässt sich die Zeit schön anzeigen, denn damit lassen sich binäre Zahlen leicht darstellen. Wie eine binäre Anzeige funktioniert, lernst du in der Verkehrszähler-Challenge.

Versuche diesen Code zu verstehen!

Binäre Uhr mit Neopixel 4×4 Matrix:

Lösung: XML-Code in Editor einfügen
<xml xmlns="https://developers.google.com/blockly/xml"><variables><variable id="n/_%;f5mNS1Ev%_YDewY">Dezimalcode</variable><variable id="w*31~?|+c#PT^JI#`;G1">Farbe°</variable><variable id=".+_,gCEH:Q9W:j!A62*0">Sättigung %</variable><variable id="Kd8KnJ-r3g|d~PHtEiY6">Helligkeit %</variable><variable id="/qKL*;/x!%R,!Ovhh3ZU">1</variable><variable id="_TR;_OGyXAX;pZu;tDJf">2</variable><variable id="X8=}?3D]2x5*$N3/w!,k">3</variable><variable id="QE/jr0[0w5lKSW{oYgNL">4</variable><variable id="ATZ]^Dr%JzgVl(W,w9RE">Pause ms</variable><variable id="?K7eWV.aphZ(1PnR%k@g">FV°</variable><variable id="/0y_uI4Jv4bU)cSDh7)J">FH°</variable><variable id="-f{zBV=w=olsvW#/PEGZ">HV%</variable><variable id="Gegiis%pZIy4H8~8b)IO">HH%</variable><variable id="o8k$*n!MfMSp}2Wlj;`8">Jahr</variable><variable id="A3PF)7zzfI3ZS3bZ#rFM">Dividend</variable><variable id="[KN|a(J^348pM!$}2A7R">Monat</variable><variable id="#bI4ov(rS`RxMd$x~mRD">BitNummer</variable><variable id="c*?Y37BF:)Wx-G?,vo/?">Tag</variable><variable id="l9Ei[B]UF0YL`FcrA^#|">Bit</variable><variable id="QU6ex,W.GfMsw[.#fDnL">Stunde</variable><variable id="?wLd/Hp|P]/%{4!IZoOo">Minute</variable><variable id="M5imxudKeDrJ2G=4AK[^">Sekunde</variable></variables><block type="expert_setup" id="ylN@2zxsQ}EFAXU#rN;2" x="227" y="-714"><statement name="CODE"><block type="variables_set" id="bzllgJe8mqh|(w5M4^hQ"><field name="VAR" id="o8k$*n!MfMSp}2Wlj;`8">Jahr</field><value name="VALUE"><block type="math_number" id="+q)cT/JOyFKJb=1D:J[("><field name="NUM">2023</field></block></value><next><block type="variables_set" id="[:tN[:#m7r^^o(~JkD]k"><field name="VAR" id="[KN|a(J^348pM!$}2A7R">Monat</field><value name="VALUE"><block type="math_number" id="^+!QVOn)9D+r^Ca*zpu3"><field name="NUM">10</field></block></value><next><block type="variables_set" id="M1z.x4kmu,4e}:bEx6%F"><field name="VAR" id="c*?Y37BF:)Wx-G?,vo/?">Tag</field><value name="VALUE"><block type="math_number" id="OKO?emOa;-YVME.pxQD7"><field name="NUM">27</field></block></value><next><block type="variables_set" id="]D3%peIXGL(~E%d?ch+$"><field name="VAR" id="QU6ex,W.GfMsw[.#fDnL">Stunde</field><value name="VALUE"><block type="math_number" id="3U}u:m$Zp}Tl:?qtm5JA"><field name="NUM">21</field></block></value><next><block type="variables_set" id="[?;eyiF~c?u;/[QXD*lz"><field name="VAR" id="?wLd/Hp|P]/%{4!IZoOo">Minute</field><value name="VALUE"><block type="math_number" id="oI]1U?zY=6N!A+X-hV4P"><field name="NUM">58</field></block></value><next><block type="variables_set" id="QE_.5aF|_VYA2v5+;91O"><field name="VAR" id="M5imxudKeDrJ2G=4AK[^">Sekunde</field><value name="VALUE"><block type="math_number" id="nw?9e3**(ryjpPD{{lBF"><field name="NUM">0</field></block></value><next><block type="code_input" id="Q:}G2?gRL)[EEe8~ugwn"><field name="CODE_INPUT">setTime(Stunde,Minute,Sekunde,Tag,Monat,Jahr);</field><next><block type="code_input" id="X4h|Gg6)l:~@9Y]HeIP@"><field name="CODE_INPUT">RTC.set(now());</field><next><block type="code_input" id="HtZ*`ZQ5c.w:hI`@2lwU"><field name="CODE_INPUT"> setSyncProvider(RTC.get); </field><next><block type="code_input" id="t8aMz=G:D*Cva@v3,IVQ"><field name="CODE_INPUT">setSyncInterval(120);</field></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block><block type="basic_comment" id="dYlLCuse9FDcFLt]G5}$" x="480" y="-686"><field name="COMMENT">Stelle die aktuelle Zeit hier ein</field></block><block type="basic_comment" id="(WpVX1DuHtELd7#@kvmv" x="-159" y="-506"><field name="COMMENT">Falls du mit dem Modul RTC1307 arbeitest: &amp;#10;&gt; Stelle die Zeit ein&amp;#10;&gt; Lade den Code auf den Controller&amp;#10;&gt; deaktiviere diese Blöcke setTime und RTC.set(now())&amp;#10;&gt; lade den Code ein zweites Mal auf den Controller&amp;#10;So wird nicht bei jedem Neustart die Zeit neu eingestellt!</field></block><block type="set_neo_pixel" id="bmw]#GEj(a2!6OWUx@(|" x="226" y="-329"><value name="NUM_LEDS"><block type="math_number" id=":`o#0|wMGz{4ui13Z!i["><field name="NUM">16</field></block></value><value name="BRIGHTNESS"><block type="math_number" id="?oeGzA+Ap#NUC{QOvgU("><field name="NUM">30</field></block></value><value name="OUTTURN"><block type="led_pin" id="@0xE:ifIn0bNeU*TR*/y"><field name="LED">LED1</field></block></value></block><block type="basic_comment" id="9ZF*g[_C]{MWii;muwUJ" x="-249" y="-253"><field name="COMMENT">Unterprogramme zur Übersetzung der Zeit in Binärcode</field></block><block type="code_declaration" id="9Adf#cr)u^R-cV0iG7$J" x="225" y="-249"><field name="CODE_DECLRATION">#include &lt;TimeLib.h&gt;&amp;#10;#include &lt;Wire.h&gt;&amp;#10;#include &lt;DS1307RTC.h&gt;</field></block><block type="procedures_defnoreturn" id="?SfC3CIs`::YLgrXY^Z5" collapsed="true" x="-250" y="-202"><mutation><arg name="Dezimalcode" varid="n/_%;f5mNS1Ev%_YDewY"></arg><arg name="Farbe°" varid="w*31~?|+c#PT^JI#`;G1"></arg><arg name="Sättigung %" varid=".+_,gCEH:Q9W:j!A62*0"></arg><arg name="Helligkeit %" varid="Kd8KnJ-r3g|d~PHtEiY6"></arg></mutation><field name="NAME">Leuchte Matrix</field><statement name="STACK"><block type="variables_set" id="(L(So~,eCHHb_b/3OX9A"><field name="VAR" id="A3PF)7zzfI3ZS3bZ#rFM">Dividend</field><value name="VALUE"><block type="variables_get" id="!Kfm|d)H,cKeirrOZ+M5"><field name="VAR" id="n/_%;f5mNS1Ev%_YDewY">Dezimalcode</field></block></value><next><block type="flow_for" id="8?gOhI~8@8u4l^87u-Yr"><field name="VAR" id="#bI4ov(rS`RxMd$x~mRD">BitNummer</field><value name="FROM"><block type="math_number" id="(lCd}5y!ju,P8^BmhS];"><field name="NUM">1</field></block></value><value name="TO"><block type="math_number" id="@BS3]9]:}F|AC@=W]XW("><field name="NUM">16</field></block></value><value name="BY"><block type="math_number" id="gaY?_yHrFkqYJ~lm[F@^"><field name="NUM">1</field></block></value><statement name="DO"><block type="variables_set" id="/zOT=$D`MV0}qc`z#j$^"><field name="VAR" id="l9Ei[B]UF0YL`FcrA^#|">Bit</field><value name="VALUE"><block type="math_single_basic" id="TP9!}zlsxKQsbZ!oJfb|"><field name="OP">ABS</field><value name="NUM"><block type="math_div" id="p%{):;Y_9HK7#H|u.tPf"><value name="VAL1"><block type="code_pin" id="{E^Qk`#Tn,9B}:Q[yYhm"><field name="CODE_PIN">(unsigned int)Dividend</field></block></value><value name="VAL2"><block type="math_number" id="0NE.v8P$h11vxZ!:OlN7"><field name="NUM">2</field></block></value></block></value></block></value><next><block type="logic_if" id="t2rZ?)EmqvWv.,w1~/e|"><value name="IF0"><block type="logic_compare" id="~)%.^y+KcD3LZC,rL[sO"><field name="OP">EQ</field><value name="A"><block type="variables_get" id=".=d+C=|eRc0R/$Oh|)o`"><field name="VAR" id="l9Ei[B]UF0YL`FcrA^#|">Bit</field></block></value><value name="B"><block type="math_number" id="hk?`,Q#+kGHuwwG[,JwL"><field name="NUM">1</field></block></value></block></value><statement name="DO0"><block type="set_pixel_color" id="$#4sOy_I,5(dy=m(cOkm"><field name="MODE">MODE2</field><value name="FROM"><block type="variables_get" id="Uhhtqh~65_iF]Lk~*.a4"><field name="VAR" id="#bI4ov(rS`RxMd$x~mRD">BitNummer</field></block></value><value name="TO"><block type="math_number" id="sT4oR}=Ce3%o#W@wp-+S"><field name="NUM">1</field></block></value><value name="H"><block type="variables_get" id="nyVW[L}EH:~SZZ-_DYt9"><field name="VAR" id="w*31~?|+c#PT^JI#`;G1">Farbe°</field></block></value><value name="S"><block type="variables_get" id="TGJh[{uS|xh;sEm[,}X|"><field name="VAR" id=".+_,gCEH:Q9W:j!A62*0">Sättigung %</field></block></value><value name="B"><block type="math_arithmetic" id="!C_I~h|0MZ[+Ucm[nc1y"><field name="OP">MULTIPLY</field><value name="A"><block type="variables_get" id="T9vL:6K=*LM^L~I3Uypk"><field name="VAR" id="l9Ei[B]UF0YL`FcrA^#|">Bit</field></block></value><value name="B"><block type="variables_get" id="C5Lm0ef,_eshom*;2qot"><field name="VAR" id="Kd8KnJ-r3g|d~PHtEiY6">Helligkeit %</field></block></value></block></value></block></statement><next><block type="variables_set" id="rGU1,%!=xQb.)$8CiLW["><field name="VAR" id="A3PF)7zzfI3ZS3bZ#rFM">Dividend</field><value name="VALUE"><block type="math_arithmetic" id="uqLLj.dio)oPT}s6!,DE"><field name="OP">DIVIDE</field><value name="A"><block type="code_pin" id="{~?eq1#)+JA~IgcB(GP,"><field name="CODE_PIN">(unsigned int)Dividend</field></block></value><value name="B"><block type="math_number" id="C=5L@PiuLJNsS1}*H#X$"><field name="NUM">2</field></block></value></block></value></block></next></block></next></block></statement><next><block type="fast_led" id="C!],#6%q_KagyLso%TZg"><next><block type="fast_led_clear" id="gCE0[S7l.=s;~RHk:oqI"><next><block type="code_input" id="`)?xI_O.mMs}vJF/s)tR"><field name="CODE_INPUT">// Lerne hier, wie eine Dezimalzahl in eine Binärzahl umgewandelt wird&amp;#10;// https://www.rapidtables.com/convert/number/decimal-to-binary.html?x=10</field></block></next></block></next></block></next></block></next></block></statement></block><block type="procedures_defnoreturn" id="6$rp,+Y.vfTX,NaHq+.W" collapsed="true" x="-249" y="-155"><mutation><arg name="Dezimalcode" varid="n/_%;f5mNS1Ev%_YDewY"></arg><arg name="Farbe°" varid="w*31~?|+c#PT^JI#`;G1"></arg><arg name="Sättigung %" varid=".+_,gCEH:Q9W:j!A62*0"></arg><arg name="Helligkeit %" varid="Kd8KnJ-r3g|d~PHtEiY6"></arg></mutation><field name="NAME">Speichere Matrix in Zwischenspeicher</field><statement name="STACK"><block type="variables_set" id="?y9oNjpri~$yFa.J=6V."><field name="VAR" id="A3PF)7zzfI3ZS3bZ#rFM">Dividend</field><value name="VALUE"><block type="variables_get" id="x6:e40=EZIwLaz4j{bd#"><field name="VAR" id="n/_%;f5mNS1Ev%_YDewY">Dezimalcode</field></block></value><next><block type="flow_for" id="?V(xw|0x7|u5ugnh*s/|"><field name="VAR" id="#bI4ov(rS`RxMd$x~mRD">BitNummer</field><value name="FROM"><block type="math_number" id="cncBR0?btec@:KJ:J8l9"><field name="NUM">1</field></block></value><value name="TO"><block type="math_number" id="bA~okUtsmIZI]|*Eh15-"><field name="NUM">16</field></block></value><value name="BY"><block type="math_number" id="wV^}.ppGh/7M1fqy$r]T"><field name="NUM">1</field></block></value><statement name="DO"><block type="variables_set" id="3ATJ_3KO_h%R=t@YDDyq"><field name="VAR" id="l9Ei[B]UF0YL`FcrA^#|">Bit</field><value name="VALUE"><block type="math_single_basic" id="MDsryqn5_G4:t`yV18A-"><field name="OP">ABS</field><value name="NUM"><block type="math_div" id="x^He%ACOq*%$E%`YuGFJ"><value name="VAL1"><block type="code_pin" id="5G1xdVEvlr32BBIaye}j"><field name="CODE_PIN">(unsigned int)Dividend</field></block></value><value name="VAL2"><block type="math_number" id="1B%746*%s`Q_qmQE-C/="><field name="NUM">2</field></block></value></block></value></block></value><next><block type="logic_if" id=":P/w(_K{o`6=Dl2%)7(y"><value name="IF0"><block type="logic_compare" id="RLj5tF+%[!FB#_+sYF8T"><field name="OP">EQ</field><value name="A"><block type="variables_get" id="q,;9W%/=nlIc1hf=%Fj_"><field name="VAR" id="l9Ei[B]UF0YL`FcrA^#|">Bit</field></block></value><value name="B"><block type="math_number" id="d9cn7z]yT$0j1bBp{C+n"><field name="NUM">1</field></block></value></block></value><statement name="DO0"><block type="set_pixel_color" id="_rdMpDld(l/zu([)T`mx"><field name="MODE">MODE2</field><value name="FROM"><block type="variables_get" id="j$(f@c3fQ:fQB83P[T[7"><field name="VAR" id="#bI4ov(rS`RxMd$x~mRD">BitNummer</field></block></value><value name="TO"><block type="math_number" id="$a$rKyRV$:l6*jDGvTBp"><field name="NUM">1</field></block></value><value name="H"><block type="variables_get" id="-VQY^!jWts!3a@3o5K:#"><field name="VAR" id="w*31~?|+c#PT^JI#`;G1">Farbe°</field></block></value><value name="S"><block type="variables_get" id="|yp|}`:Sp,FSGqV2n1G6"><field name="VAR" id=".+_,gCEH:Q9W:j!A62*0">Sättigung %</field></block></value><value name="B"><block type="math_arithmetic" id="4:Vf_aRv4etcKB{44A=%"><field name="OP">MULTIPLY</field><value name="A"><block type="variables_get" id="mZIPfzAybt@pcXh_(hDs"><field name="VAR" id="l9Ei[B]UF0YL`FcrA^#|">Bit</field></block></value><value name="B"><block type="variables_get" id="m@?RWh(,1jC`KhWo#?+n"><field name="VAR" id="Kd8KnJ-r3g|d~PHtEiY6">Helligkeit %</field></block></value></block></value></block></statement><next><block type="variables_set" id="~_$ic0xVH^s]_/ty}jzx"><field name="VAR" id="A3PF)7zzfI3ZS3bZ#rFM">Dividend</field><value name="VALUE"><block type="math_arithmetic" id="/p7$23-jN|$TOOZI)TB2"><field name="OP">DIVIDE</field><value name="A"><block type="code_pin" id="`Tx{7HeJxiGSj7p{Nwus"><field name="CODE_PIN">(unsigned int)Dividend</field></block></value><value name="B"><block type="math_number" id="ulPf1p.p,K9.3*/{oWU0"><field name="NUM">2</field></block></value></block></value></block></next></block></next></block></statement><next><block type="code_input" id="_02ed-P{`s:iOb5A0^qD"><field name="CODE_INPUT">// Lerne hier, wie eine Dezimalzahl in eine Binärzahl umgewandelt wird&amp;#10;// https://www.rapidtables.com/convert/number/decimal-to-binary.html?x=10</field></block></next></block></next></block></statement></block><block type="basic_main_loop" id="oh{4)]E/c6ZnlvMJU:hx" deletable="false" x="227" y="-138"><value name="BLINK"><block type="basic_blinkcode" id="30Q8]G`cyw:$0tmjHjkl"><field name="SHORT">1</field><field name="LONG">1</field></block></value><statement name="CODE"><block type="procedures_callnoreturn" id="omzK|3yKzLOj4!Z{$HX3"><mutation name="Speichere 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="code_pin" id="0l%)JD0f%SC)?we|c.C_"><field name="CODE_PIN">hour()</field></block></value><value name="ARG1"><block type="math_number" id="V~L2MdDI|9=8sfZmw%BB"><field name="NUM">120</field></block></value><value name="ARG2"><block type="math_number" id=")UM*wE%7L`Z(fwsr!N(u"><field name="NUM">100</field></block></value><value name="ARG3"><block type="math_number" id="6,!.Tl,%=/ovuk0LBLmX"><field name="NUM">40</field></block></value><next><block type="procedures_callnoreturn" id="i8ec;GpqlT32NC[?;2=d"><mutation name="Speichere 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_arithmetic" id=")wPJ6sC]PAiI$D]S8Vx)"><field name="OP">MULTIPLY</field><value name="A"><block type="code_pin" id="qvgF/AGX]9a{uS`Y9E?5"><field name="CODE_PIN">second()</field></block></value><value name="B"><block type="math_number" id="_K!Fqj9.+d1iBv8q3v9^"><field name="NUM">256</field></block></value></block></value><value name="ARG1"><block type="math_number" id="[PMi(i:)Y#exT~PLdNFs"><field name="NUM">20</field></block></value><value name="ARG2"><block type="math_number" id="G|xqvMC^^Au:OB5K7ZwU"><field name="NUM">100</field></block></value><value name="ARG3"><block type="math_number" id="Bex!c=ZSx+dfu)CPf.[0"><field name="NUM">35</field></block></value><next><block type="procedures_callnoreturn" id="TG$f]Be-ZUv(THQx3i=C"><mutation name="Speichere 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_arithmetic" id="j._Ko=s2cgE|wg*]b;h@"><field name="OP">MULTIPLY</field><value name="A"><block type="code_pin" id="GT#FoUe:~up;:,v:m!T+"><field name="CODE_PIN">minute()</field></block></value><value name="B"><block type="math_number" id=".3f[:8{1sr$U]YT]mcU$"><field name="NUM">256</field></block></value></block></value><value name="ARG1"><block type="math_number" id="R0xa5p`Vf(/S)!h8CTe:"><field name="NUM">220</field></block></value><value name="ARG2"><block type="math_number" id="pbO]+^zO30,c[.[Ub*7*"><field name="NUM">100</field></block></value><value name="ARG3"><block type="math_number" id="a06?4H.!/1T]o[R|@A)%"><field name="NUM">60</field></block></value><next><block type="fast_led" id=":$21W8Z@-1uA2S00t9F}"><next><block type="fast_led_clear" id="mso(V,=r}X}*(m.CzY^|"></block></next></block></next></block></next></block></next></block></statement></block><block type="procedures_defnoreturn" id="2~?vi.;+.rR/Lo^Ss;oc" collapsed="true" x="-248" y="-107"><mutation><arg name="1" varid="/qKL*;/x!%R,!Ovhh3ZU"></arg><arg name="2" varid="_TR;_OGyXAX;pZu;tDJf"></arg><arg name="3" varid="X8=}?3D]2x5*$N3/w!,k"></arg><arg name="4" varid="QE/jr0[0w5lKSW{oYgNL"></arg><arg name="Pause ms" varid="ATZ]^Dr%JzgVl(W,w9RE"></arg><arg name="FV°" varid="?K7eWV.aphZ(1PnR%k@g"></arg><arg name="FH°" varid="/0y_uI4Jv4bU)cSDh7)J"></arg><arg name="HV%" varid="-f{zBV=w=olsvW#/PEGZ"></arg><arg name="HH%" varid="Gegiis%pZIy4H8~8b)IO"></arg></mutation><field name="NAME">Leuchte Animation</field><statement name="STACK"><block type="set_pixel_color" id="j.T}l0y2IkJcjQ3X?8C("><field name="MODE">MODE2</field><value name="FROM"><block type="math_number" id="4Z9YjZOk!3w([+b2OZJ2"><field name="NUM">1</field></block></value><value name="TO"><block type="math_number" id="n]{(sq0jRF1?|gQK+mTG"><field name="NUM">16</field></block></value><value name="H"><block type="variables_get" id=".i[q0%-VK$`i)xZWzMG]"><field name="VAR" id="/0y_uI4Jv4bU)cSDh7)J">FH°</field></block></value><value name="S"><block type="math_number" id="ju5Cl)(x5}L6H~JKnrt+"><field name="NUM">100</field></block></value><value name="B"><block type="variables_get" id="EN//9MUQIKn0-U5Ol=d%"><field name="VAR" id="Gegiis%pZIy4H8~8b)IO">HH%</field></block></value><next><block type="procedures_callnoreturn" id="x.[+RdA(*n-du0xqJ_0z"><mutation name="Speichere 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="variables_get" id="^vv;Rc7^BnaD2^]jLSo;"><field name="VAR" id="/qKL*;/x!%R,!Ovhh3ZU">1</field></block></value><value name="ARG1"><block type="variables_get" id="ey%ZNsrR$EQJ;FHT-UZ_"><field name="VAR" id="?K7eWV.aphZ(1PnR%k@g">FV°</field></block></value><value name="ARG2"><block type="math_number" id="QA9sfiigN3o=XYJa:O?w"><field name="NUM">100</field></block></value><value name="ARG3"><block type="variables_get" id="S1VOf|)Wb;pV|W8Q,MGK"><field name="VAR" id="-f{zBV=w=olsvW#/PEGZ">HV%</field></block></value><next><block type="fast_led" id="KqWQH@K_n2jX+~IFerFc"><next><block type="logic_if" id="QU:XnpF[HS,SY7%+#!/%"><mutation xmlns="http://www.w3.org/1999/xhtml" else="1"></mutation><value name="IF0"><block type="logic_compare" id="*+Rj=qi|dw)ysh.-%C=,"><field name="OP">EQ</field><value name="A"><block type="variables_get" id=":Z_l?uc_C4ERn|M_,C#K"><field name="VAR" id="/qKL*;/x!%R,!Ovhh3ZU">1</field></block></value><value name="B"><block type="math_number" id="hC=$oCiLpG[ZsB@d53Y~"><field name="NUM">0</field></block></value></block></value><statement name="ELSE"><block type="flow_delay" id="qCGcnIl)9V?Yvo,s%GY1"><value name="DELAY"><block type="variables_get" id="iWp-AxU;^+w_*ryrYvSZ"><field name="VAR" id="ATZ]^Dr%JzgVl(W,w9RE">Pause ms</field></block></value></block></statement><next><block type="set_pixel_color" id="a#aJl5xEbHa3BpeX2g)Q"><field name="MODE">MODE2</field><value name="FROM"><block type="math_number" id="`kk7cin#bu4CV)9e]AY+"><field name="NUM">1</field></block></value><value name="TO"><block type="math_number" id="$ZbzfeX`KcK4@!g!0$~7"><field name="NUM">16</field></block></value><value name="H"><block type="variables_get" id="Jz!ck1ta,_8sTk;Zr(_^"><field name="VAR" id="/0y_uI4Jv4bU)cSDh7)J">FH°</field></block></value><value name="S"><block type="math_number" id="`}q)jggpDy]St{EJ_9D."><field name="NUM">100</field></block></value><value name="B"><block type="variables_get" id="]4,l%tvX!0,=CO{r1x*g"><field name="VAR" id="Gegiis%pZIy4H8~8b)IO">HH%</field></block></value><next><block type="procedures_callnoreturn" id="g,XT1axi%;TSyOzXeov("><mutation name="Speichere 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="variables_get" id="$i.tqgFcz+/sHly=SJvZ"><field name="VAR" id="_TR;_OGyXAX;pZu;tDJf">2</field></block></value><value name="ARG1"><block type="variables_get" id="3Ct/_!.V=,*/EI!/D3pf"><field name="VAR" id="?K7eWV.aphZ(1PnR%k@g">FV°</field></block></value><value name="ARG2"><block type="math_number" id="EB+Ga%c+RRj8%$Qn-v0m"><field name="NUM">100</field></block></value><value name="ARG3"><block type="variables_get" id="^1yo-JZ%E{w-6luLgI