Tim
Published © LGPL

Skyline Binary Clock

Based on my previous project "binary clock" I designed a new one which can be used as decorative accessory.

BeginnerFull instructions provided4 hours523
Skyline Binary Clock

Things used in this project

Hardware components

Kniwwelino
Kniwwelino
×1
LED stripe ws2812
×1
plywood 4mm
×1
Connector Cable Seal, Silicone Rubber
Connector Cable Seal, Silicone Rubber
×1
micro USB port
×1

Hand tools and fabrication machines

Laser cutter (generic)
Laser cutter (generic)
Soldering iron (generic)
Soldering iron (generic)
Solder Wire, Lead Free
Solder Wire, Lead Free

Story

Read more

Custom parts and enclosures

front

back

stand

spacer

Code

binary clock

XML
This is the program created by the blocks from the pictures. Please open the file on https://code.kniwwelino.lu to upload it to your Kniwwelino or adjust it.
<xml xmlns="http://www.w3.org/1999/xhtml">
  <block type="arduino_functions_setup" id="DDtcZNak{t!S{nczqmR(" x="40" y="40">
    <statement name="SETUP_FUNC">
      <block type="kniwwelino_MATRIXdrawIcon" id="=.RR[`ypeMF_(mecsoBd">
        <value name="ICON">
          <block type="kniwwelino_MATRIXdrawIconCreator" id="x1ogMV,t/kD1I@9L4bS7">
            <field name="1_1">FALSE</field>
            <field name="1_2">TRUE</field>
            <field name="1_3">FALSE</field>
            <field name="1_4">TRUE</field>
            <field name="1_5">FALSE</field>
            <field name="2_1">TRUE</field>
            <field name="2_2">TRUE</field>
            <field name="2_3">TRUE</field>
            <field name="2_4">TRUE</field>
            <field name="2_5">TRUE</field>
            <field name="3_1">FALSE</field>
            <field name="3_2">TRUE</field>
            <field name="3_3">TRUE</field>
            <field name="3_4">TRUE</field>
            <field name="3_5">FALSE</field>
            <field name="4_1">TRUE</field>
            <field name="4_2">TRUE</field>
            <field name="4_3">TRUE</field>
            <field name="4_4">TRUE</field>
            <field name="4_5">TRUE</field>
            <field name="5_1">FALSE</field>
            <field name="5_2">TRUE</field>
            <field name="5_3">FALSE</field>
            <field name="5_4">TRUE</field>
            <field name="5_5">FALSE</field>
          </block>
        </value>
        <next>
          <block type="kniwwelino_sleepsec" id="C0w/e1*m7@H,Pw?KK~n^">
            <value name="DELAY_TIME_SEC">
              <shadow type="math_number" id="7!c2#uX6}x*S9!4Ddo7z">
                <field name="NUM">3</field>
              </shadow>
            </value>
          </block>
        </next>
      </block>
    </statement>
  </block>
  <block type="procedures_defnoreturn" id="8-rTIZdeD*XA4LACsm!n" x="684" y="15">
    <field name="NAME">get time</field>
    <comment pinned="false" h="80" w="160">Describe the function...</comment>
    <statement name="STACK">
      <block type="variables_set" id="SL,5rLxfhZY:^sn#oH_v">
        <field name="VAR">fulltime</field>
        <value name="VALUE">
          <block type="kniwwelino_getTimeInt" id="-A3gyq%okPw9J`{NwW.%">
            <field name="FORMAT">HOUR</field>
          </block>
        </value>
        <next>
          <block type="variables_set" id="{}R)dOYR|`K+u.kr4LOL">
            <field name="VAR">hours</field>
            <value name="VALUE">
              <block type="math_modulo" id="azVW}FPl!_g*2[.IbCZ*">
                <value name="DIVIDEND">
                  <block type="variables_get" id="uLd+~C6+pIykyY4eP*Sh">
                    <field name="VAR">fulltime</field>
                  </block>
                </value>
                <value name="DIVISOR">
                  <block type="math_number" id="H9y7XRVY?fg^^Y?`egY{">
                    <field name="NUM">10</field>
                  </block>
                </value>
              </block>
            </value>
            <next>
              <block type="variables_set" id="ni7#_bua^Hon3^a]Zi^+">
                <field name="VAR">tenhours</field>
                <value name="VALUE">
                  <block type="math_arithmetic" id="P^@M;h:C|[|HG|lU7K(G">
                    <field name="OP">DIVIDE</field>
                    <value name="A">
                      <block type="math_arithmetic" id="{XbmkQmIYPPoS:u6jvVH">
                        <field name="OP">MINUS</field>
                        <value name="A">
                          <block type="variables_get" id="6,yj=k]e3=o.=8Bl}i98">
                            <field name="VAR">fulltime</field>
                          </block>
                        </value>
                        <value name="B">
                          <block type="variables_get" id="]{/[/?)YbX4Hw_f%1mh.">
                            <field name="VAR">hours</field>
                          </block>
                        </value>
                      </block>
                    </value>
                    <value name="B">
                      <block type="math_number" id="|]*(]x1n3be?M0*Kz%Dj">
                        <field name="NUM">10</field>
                      </block>
                    </value>
                  </block>
                </value>
                <next>
                  <block type="variables_set" id="+y#Iif;}9dw6@1v6nE3F">
                    <field name="VAR">fullminutes</field>
                    <value name="VALUE">
                      <block type="kniwwelino_getTimeInt" id="KM;20(hl_FWy.,xMQJRG">
                        <field name="FORMAT">MINUTE</field>
                      </block>
                    </value>
                    <next>
                      <block type="variables_set" id="#|HlGU~3uJ?8/q~s^FW9">
                        <field name="VAR">minutes</field>
                        <value name="VALUE">
                          <block type="math_modulo" id="C7YL%-fv{xD%Q^ki{l~W">
                            <value name="DIVIDEND">
                              <block type="variables_get" id="Z,{IrsE@5+(`+rFc/n}6">
                                <field name="VAR">fullminutes</field>
                              </block>
                            </value>
                            <value name="DIVISOR">
                              <block type="math_number" id="Y2dXl}KF}oq5FAD(lhTl">
                                <field name="NUM">10</field>
                              </block>
                            </value>
                          </block>
                        </value>
                        <next>
                          <block type="variables_set" id="bT*qAgTykHbi6e*a2h4X">
                            <field name="VAR">tenminutes</field>
                            <value name="VALUE">
                              <block type="math_arithmetic" id="1~cGemVU);qG*0WuBc^J">
                                <field name="OP">DIVIDE</field>
                                <value name="A">
                                  <block type="math_arithmetic" id="[gU++I-N2sU0D)0ORu@s">
                                    <field name="OP">MINUS</field>
                                    <value name="A">
                                      <block type="variables_get" id="~07G4ZnG4js1A`56GgLs">
                                        <field name="VAR">fullminutes</field>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <block type="variables_get" id="-ea[M~DTt%_@.1vK~H~5">
                                        <field name="VAR">minutes</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="math_number" id="y3`yXVrh!zA`jHJppD1g">
                                    <field name="NUM">10</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </next>
      </block>
    </statement>
  </block>
  <block type="arduino_functions_loop" id="V*pfkkG8`?W.rRPEE!FG" x="41" y="288">
    <statement name="LOOP_FUNC">
      <block type="variables_set" id="]FK.VeKSUf+q8~z|flZT">
        <field name="VAR">buffer</field>
        <value name="VALUE">
          <block type="math_number" id=";uDWh6#cW[M?ctU}*O=E">
            <field name="NUM">0</field>
          </block>
        </value>
        <next>
          <block type="procedures_callnoreturn" id="ovfLMcXKh.Y/+E%sXYQb">
            <mutation name="get time"></mutation>
            <next>
              <block type="variables_set" id="qBhBKo~7NVG`@5`~O070">
                <field name="VAR">solution</field>
                <value name="VALUE">
                  <block type="variables_get" id="Z^b@0rrGKbLw1GNGx[g`">
                    <field name="VAR">tenhours</field>
                  </block>
                </value>
                <next>
                  <block type="procedures_callnoreturn" id="w)a+40ZT;484o/c|m-/?">
                    <mutation name="to binary"></mutation>
                    <next>
                      <block type="variables_set" id="fD1C)jzgc](TKcH;b~z9">
                        <field name="VAR">buffer</field>
                        <value name="VALUE">
                          <block type="math_number" id="FyQbd|q7Q{buSj:+TN1t">
                            <field name="NUM">2</field>
                          </block>
                        </value>
                        <next>
                          <block type="variables_set" id="%=E{2`]*UKll2?Y0K:{a">
                            <field name="VAR">solution</field>
                            <value name="VALUE">
                              <block type="variables_get" id="r#@Lh0EFr8jZ^R1,+q(/">
                                <field name="VAR">hours</field>
                              </block>
                            </value>
                            <next>
                              <block type="procedures_callnoreturn" id="SHhqm,3C@@3@HUQGf;oV">
                                <mutation name="to binary"></mutation>
                                <next>
                                  <block type="variables_set" id="H1Hb:IVRbrt!Q.2s!/G4">
                                    <field name="VAR">solution</field>
                                    <value name="VALUE">
                                      <block type="variables_get" id="Aysr6mT_A:68HxfDWWft">
                                        <field name="VAR">tenminutes</field>
                                      </block>
                                    </value>
                                    <next>
                                      <block type="procedures_callnoreturn" id="nU`m^hSAKj3}~/W,??c;">
                                        <mutation name="to binary"></mutation>
                                        <next>
                                          <block type="variables_set" id="mQQ1|_}ScJLi?4ad6GRS">
                                            <field name="VAR">solution</field>
                                            <value name="VALUE">
                                              <block type="variables_get" id="H7LUMek8!X6H|[/5.(]i">
                                                <field name="VAR">minutes</field>
                                              </block>
                                            </value>
                                            <next>
                                              <block type="procedures_callnoreturn" id="TS[~mXNF/qU~]A=%Z7|8">
                                                <mutation name="to binary"></mutation>
                                                <next>
                                                  <block type="kniwwelino_MATRIXwrite" id="Z)Ctv92PC_A}%E.]x6~?">
                                                    <field name="TYPE">SCROLL</field>
                                                    <value name="TEXT">
                                                      <shadow type="text" id="k-~R]x5i%nwQd!~;t,RU">
                                                        <field name="TEXT">Hello Kniwwelino</field>
                                                      </shadow>
                                                      <block type="text_join" id="VW.Ah?hSOhzga5E)2A/~">
                                                        <mutation items="3"></mutation>
                                                        <value name="ADD0">
                                                          <block type="variables_get" id="((a(|Wv;B(M|1-,g5;xb">
                                                            <field name="VAR">fulltime</field>
                                                          </block>
                                                        </value>
                                                        <value name="ADD1">
                                                          <block type="text" id="PgvBn1H^+NGC;(rki=[G">
                                                            <field name="TEXT">:</field>
                                                          </block>
                                                        </value>
                                                        <value name="ADD2">
                                                          <block type="variables_get" id="nmu,hZz-rHPHUq3:(FTP">
                                                            <field name="VAR">fullminutes</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                    <next>
                                                      <block type="kniwwelino_sleep" id="USI.bsv{_HjXI3|u6mee">
                                                        <value name="DELAY_TIME_MILI">
                                                          <shadow type="math_number" id="NHg_mbw|jS72WHo0P*i5">
                                                            <field name="NUM">200</field>
                                                          </shadow>
                                                        </value>
                                                      </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="ltqfT]vU=,]j))#XD@`h" x="690" y="303">
    <field name="NAME">to binary</field>
    <comment pinned="false" h="80" w="160">Describe the function...</comment>
    <statement name="STACK">
      <block type="variables_set" id="V_;UXlwbX{vqAK}M%HmN">
        <field name="VAR">i</field>
        <value name="VALUE">
          <block type="math_number" id="sMn:,wLfOO(?:O!W+2NJ">
            <field name="NUM">0</field>
          </block>
        </value>
        <next>
          <block type="controls_whileUntil" id=":Fe=wGg)M@4z1r[L=Up9">
            <field name="MODE">UNTIL</field>
            <value name="BOOL">
              <block type="logic_compare" id="eMuT9XkbHXqn_)^8gyne">
                <field name="OP">EQ</field>
                <value name="A">
                  <block type="variables_get" id="31=lcU=APP?PE?)9Zr+A">
                    <field name="VAR">solution</field>
                  </block>
                </value>
                <value name="B">
                  <block type="math_number" id=")uY-jqbF^Nja}vH)Yrkj">
                    <field name="NUM">0</field>
                  </block>
                </value>
              </block>
            </value>
            <statement name="DO">
              <block type="variables_set" id="CCR5S]DnrBOVU`b%ziUo">
                <field name="VAR">nextDigit</field>
                <value name="VALUE">
                  <block type="math_modulo" id="0gd%mldr[!1qgMRbOl~w">
                    <value name="DIVIDEND">
                      <block type="variables_get" id="xq3Y2eTL-IT}bA#:RZca">
                        <field name="VAR">solution</field>
                      </block>
                    </value>
                    <value name="DIVISOR">
                      <block type="math_number" id="Oqf?Wmv@sk4K=8({s#~0">
                        <field name="NUM">2</field>
                      </block>
                    </value>
                  </block>
                </value>
                <next>
                  <block type="variables_set" id="WAKt!qhJ3;U-`U8mVb(B">
                    <field name="VAR">solution</field>
                    <value name="VALUE">
                      <block type="math_arithmetic" id="Vsl)[_OxuO?_~8Auj-KQ">
                        <field name="OP">DIVIDE</field>
                        <value name="A">
                          <block type="variables_get" id="T{3^rs?/L!|,{_4N])o@">
                            <field name="VAR">solution</field>
                          </block>
                        </value>
                        <value name="B">
                          <block type="math_number" id="3.AM/)iJ~{UX.)~fix.!">
                            <field name="NUM">2</field>
                          </block>
                        </value>
                      </block>
                    </value>
                    <next>
                      <block type="controls_if" id="y070uN:f[pe(,f.VoYv0">
                        <mutation else="1"></mutation>
                        <value name="IF0">
                          <block type="variables_get" id="w9]raNMRf9c8NsqAazxU">
                            <field name="VAR">nextDigit</field>
                          </block>
                        </value>
                        <statement name="DO0">
                          <block type="kniwwelino_neopixelsetPixelColorFromString" id="YiKzzD^/R1hNFbJVs5N^">
                            <value name="PIXEL">
                              <shadow type="math_number" id="cdaP#`JDDka:DQlQ:YNS">
                                <field name="NUM">0</field>
                              </shadow>
                              <block type="variables_get" id="xo)YM/`1icT=g5a15+zf">
                                <field name="VAR">buffer</field>
                              </block>
                            </value>
                            <value name="COLOR">
                              <shadow type="kniwwelino_RGBselectColor" id="zx^/PQ,_044JPcR3L!}^">
                                <field name="COLOR">#00FF00</field>
                              </shadow>
                            </value>
                          </block>
                        </statement>
                        <statement name="ELSE">
                          <block type="kniwwelino_neopixelsetPixelColorFromString" id="_P0k+q+1rjEv2xj]kcs?">
                            <value name="PIXEL">
                              <shadow type="math_number" id="|gSud|f[gH(XkVZu#7Vy">
                                <field name="NUM">0</field>
                              </shadow>
                              <block type="variables_get" id="`0mdZ{#_lWG59-Y#)+I/">
                                <field name="VAR">buffer</field>
                              </block>
                            </value>
                            <value name="COLOR">
                              <shadow type="kniwwelino_RGBselectColor" id="`ACfl}9SJG_DGiLJ,SDh">
                                <field name="COLOR">#00FF00</field>
                              </shadow>
                              <block type="text" id="Z_J,Y6Tt11eqqlRa0N/7">
                                <field name="TEXT">0000FF</field>
                              </block>
                            </value>
                          </block>
                        </statement>
                        <next>
                          <block type="math_change" id="2pcwXA7|C99wJ2}+!L],">
                            <field name="VAR">i</field>
                            <value name="DELTA">
                              <block type="math_number" id="wMWx(}0w@[NC0[fNTiW4">
                                <field name="NUM">1</field>
                              </block>
                            </value>
                            <next>
                              <block type="math_change" id="[sBt#,GnxNe5S;4d=?gW">
                                <field name="VAR">buffer</field>
                                <value name="DELTA">
                                  <block type="math_number" id="{|I(@{[3(SRI,{|A4p*X">
                                    <field name="NUM">1</field>
                                  </block>
                                </value>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </statement>
            <next>
              <block type="controls_if" id=")!ovm79whx(US-i#1e!D">
                <value name="IF0">
                  <block type="logic_compare" id="lj8Ul]{BpcCXe;^@Bd5F">
                    <field name="OP">LT</field>
                    <value name="A">
                      <block type="variables_get" id="VX2guOizDV%EHV22{~o(">
                        <field name="VAR">i</field>
                      </block>
                    </value>
                    <value name="B">
                      <block type="math_number" id="S*O3`T4n+x^@f~G*Eco%">
                        <field name="NUM">4</field>
                      </block>
                    </value>
                  </block>
                </value>
                <statement name="DO0">
                  <block type="controls_for" id="7Bca9g9vYgyL#Yt5J*{J">
                    <field name="VAR">j</field>
                    <value name="FROM">
                      <block type="variables_get" id=")+9eRWM6zKix9PuJG?.m">
                        <field name="VAR">i</field>
                      </block>
                    </value>
                    <value name="TO">
                      <block type="math_number" id=",E_JH@xCeEID[:N5Zc_v">
                        <field name="NUM">3</field>
                      </block>
                    </value>
                    <value name="BY">
                      <block type="math_number" id="z}*,e?#y{hxrqom=QQf5">
                        <field name="NUM">1</field>
                      </block>
                    </value>
                    <statement name="DO">
                      <block type="kniwwelino_neopixelsetPixelColorFromString" id="L/@||Bq0.6XiHIh74}3c">
                        <value name="PIXEL">
                          <shadow type="math_number" id="|gSud|f[gH(XkVZu#7Vy">
                            <field name="NUM">0</field>
                          </shadow>
                          <block type="variables_get" id="^Q3_=}TdVBGXUP=Uq(np">
                            <field name="VAR">buffer</field>
                          </block>
                        </value>
                        <value name="COLOR">
                          <shadow type="kniwwelino_RGBselectColor" id="`ACfl}9SJG_DGiLJ,SDh">
                            <field name="COLOR">#00FF00</field>
                          </shadow>
                          <block type="text" id="oE@@)yazTU}?n4Q}LT;2">
                            <field name="TEXT">FF0000</field>
                          </block>
                        </value>
                        <next>
                          <block type="math_change" id="p:0b?jL;~O]cmB5#*Bf:">
                            <field name="VAR">buffer</field>
                            <value name="DELTA">
                              <block type="math_number" id="XN1bz+q?Xk:H4R9wruGX">
                                <field name="NUM">1</field>
                              </block>
                            </value>
                          </block>
                        </next>
                      </block>
                    </statement>
                  </block>
                </statement>
              </block>
            </next>
          </block>
        </next>
      </block>
    </statement>
  </block>
  <block type="kniwwelino_neopixelInit" id="Un?a/h9-0%|,ty=6m}8L" x="-59" y="785">
    <field name="SIZE">14</field>
    <field name="PIN">D5</field>
  </block>
</xml>

Credits

Tim

Tim

2 projects • 1 follower

Comments