4 – Binäre Uhr: Knackst du den Code und entschlüsselst die kryptografische Zeitanzeige?
Binäre Uhr: Knackst du den Code und entschlüsselst die kryptografische Zeitanzeige?
Das lernst du hier
Eine binäre Uhr ist nichts Alltägliches, aber dafür umso geheimnisvoller und stylischer. Wie eine Kryptomaschine in einem Agenten-Krimi wird die Zeit verschlüsselt als Binär-Code angezeigt und du musst ihn mit ein wenig Kopfrechnen decodieren. Aber keine Angst, das ist gar nicht so schwer und erst noch ein cooles Training für deine Mathe-Skills!
Präzision dank Uhrenmodul aber es geht auch ohne
Das Projekt verwendet optional das Clock-Modul RTC DS1307, welches dafür sorgt, dass die Uhr sehr präzise läuft. Demgegenüber kannst du die Uhr auch ohne dieses Modul bauen, denn die eigentliche Zeitmessung gelingt alleine mit einem Arduino. Egal, wofür du dich entscheidest, wir haben die Programmierung so gemacht, dass sich daran nichts ändert.
Binäre Uhr ablesen und “decodieren”
Im Video siehst du, wie der binär-Code in die Zeit umgewandelt wird. Das ist aber nicht die einzige Art, die Zeit binär darzustellen, denn mit einem klassischen Neopixel-Stripe eröffnen sich dir weitere Möglichkeiten. Egal ob Matrix oder Stripe: entwickle dein eigenes Design der binären Uhr!
By the way: die Sekunden im Video sind rein dekorativ und lassen sich nicht immer genau ablesen, denn sie werden durch die wichtigeren Minuten überdeckt!
Wie wird die Zeit von der Matrix abgelesen? Rechne einfach die binäre Zahl in eine dezimale Zahl um↗, denn jeder Pixel steht für eine 0 oder 1. Diese Grafik zeigt dir, wie’s geht!
Tipp: Es gibt noch andere interessante Arten, die Zeit zu codieren.
> Lienaruhr von Designer Peter Herta↗ und Video↗
> Lichtzeitpegel Rheinturm Düsseldorf↗
> Binäre Uhr am Bahnhof SBB in St.Gallen↗
Neopixel Matrix und optionale Echtzeituhr anschliessen
Anschlussschema für die Matrix und die optionale Echtzeituhr:
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”.
Grundfunktion der Uhr (mit oder ohne Modul)
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 Zeitwerte des Arduinos in lesbare Zeit- und Datumsangaben übersetzt.
Wenn du das Modul RTC1307 verwendest: Die Zeit muss 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.
Binäre Uhr programmieren
Verstehen, wie binäre Zahlen auf der Matrix dargestellt werden
Ob eine 4×4 Matrix, wie hier im Video oder ein gerader Neopixel Stripe ist eigentlich egal, denn die Pixel sind auf der Matrix als eine Art Schlangenlinien-Stripe miteinander verbunden. Schaue das Video, dann verstehst du das schnell. Jeder der Pixel steht damit für eine Stelle im binär-System: 1er, 2er, 4er, 8er, usw.↗.
Mehrfarbige Matrix programmieren
Für die Darstellung der Zeit wirst du auf der gleichen Matrix (oder dem gleichen Stripe) Pixel mit unterschiedlichen Farben leuchten lassen. Das klingt doch einfach, oder? Nicht ganz, denn zur Darstellung von unterschiedlichen Farben mit Neopixeln, wird zuerst ein “Bild” im Zwischenspeicher aufgebaut und erst am Ende an die Matrix gesendet. Studiere dazu Aufgabe 4 im Matrix-Designer und klicke auch auf die Videos!
Das Programm
Da auf der Matrix die ersten beiden Pixelreihen (Pixel 1-8) ausreichen, um Zahlen zwischen 0 und 59 darzustellen, teilen wir die Matrix in zwei Sektoren auf. So können links die Stunden und rechts die Minuten gezeigt werden. Im oberen Kapitel 5a siehst du, wie das aussieht.
Eine Möglichkeit das zu bewerkstelligen geht so:
> Die Übersetzung von dezimal zu binär geschieht automatisch
> Verstehe dies unter “wie ist die Matrix?” im Matrix Designer (nach unten scrollen)
> Speichere die Minuten im Pixel-Zwischenspeicher und wähle dazu eine Farbe
> Verschiebe 8 Pixel ab Pixel 1 um 8 Pixel – so startet die Anzeige der Minuten ab Pixel 9
> Speichere die Stunden im Pixel-Zwischenspeicher und wähle eine Farbe
> Sende das fertige Bild der Zeitanzeige aus dem Zwischenspeicher an die Matrix
> Neutralisiere den Zwischenspeicher
Grafik 1: Minuten ab Pixel 1 anzeigen
Grafik 2: Minuten-Pixel verschieben
Hinweis: In Grafik 2 sind die Pixel mit ihren Nummern angeschrieben, in Grafik 1+3 hingegen mit ihren Binärwerten.
Challenge:
<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="jS_#R`rdb6ZUB@@cc-T}">Anzahl Pixel</variable><variable id="-E|FDBl%(Rxho!ZQ/{zd">von Pixel</variable><variable id="i@rs^u^K=p{GBfr`_GA/">nach Pixel</variable><variable id="o8k$*n!MfMSp}2Wlj;`8">Jahr</variable><variable id="A3PF)7zzfI3ZS3bZ#rFM">Dividend</variable><variable id="p]pu+v2LdW*/}urC#v7V">Pixel</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="225" y="-746"><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">11</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">16</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">39</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="479" y="-716"><field name="COMMENT">Stelle die aktuelle Zeit hier ein</field></block><block type="basic_comment" id="(WpVX1DuHtELd7#@kvmv" x="-174" y="-535"><field name="COMMENT">Falls du mit dem Modul RTC1307 arbeitest: &#10;> Stelle die Zeit ein&#10;> Lade den Code auf den Controller&#10;> deaktiviere diese Blöcke setTime und RTC.set(now())&#10;> lade den Code ein zweites Mal auf den Controller&#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">50</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 <TimeLib.h>&#10;#include <Wire.h>&#10;#include <DS1307RTC.h></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&#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&#10;// https://www.rapidtables.com/convert/number/decimal-to-binary.html?x=10</field></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@7"><field name="VAR" id="-f{zBV=w=olsvW#/PEGZ">HV%</field></block></value><next><block type="fast_led" id=":;5l]Wu@-D/LksS#`Qia"><next><block type="logic_if" id="|aNH!5]0B!@8ANO9-N3}"><mutation xmlns="http://www.w3.org/1999/xhtml" else="1"></mutation><value name="IF0"><block type="logic_compare" id="fN3kE`liSZ;5zY$5~t[%"><field name="OP">EQ</field><value name="A"><block type="variables_get" id="tG=KnlUMGxIGgc/*P+{K"><field name="VAR" id="_TR;_OGyXAX;pZu;tDJf">2</field></block></value><value name="B"><block type="math_number" id="#FL9,9T[KC|JUPCe%xx."><field name="NUM">0</field></block></value></block></value><statement name="ELSE"><block type="flow_delay" id="!jtg/+qHMO.[7xDA,8%+"><value name="DELAY"><block type="variables_get" id="l2qsyAyJEls{YkA_Zs4P"><field name="VAR" id="ATZ]^Dr%JzgVl(W,w9RE">Pause ms</field></block></value></block></statement><next><block type="set_pixel_color" id="AW7^3ZZgsSFt3H^%gCw^"><field name="MODE">MODE2</field><value name="FROM"><block type="math_number" id="u.87N3sZceOZi6E6!6pz"><field name="NUM">1</field></block></value><value name="TO"><block type="math_number" id="u|Ok^so8HySs0iNxxKs8"><field name="NUM">16</field></block></value><value name="H"><block type="variables_get" id="rX]+L^eeY/bXvpeOpd9p"><field name="VAR" id="/0y_uI4Jv4bU)cSDh7)J">FH°</field></block></value><value name="S"><block type="math_number" id="YaqUu!CL^vzX9YtxEb+W"><field name="NUM">100</field></block></value><value name="B"><block type="variables_get" id="`AU;T$p.AsQMB3UB2g/q"><field name="VAR" id="Gegiis%pZIy4H8~8b)IO">HH%</field></block></value><next><block type="procedures_callnoreturn" id="HMev=9FHKyJ%14Y?{sO1"><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="iG@=8@VDuzb*]`E,9cjQ"><field name="VAR" id="X8=}?3D]2x5*$N3/w!,k">3</field></block></value><value name="ARG1"><block type="variables_get" id="*`]^tzI$Pl^P@)uJI0mJ"><field name="VAR" id="?K7eWV.aphZ(1PnR%k@g">FV°</field></block></value><value name="ARG2"><block type="math_number" id="]H=$ULoQ;5R}fnb%A9^#"><field name="NUM">100</field></block></value><value name="ARG3"><block type="variables_get" id="KY}HkMO4D:t@61gAA%1="><field name="VAR" id="-f{zBV=w=olsvW#/PEGZ">HV%</field></block></value><next><block type="fast_led" id="@nT_WSlY`q^eIq[i5%NK"><next><block type="logic_if" id="{BK.V(g6w@9[rz=;RtIB"><mutation xmlns="http://www.w3.org/1999/xhtml" else="1"></mutation><value name="IF0"><block type="logic_compare" id="kC~=Qk%H~08xetx!Tr--"><field name="OP">EQ</field><value name="A"><block type="variables_get" id="}t/:mj0Wr(.=LcP/1IkV"><field name="VAR" id="X8=}?3D]2x5*$N3/w!,k">3</field></block></value><value name="B"><block type="math_number" id="QT-_o;{h!YSnLvFca^|V"><field name="NUM">0</field></block></value></block></value><statement name="ELSE"><block type="flow_delay" id="|yY^F2gUhdbS,x?AzHoR"><value name="DELAY"><block type="variables_get" id="[K[}3DqWVb}NeTmbg|2%"><field name="VAR" id="ATZ]^Dr%JzgVl(W,w9RE">Pause ms</field></block></value></block></statement><next><block type="set_pixel_color" id="DaXXVX#N}LW@jg)p;zzz"><field name="MODE">MODE2</field><value name="FROM"><block type="math_number" id=";/5m8-DhHUg2~31ng!R?"><field name="NUM">1</field></block></value><value name="TO"><block type="math_number" id=":6Tq.6Y%)XdxA[uGSzg:"><field name="NUM">16</field></block></value><value name="H"><block type="variables_get" id="M,Z2Q/M4;kU}+V@1BDGU"><field name="VAR" id="/0y_uI4Jv4bU)cSDh7)J">FH°</field></block></value><value name="S"><block type="math_number" id="54uu6y~0-sssfuJb2x`o"><field name="NUM">100</field></block></value><value name="B"><block type="variables_get" id="]XL`aWJig?8HW[1WbO1u"><field name="VAR" id="Gegiis%pZIy4H8~8b)IO">HH%</field></block></value><next><block type="procedures_callnoreturn" id="kq~Kq(gIbM!X*@VxG)wH"><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="4sV4kZ+gjLCo5UJSb3r("><field name="VAR" id="QE/jr0[0w5lKSW{oYgNL">4</field></block></value><value name="ARG1"><block type="variables_get" id="ZEbb@GVtW27T];{Xb-nK"><field name="VAR" id="?K7eWV.aphZ(1PnR%k@g">FV°</field></block></value><value name="ARG2"><block type="math_number" id="Y=~4{=%(=mXBNN1hD^MV"><field name="NUM">100</field></block></value><value name="ARG3"><block type="variables_get" id="V!qCf+K^9.c.Nra)3:Ct"><field name="VAR" id="-f{zBV=w=olsvW#/PEGZ">HV%</field></block></value><next><block type="fast_led" id="SH+foN.vEP*zWfzH4P*A"><next><block type="logic_if" id="a*S`R)G$?knkPgcQ`|sM"><mutation xmlns="http://www.w3.org/1999/xhtml" else="1"></mutation><value name="IF0"><block type="logic_compare" id="x?GvH?5o^]mZ,~^H(|VP"><field name="OP">EQ</field><value name="A"><block type="variables_get" id="niTuT0N}Q_3.)82e#)#N"><field name="VAR" id="QE/jr0[0w5lKSW{oYgNL">4</field></block></value><value name="B"><block type="math_number" id="8gnM8Ss9ZnZ37t7%mC$4"><field name="NUM">0</field></block></value></block></value><statement name="ELSE"><block type="flow_delay" id="8!@WHQC^[-gKehLdzD$q"><value name="DELAY"><block type="variables_get" id="8y^38y+WpV8Ug{_Wjm0u"><field name="VAR" id="ATZ]^Dr%JzgVl(W,w9RE">Pause ms</field></block></value></block></statement></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block><block type="basic_main_loop" id="oh{4)]E/c6ZnlvMJU:hx" deletable="false" x="229" y="-96"><value name="BLINK"><block type="basic_blinkcode" id="30Q8]G`cyw:$0tmjHjkl"><field name="SHORT">1</field><field name="LONG">1</field></block></value></block><block type="procedures_defnoreturn" id="~#[6Zm3c.f1.;@GP|xU9" collapsed="true" x="-247" y="-58"><mutation><arg name="Anzahl Pixel" varid="jS_#R`rdb6ZUB@@cc-T}"></arg><arg name="von Pixel" varid="-E|FDBl%(Rxho!ZQ/{zd"></arg><arg name="nach Pixel" varid="i@rs^u^K=p{GBfr`_GA/"></arg></mutation><field name="NAME">Verschiebe Pixel</field><statement name="STACK"><block type="flow_for" id="_,lIH.}A%[mL=t7#72XH"><field name="VAR" id="p]pu+v2LdW*/}urC#v7V">Pixel</field><value name="FROM"><block type="code_pin" id="8([sIo|~WiS?Ab3l!^ex"><field name="CODE_PIN">von_Pixel</field></block></value><value name="TO"><block type="code_pin" id="]2dMN(iehG-M](E;EP04"><field name="CODE_PIN">von_Pixel + Anzahl_Pixel - 1</field></block></value><value name="BY"><block type="math_number" id="?h4*ZdscFHKdD]Mgwx7Q"><field name="NUM">1</field></block></value><statement name="DO"><block type="expert_kopiere_pixel" id="An,._d[UU^{n9@fA1yd."><value name="PIXEL"><block type="variables_get" id="Hf!Uq+WYsLOSY#:s#@m5"><field name="VAR" id="p]pu+v2LdW*/}urC#v7V">Pixel</field></block></value><value name="NACHPIXEL"><block type="code_pin" id=";=QM.el#A](KAbfW141p"><field name="CODE_PIN">Pixel + (nach_Pixel - von_Pixel)</field></block></value></block></statement><next><block type="set_pixel_color" id="jQLX$J:j%f/a*t_0]Dj["><field name="MODE">MODE2</field><value name="FROM"><block type="code_pin" id="dCfFZKIG7w-{Qu%i@AW`"><field name="CODE_PIN">von_Pixel</field></block></value><value name="TO"><block type="code_pin" id="A=}5jV^S@RH$h.Hr]zSY"><field name="CODE_PIN">Anzahl_Pixel</field></block></value><value name="H"><block type="math_number" id="=S/Qk1C8p[d~5]?!zSiv"><field name="NUM">120</field></block></value><value name="S"><block type="math_number" id="41^A/k^U8M_}on82u(S_"><field name="NUM">100</field></block></value><value name="B"><block type="math_number" id="A:~!)(Kv)7[*f*nf-6=9"><field name="NUM">0</field></block></value></block></next></block></statement></block><block type="code_pin" id="S*_RK7g^ndUR#]R6hN.C" x="583" y="-6"><field name="CODE_PIN">hourFormat12()</field></block><block type="basic_comment" id="YQB_djJg5Gi9AQDQ94;X" x="725" y="-7"><field name="COMMENT">Verwende alternativ die 12-Stunden Anzeige - damit lässt sich die Uhr leichter ablesen</field></block><block type="procedures_callnoreturn" id="c3Kq=qc]^2C_..3|$sD-" x="229" y="42"><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="4d}YE*O:W,i+RP1e{0m^"><field name="CODE_PIN">hour()</field></block></value><value name="ARG1"><block type="math_number" id="@mqP#IFRTKAhvdmx5_O0"><field name="NUM">0</field></block></value><value name="ARG2"><block type="math_number" id="zqkLWE*C6y{QdYJWy(]2"><field name="NUM">100</field></block></value><value name="ARG3"><block type="math_number" id="ghk=Qww;C%vZrQum~@(r"><field name="NUM">100</field></block></value></block><block type="basic_comment" id="%-{z?ghss%FJmk`EO70o" x="1103" y="47"><field name="COMMENT">Speichere die Stunde in Pixel 1-8</field></block><block type="procedures_callnoreturn" id="TG$f]Be-ZUv(THQx3i=C" x="230" y="137"><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="GT#FoUe:~up;:,v:m!T+"><field name="CODE_PIN">minute()</field></block></value><value name="ARG1"><block type="math_number" id="R0xa5p`Vf(/S)!h8CTe:"><field name="NUM">0</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="BS0vgcR##U4)$B%tNo9+"><field name="NUM">100</field></block></value></block><block type="basic_comment" id=")$w`=IZm0Sfj1$.?0a7I" x="1100" y="142"><field name="COMMENT">Speichere die Minute in Pixel 1-8 und überlagere damit die Sekunden</field></block><block type="procedures_callnoreturn" id="i8ec;GpqlT32NC[?;2=d" x="230" y="236"><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="qvgF/AGX]9a{uS`Y9E?5"><field name="CODE_PIN">second()</field></block></value><value name="ARG1"><block type="math_number" id="[PMi(i:)Y#exT~PLdNFs"><field name="NUM">0</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="dPr*UExl2Aq+nZwC}a3m"><field name="NUM">100</field></block></value></block><block type="basic_comment" id="b:AD-BAZ*HJTrD`)}0wM" x="1102" y="240"><field name="COMMENT">Wenn du willst: Speichere die Sekunde in Pixel 1-8</field></block><block type="procedures_callnoreturn" id="k{A()AG)/Cu1PN%jzVKj" x="232" y="331"><mutation name="Verschiebe Pixel"><arg name="Anzahl Pixel"></arg><arg name="von Pixel"></arg><arg name="nach Pixel"></arg></mutation><value name="ARG0"><block type="math_number" id="xZz}cb`RyAl7XqkRo})s"><field name="NUM">0</field></block></value><value name="ARG1"><block type="math_number" id="-,4y#mXQ8KtA($5tPj-_"><field name="NUM">0</field></block></value><value name="ARG2"><block type="math_number" id="2/u6I=ybC4fWd:,ofO[n"><field name="NUM">0</field></block></value></block><block type="basic_comment" id="Zs]sOPM62@:-7M{UVKn4" x="748" y="335"><field name="COMMENT">Verschiebe Minuten und Sekunden nach Pixel 9-16</field></block><block type="fast_led" id=":$21W8Z@-1uA2S00t9F}" x="232" y="432"><next><block type="fast_led_clear" id="mso(V,=r}X}*(m.CzY^|"></block></next></block><block type="basic_comment" id=":es0Gm.(/xA[n:d1^DC$" x="581" y="442"><field name="COMMENT">Sende das komplette Bild an die Matrix und neutralisiere den Zwischenspeicher</field></block></xml>
Mögliche Lösung:
<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="jS_#R`rdb6ZUB@@cc-T}">Anzahl Pixel</variable><variable id="-E|FDBl%(Rxho!ZQ/{zd">von Pixel</variable><variable id="i@rs^u^K=p{GBfr`_GA/">nach Pixel</variable><variable id="o8k$*n!MfMSp}2Wlj;`8">Jahr</variable><variable id="A3PF)7zzfI3ZS3bZ#rFM">Dividend</variable><variable id=":WTF|l%Kw08y+f/`C#%U">Helligkeit</variable><variable id="p]pu+v2LdW*/}urC#v7V">Pixel</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="223" y="-895"><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">2024</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">4</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">21</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">12</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">21</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(60);</field><next><block type="logic_if" id="3q3ebbL`cPLqRe@UMy*:"><mutation xmlns="http://www.w3.org/1999/xhtml" else="1"></mutation><value name="IF0"><block type="code_pin" id="pSrp]7h-L,!G*X0v;KiI"><field name="CODE_PIN">timeStatus()!= timeSet</field></block></value><statement name="DO0"><block type="set_pixel_color" id="sTh-tPd=oovIO@l_k}:o"><field name="MODE">MODE1</field><value name="FROM"><block type="math_number" id="hFlSg4l79SA0v{5z60SC"><field name="NUM">1</field></block></value><value name="TO"><block type="math_number" id="w)#}T;p/QM!k#)m?r;|x"><field name="NUM">16</field></block></value><value name="H"><block type="math_number" id="Xs?DqI/FkF2Qa=gWXA/7"><field name="NUM">0</field></block></value><value name="S"><block type="math_number" id="hBw[;3TCsoqn=G[JUm!-"><field name="NUM">100</field></block></value><value name="B"><block type="math_number" id="m15~OZIj:(kv}JgX4}@Y"><field name="NUM">30</field></block></value></block></statement><statement name="ELSE"><block type="set_pixel_color" id="9:@Lrq3P5zbpI`h`^2I-"><field name="MODE">MODE1</field><value name="FROM"><block type="math_number" id="cx/n;0xH8T*q3+`xg+2F"><field name="NUM">1</field></block></value><value name="TO"><block type="math_number" id="C.arn$h(L:5ghjE!0F$k"><field name="NUM">16</field></block></value><value name="H"><block type="math_number" id="22hTz=C3sS5VhTKllsgQ"><field name="NUM">120</field></block></value><value name="S"><block type="math_number" id="3yMtBI.hXQm~b;v{]0o!"><field name="NUM">100</field></block></value><value name="B"><block type="math_number" id="%gFe85r+},!lOLuR/Z~+"><field name="NUM">30</field></block></value></block></statement><next><block type="flow_delay" id="Co}R0H7*+Wr(HQT+Dj|O"><value name="DELAY"><block type="math_number" id="aqvq9~^gi},WZ2kNq+^G"><field name="NUM">2000</field></block></value></block></next></block></next></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="513" y="-866"><field name="COMMENT">Stelle die aktuelle Zeit hier ein</field></block><block type="basic_comment" id="(WpVX1DuHtELd7#@kvmv" x="-168" y="-685"><field name="COMMENT">Falls du mit dem Modul RTC1307 arbeitest: &#10;> Stelle die Zeit ein&#10;> Lade den Code auf den Controller&#10;> deaktiviere diese Blöcke setTime und RTC.set(now())&#10;> lade den Code ein zweites Mal auf den Controller&#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">50</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 <TimeLib.h>&#10;#include <Wire.h>&#10;#include <DS1307RTC.h></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&#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&#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="223" y="-151"><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="variables_set" id="N0;haD=6dlD9tLC%l%5]"><field name="VAR" id=":WTF|l%Kw08y+f/`C#%U">Helligkeit</field><value name="VALUE"><block type="math_constrain" id="FbG1o3X8#)JB1]T*F4DS"><value name="VALUE"><block type="math_arithmetic" id="BlC%r|[wp-`2`,LK/q)S"><field name="OP">MULTIPLY</field><value name="A"><block type="sensor_read_percentage" id="?N_W?u/.o#48zg2s#k3X"><value name="SENSOR"><block type="sensor_pin" id="Dfno(g(SM0)LPmim2Msv"><field name="SENSOR">SENSOR2</field></block></value></block></value><value name="B"><block type="math_number" id="X+Zz2$2w)hl20]F@p+rP"><field name="NUM">1.2</field></block></value></block></value><value name="MIN"><block type="math_number" id="MdzubGl]Qx7fKJwLi6Ul"><field name="NUM">12</field></block></value><value name="MAX"><block type="math_number" id="{U-CS*p)f21K)$6@4ur/"><field name="NUM">80</field></block></value></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="code_pin" id="qvgF/AGX]9a{uS`Y9E?5"><field name="CODE_PIN">second()</field></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="variables_get" id="]*KRK7A8HW+gnS[j,6N9"><field name="VAR" id=":WTF|l%Kw08y+f/`C#%U">Helligkeit</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="code_pin" id="GT#FoUe:~up;:,v:m!T+"><field name="CODE_PIN">minute()</field></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="variables_get" id="OiEjRWxJD}Z%sq-7x!#p"><field name="VAR" id=":WTF|l%Kw08y+f/`C#%U">Helligkeit</field></block></value><next><block type="procedures_callnoreturn" id="k{A()AG)/Cu1PN%jzVKj"><mutation name="Verschiebe Pixel"><arg name="Anzahl Pixel"></arg><arg name="von Pixel"></arg><arg name="nach Pixel"></arg></mutation><value name="ARG0"><block type="math_number" id="xZz}cb`RyAl7XqkRo})s"><field name="NUM">8</field></block></value><value name="ARG1"><block type="math_number" id="-,4y#mXQ8KtA($5tPj-_"><field name="NUM">1</field></block></value><value name="ARG2"><block type="math_number" id="2/u6I=ybC4fWd:,ofO[n"><field name="NUM">9</field></block></value><next><block type="procedures_callnoreturn" id="c3Kq=qc]^2C_..3|$sD-"><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="4d}YE*O:W,i+RP1e{0m^"><field name="CODE_PIN">hour()</field></block></value><value name="ARG1"><block type="math_number" id="@mqP#IFRTKAhvdmx5_O0"><field name="NUM">120</field></block></value><value name="ARG2"><block type="math_number" id="zqkLWE*C6y{QdYJWy(]2"><field name="NUM">100</field></block></value><value name="ARG3"><block type="variables_get" id="D[W@xD?Jj+[oBm~sY07L"><field name="VAR" id=":WTF|l%Kw08y+f/`C#%U">Helligkeit</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></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@7"><field name="VAR" id="-f{zBV=w=olsvW#/PEGZ">HV%</field></block></value><next><block type="fast_led" id=":;5l]Wu@-D/LksS#`Qia"><next><block type="logic_if" id="|aNH!5]0B!@8ANO9-N3}"><mutation xmlns="http://www.w3.org/1999/xhtml" else="1"></mutation><value name="IF0"><block type="logic_compare" id="fN3kE`liSZ;5zY$5~t[%"><field name="OP">EQ</field><value name="A"><block type="variables_get" id="tG=KnlUMGxIGgc/*P+{K"><field name="VAR" id="_TR;_OGyXAX;pZu;tDJf">2</field></block></value><value name="B"><block type="math_number" id="#FL9,9T[KC|JUPCe%xx."><field name="NUM">0</field></block></value></block></value><statement name="ELSE"><block type="flow_delay" id="!jtg/+qHMO.[7xDA,8%+"><value name="DELAY"><block type="variables_get" id="l2qsyAyJEls{YkA_Zs4P"><field name="VAR" id="ATZ]^Dr%JzgVl(W,w9RE">Pause ms</field></block></value></block></statement><next><block type="set_pixel_color" id="AW7^3ZZgsSFt3H^%gCw^"><field name="MODE">MODE2</field><value name="FROM"><block type="math_number" id="u.87N3sZceOZi6E6!6pz"><field name="NUM">1</field></block></value><value name="TO"><block type="math_number" id="u|Ok^so8HySs0iNxxKs8"><field name="NUM">16</field></block></value><value name="H"><block type="variables_get" id="rX]+L^eeY/bXvpeOpd9p"><field name="VAR" id="/0y_uI4Jv4bU)cSDh7)J">FH°</field></block></value><value name="S"><block type="math_number" id="YaqUu!CL^vzX9YtxEb+W"><field name="NUM">100</field></block></value><value name="B"><block type="variables_get" id="`AU;T$p.AsQMB3UB2g/q"><field name="VAR" id="Gegiis%pZIy4H8~8b)IO">HH%</field></block></value><next><block type="procedures_callnoreturn" id="HMev=9FHKyJ%14Y?{sO1"><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="iG@=8@VDuzb*]`E,9cjQ"><field name="VAR" id="X8=}?3D]2x5*$N3/w!,k">3</field></block></value><value name="ARG1"><block type="variables_get" id="*`]^tzI$Pl^P@)uJI0mJ"><field name="VAR" id="?K7eWV.aphZ(1PnR%k@g">FV°</field></block></value><value name="ARG2"><block type="math_number" id="]H=$ULoQ;5R}fnb%A9^#"><field name="NUM">100</field></block></value><value name="ARG3"><block type="variables_get" id="KY}HkMO4D:t@61gAA%1="><field name="VAR" id="-f{zBV=w=olsvW#/PEGZ">HV%</field></block></value><next><block type="fast_led" id="@nT_WSlY`q^eIq[i5%NK"><next><block type="logic_if" id="{BK.V(g6w@9[rz=;RtIB"><mutation xmlns="http://www.w3.org/1999/xhtml" else="1"></mutation><value name="IF0"><block type="logic_compare" id="kC~=Qk%H~08xetx!Tr--"><field name="OP">EQ</field><value name="A"><block type="variables_get" id="}t/:mj0Wr(.=LcP/1IkV"><field name="VAR" id="X8=}?3D]2x5*$N3/w!,k">3</field></block></value><value name="B"><block type="math_number" id="QT-_o;{h!YSnLvFca^|V"><field name="NUM">0</field></block></value></block></value><statement name="ELSE"><block type="flow_delay" id="|yY^F2gUhdbS,x?AzHoR"><value name="DELAY"><block type="variables_get" id="[K[}3DqWVb}NeTmbg|2%"><field name="VAR" id="ATZ]^Dr%JzgVl(W,w9RE">Pause ms</field></block></value></block></statement><next><block type="set_pixel_color" id="DaXXVX#N}LW@jg)p;zzz"><field name="MODE">MODE2</field><value name="FROM"><block type="math_number" id=";/5m8-DhHUg2~31ng!R?"><field name="NUM">1</field></block></value><value name="TO"><block type="math_number" id=":6Tq.6Y%)XdxA[uGSzg:"><field name="NUM">16</field></block></value><value name="H"><block type="variables_get" id="M,Z2Q/M4;kU}+V@1BDGU"><field name="VAR" id="/0y_uI4Jv4bU)cSDh7)J">FH°</field></block></value><value name="S"><block type="math_number" id="54uu6y~0-sssfuJb2x`o"><field name="NUM">100</field></block></value><value name="B"><block type="variables_get" id="]XL`aWJig?8HW[1WbO1u"><field name="VAR" id="Gegiis%pZIy4H8~8b)IO">HH%</field></block></value><next><block type="procedures_callnoreturn" id="kq~Kq(gIbM!X*@VxG)wH"><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="4sV4kZ+gjLCo5UJSb3r("><field name="VAR" id="QE/jr0[0w5lKSW{oYgNL">4</field></block></value><value name="ARG1"><block type="variables_get" id="ZEbb@GVtW27T];{Xb-nK"><field name="VAR" id="?K7eWV.aphZ(1PnR%k@g">FV°</field></block></value><value name="ARG2"><block type="math_number" id="Y=~4{=%(=mXBNN1hD^MV"><field name="NUM">100</field></block></value><value name="ARG3"><block type="variables_get" id="V!qCf+K^9.c.Nra)3:Ct"><field name="VAR" id="-f{zBV=w=olsvW#/PEGZ">HV%</field></block></value><next><block type="fast_led" id="SH+foN.vEP*zWfzH4P*A"><next><block type="logic_if" id="a*S`R)G$?knkPgcQ`|sM"><mutation xmlns="http://www.w3.org/1999/xhtml" else="1"></mutation><value name="IF0"><block type="logic_compare" id="x?GvH?5o^]mZ,~^H(|VP"><field name="OP">EQ</field><value name="A"><block type="variables_get" id="niTuT0N}Q_3.)82e#)#N"><field name="VAR" id="QE/jr0[0w5lKSW{oYgNL">4</field></block></value><value name="B"><block type="math_number" id="8gnM8Ss9ZnZ37t7%mC$4"><field name="NUM">0</field></block></value></block></value><statement name="ELSE"><block type="flow_delay" id="8!@WHQC^[-gKehLdzD$q"><value name="DELAY"><block type="variables_get" id="8y^38y+WpV8Ug{_Wjm0u"><field name="VAR" id="ATZ]^Dr%JzgVl(W,w9RE">Pause ms</field></block></value></block></statement></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block><block type="procedures_defnoreturn" id="~#[6Zm3c.f1.;@GP|xU9" collapsed="true" x="-247" y="-58"><mutation><arg name="Anzahl Pixel" varid="jS_#R`rdb6ZUB@@cc-T}"></arg><arg name="von Pixel" varid="-E|FDBl%(Rxho!ZQ/{zd"></arg><arg name="nach Pixel" varid="i@rs^u^K=p{GBfr`_GA/"></arg></mutation><field name="NAME">Verschiebe Pixel</field><statement name="STACK"><block type="flow_for" id="_,lIH.}A%[mL=t7#72XH"><field name="VAR" id="p]pu+v2LdW*/}urC#v7V">Pixel</field><value name="FROM"><block type="code_pin" id="8([sIo|~WiS?Ab3l!^ex"><field name="CODE_PIN">von_Pixel</field></block></value><value name="TO"><block type="code_pin" id="]2dMN(iehG-M](E;EP04"><field name="CODE_PIN">von_Pixel + Anzahl_Pixel - 1</field></block></value><value name="BY"><block type="math_number" id="?h4*ZdscFHKdD]Mgwx7Q"><field name="NUM">1</field></block></value><statement name="DO"><block type="expert_kopiere_pixel" id="An,._d[UU^{n9@fA1yd."><value name="PIXEL"><block type="variables_get" id="Hf!Uq+WYsLOSY#:s#@m5"><field name="VAR" id="p]pu+v2LdW*/}urC#v7V">Pixel</field></block></value><value name="NACHPIXEL"><block type="code_pin" id=";=QM.el#A](KAbfW141p"><field name="CODE_PIN">Pixel + (nach_Pixel - von_Pixel)</field></block></value></block></statement><next><block type="set_pixel_color" id="jQLX$J:j%f/a*t_0]Dj["><field name="MODE">MODE2</field><value name="FROM"><block type="code_pin" id="dCfFZKIG7w-{Qu%i@AW`"><field name="CODE_PIN">von_Pixel</field></block></value><value name="TO"><block type="code_pin" id="A=}5jV^S@RH$h.Hr]zSY"><field name="CODE_PIN">Anzahl_Pixel</field></block></value><value name="H"><block type="math_number" id="=S/Qk1C8p[d~5]?!zSiv"><field name="NUM">120</field></block></value><value name="S"><block type="math_number" id="41^A/k^U8M_}on82u(S_"><field name="NUM">100</field></block></value><value name="B"><block type="math_number" id="A:~!)(Kv)7[*f*nf-6=9"><field name="NUM">0</field></block></value></block></next></block></statement></block><block type="basic_comment" id="b:AD-BAZ*HJTrD`)}0wM" x="1231" y="-62"><field name="COMMENT">Speichere die Sekunde in Pixel 1-8</field></block><block type="basic_comment" id=")$w`=IZm0Sfj1$.?0a7I" x="1231" y="-21"><field name="COMMENT">Speichere die Minute in Pixel 1-8 und überlagere damit die Sekunde</field></block><block type="basic_comment" id="Zs]sOPM62@:-7M{UVKn4" x="1232" y="16"><field name="COMMENT">Verschiebe Minuten und Sekunden nach Pixel 9-16</field></block><block type="basic_comment" id="%-{z?ghss%FJmk`EO70o" x="1232" y="55"><field name="COMMENT">Speichere die Stunde in Pixel 1-8</field></block><block type="basic_comment" id=":es0Gm.(/xA[n:d1^DC$" x="587" y="123"><field name="COMMENT">leuchte das gesamte Bild auf der Matrix und neutralisiere den Zwischenspeicher</field></block></xml>
Weiterführende Challenges:
> Entwerfe ein passendes Design für deine Uhr und baue ein Gehäuse aus Karton oder anderen Materialien.
> Spiele mit transparenten oder perforierten Materialien und lass dich von den Videos unten inspirieren. Wie kannst du die Lesbarkeit verbessern?
> Schliesse einen Lichtsensor an S2 und programmiere eine Umgebungslichtabhängige Helligkeitssteuerung.
> Das Echtzeitmodul RTC1307 kann auch das Datum speichern. Ist es möglich, damit eine automatische Umschaltung von Sommer- zu Winterzeit zu programmieren?
Video: Experimente mit perforierten oder transparenten Materialien
Anforderung:
✓ Mittel bis anspruchsvoll
✓ Bauen ohne Werkstatt
Thema:
> Zeit und Design
> Codieren und decodieren
> Training Kopfrechnen
> Neopixel programmieren
Werkzeug:
> Schere, Cutter
> Bei Echtzeitmodul RTC DS1307: Lötkolben
Material:
> Controller: pglu.ch/shop > Mikrocontroller KOMFORT mit BASIS
> Echtzeit Clock-Modul RTC DS1307: Hier suchen
> Holz oder Karton
Anleitungen:
> Neopixel programmieren: Coding > Neopixel > Grundlagen
3D-Modell:
> Hier anschauen
Videos:
> Vimeo: Vimeo
Basics:
> Lernumgebung aufbauen: pglu.ch > ANLEITUNG
> XML in Editor importieren: pglu.ch > ANLEITUNG > EDITOR
Editor:
> Online: mach.pglu.ch
> Teacher’s Box: mach.pglu.box