loading

Under construction

Code in Step 6

https://www.youtube.com/watch?v=DPZ8sQ2YRM0

Step 1: The Case for the Clock

With some simple tools and a bit of skill, it's not hard to make a letter clock
I used the materials availible to me.

For the case I used a rough pine bar in which I sawed a few frames. These would make the four sides of the case, which were glued together and reinforced with a small piece of wood in the corners. Then the wood needs sanding and painting.

The letters are cut out of foil by a printer. The foil is at the back of the glass plate and is covered with a double layer pattern paper for better light distribution. The glass is fixated by silicone sealant.

Step 2: Neopixels

The Neopixels LEDs are arranged on a wooden plate.
In this you first drill 3 mm holes. At the front they are enlarged to letter size to 3/4 depth. After that the 3 mm at the back is increased to 10 mm, this is the size of a Neopixel. For some characters among others the W, the hole should be slightly adjusted.

I used plywood which quickly splintered, MDF may be better.

Step 3: Adjusting Front Text

The front plate is now in Dutch, but simply to convert in any language.

The NeoPixels leds are switched in succession here from 0-167. The numbering goes from the first row at the top left to the right and then to the second row right-to-left etc. Adjusting can be done according to your own needs. The number of NeoPixels is determined by the amount of characters. Less or more Neopixels can be adjusted in the following line

#define NUMPIXELS 168 // How many NeoPixels are attached to the Arduino?

168 is than another number. Numbering starts at 0. You can make any text. If you change the text then you will also have to adjust the corresponding words. The numbering remains the same.

As an example, DRIE of the minutes, is determined in the code

void zetmDrie () {

Led_Aan[56]=1, Led_Aan[57]=1, Led_Aan[58]=1, Led_Aan[59]=1 ; // min-drie

}

If you want to make the word Arduino then it goes like this:

void zetArduino () {

Led_Aan [38] = 1, Led_Aan [50] = 1, Led_Aan [56] = 1, Led_Aan [93] = 1;

Led_Aan [120] = 1, Led_Aan [135 = 1, Led_Aan [147] = 1; //Word-arduino

}

So you can make words between.

For clock words it is useful if they a contiguous word forms but it is not necessarily necessary. At the unused letters do not need Neonpixels. I have them all filled because there are still more possible than just the time displaying.

If you change the starting point or change the succession sequence the numbering should change accordingly.

Step 4: Full Rainbow Effect

The clock is now so programmed that there a number of times per second is counted how many neopixsels there are switched on.

The total spectrum is about the number of divided and then slightly shifted. As a result, each Neopixel a different color which changes continuously. Neopixel nr 1 and nr 167 follow each other on some color involves.

If you prefer less different colors at the same time, this is easy to adjust. The color shifts still over the entire spectrum but with a smaller part of it. Neopixel nr 1 and nr 167 no longer follow on each other some color involves.

The brightness can be set in the following line,

pixels.setBrightness(150);

A smaller number is less and a larger number more brightness.

Step 5: The Various Components

The following components I used

Arduino Pro Mini ATMEGA328 5V/16MHz

Clock Module DS3231

168 pieces Neopixels led's WS2812 LED Chip & Heatsink 5V 5050 RGB WS2811 IC Built-in

Foil letter stencil

DCF77 receiver

Step 6: Code for the Clock

Here is the code. She's not finished yet but the rainbow effect and the DCF77 receiver is ready.
I'm still working with a brightness control and power off when no one is present and at night.

<p>// =============================================================================================================================<br>/* 
This Arduino code controls the ATMEGA328 chip on the PCB board that controls the 168 NeoPixels LED of the Word Clock
Attached to this PCB are 
- RCT DS3231 ZS-042 clock module
- DCF77 module
The DCF77 module can be attached to adjust the time with German longwave time signal received by the module</p><p> Title ..: Jan's NeoPixel clock with Rainbow effect
 Author .: Jan
 Changes.: 
 */
// ===============================================================================================================================</p><p>//--------------------------------------------
// ARDUINO Includes defines and initialysations
//--------------------------------------------</p><p>#include <adafruit_neopixel.h>
#include <ds3231.h>
#include <wire.h>  
#include <rtclib.h>
#include "DCF77.h"
//#include "Time.h"</rtclib.h></wire.h></ds3231.h></adafruit_neopixel.h></p><p>//--------------------------------------------
// ARDUINO Definition
//--------------------------------------------</p><p>#define secondeflash                         // seconde wel of niet laten knipperen</p><p>#define DCF_PIN       2                      // Connection pin to DCF 77 device
#define DCF_INTERRUPT 0            // Interrupt number associated with pin 2
#define PIN           6                           // Which pin on the Arduino is connected to the NeoPixels?</p><p>#define NUMPIXELS  168                 // How many NeoPixels are attached to the Arduino?</p><p>// When we setup the NeoPixel library, we tell it how many pixels, and which pin to use to send signals.
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
// For a set of NeoPixels the first NeoPixel is 0, second is 1, all the way up to the count of pixels minus one.</p><p>//--------------------------------------------
// DS3231 CLOCK MODULE
//-------------------------------------------- </p><p>DS3231 clock;
RTCDateTime dt;
RTC_DS3231 RTC;</p><p>char time_s[9];
char date_s[11];</p><p>bool oldState = HIGH;  // voor switch
// boolean state; // Nodig voor 1 Hz puls</p><p>int Led_Aan[168];  // Tussen array
uint32_t FunkBlue  = pixels.Color(0, 0, 125);
uint32_t FunkGreen = pixels.Color(0, 125, 0);
uint32_t FunkRed   = pixels.Color(125, 0, 0);
uint32_t FunkBlack   = pixels.Color(0, 0, 0);
uint32_t FunkColor;
int initFunk = 1;</p><p>int uren    = 0 ;
int minuten = 0 ;
int DCFcheckuur = 04;   //eenmaal per dag om 04:10 tijd synchroniseren met DCF77 tijd
int DCFcheckmin = 10;   //in uur en minnuten</p><p>int newTime ;           //opslag van nieuwe seconde
int oldTime ;             //opslag van vorige seconde</p><p>byte knipper = 0 ;      // seconde bepalen</p><p>float j = 1;                 // led aan
int   d = 1;                 // d = j als integer
byte  k = 0;               // loop over het led array
byte  m = 0;              // nummer van de led
byte  e = 0;               // teller voor aantal leds dat aan is
byte  f = 0;                // f = alternatief led nr in de rij van het aantal dat aan is ipv het aantal leds 168</p><p>time_t time;
DCF77 DCF = DCF77(DCF_PIN,DCF_INTERRUPT);</p><p>//--------------------------------------------
//  *** begin void setup ***
//-------------------------------------------- </p><p>void setup() {</p><p>     Serial.begin(9600);</p><p>     pinMode(BUTTON_PIN, INPUT_PULLUP);</p><p>     pinMode(kPinLed, OUTPUT);</p><p>// Setup the LED strip  
     pixels.begin();                      // This initializes the NeoPixel library.
     pixels.setBrightness(150);  // Lower brightness 
     pixels.show();</p><p>// Initialize DS3231
     Serial.println("Initialize DS3231");
     clock.begin();
     delay(1000);</p><p>//          Set sketch compiling time
// clock.setDateTime(__DATE__, __TIME__);    // Deze regel zet de computertijd naar de DS3231, de tijd loop dan 6 sec achter
                                             // Na update nogmaals uitvoeren omdat anders bij openen van de seriele monitor de tijd weer wordt aangepast naar de laast ingelezen tijd</p><p>//           Manual (YYYY, MM, DD, HH, II, SS
// clock.setDateTime(2017, 01, 04, 19, 05, 10);    // Tijd handmatig zetten naar de DS3231, plus 10 sec om juiste tijd te krijgen</p><p>// Enable 1 Hz puls</p><p>// clock.enable32kHz(false);         // disable 32kHz
// clock.setOutput(DS3231_1HZ);      // Select output as rate to 1Hz
// clock.enableOutput(true);         // Start 1 Hz puls
// clock.enableOutput(false);        // Start 1 Hz puls</p><p>newTime= dt.second  ;  //opslag van nieuwe seconde
oldTime= dt.second  ;    //opslag van vorige seconde</p><p>theaterChaseRainbow(50);</p><p>// Call DCF77 routine
       DCF77Check();</p><p>}</p><p>//--------------------------------------------
//  *** einde void setup ***
//-------------------------------------------- </p><p>//--------------------------------------------
//  *** begin void loop ***
//-------------------------------------------- </p><p>void loop() {</p><p>                dt = clock.getDateTime();</p><p>//Call ledaanzeten, welke leds moeten worden aangezet
       ledaanzeten();</p><p>newTime= dt.second  ;</p><p>         if (newTime == oldTime) {    </p><p>//  Geen actie voor klok als er geen nieuwe seconde is , maar wel andere acties afwerken</p><p>             f=0;
             e=0;                                                    // teller voor aantal leds dat aan is</p><p>  }
     else {</p><p>             e = 0;
         for(int k = 0; k <(NUMPIXELS-1); k++){                      // loop over het led array 168 posities, maar 167 telt niet mee omdat 154 altijd aan is
            
            if (Led_Aan[k] == 1 ) {
              e=e+1;                                                 // tellen hoeveel leds aan zijn
            }
    }
        oldTime=newTime;                                             // oude tijd updaten met nieuwe seconde
  
        for(int k = 0; k <numpixels; k++){<="" p=""></numpixels;></p><p>         if (Led_Aan[k] == 1 ) {                                     // led die aan moet zijn ook aan zetten, dus ook 167
           f=f+1;
           m=k;                                                      // nummer van de led</p><p>                letterCycle(1);                                      // via letterCycle aanzetten
    }
     else{
 
      pixels.setPixelColor(k, pixels.Color(0,0,0));                  // led uit zetten
            pixels.show();</p><p>         }
       }
     }
     
//Call zeroleds, tussen array vullen met nullen
       zeroleds();</p><p>       if (dt.hour == DCFcheckuur  && dt.minute == DCFcheckmin) {
             // eenmaal per dag tijd synchroniseren met DCF77 tijd</p><p>// Call DCF77 routine
       DCF77Check();
       
}    
   }</p><p>//--------------------------------------------
//  *** einde void Loop ***
//--------------------------------------------</p><p>//--------------------------------------------
//  *** begin void zeroleds ***
//--------------------------------------------</p><p>void zeroleds() {
       //alle leds uitzetten  
                for(int k=0;k<numpixels;k++)  ="" tussen="" array="" vullen="" met="" nullen="" -=""> 0 tot 167 = 168 posities
                Led_Aan[k] = 0;                   //loop over het led array
}</numpixels;k++)></p><p>//--------------------------------------------
//  *** einde void zeroleds ***
//--------------------------------------------</p><p>//--------------------------------------------------------------
//  *** begin rainbow effect op de leds die aan zijn ***
//--------------------------------------------------------------</p><p>void letterCycle(uint8_t wait) {</p><p>        if ((m == 154 ) && (Led_Aan[167] == 1 )) {</p><p>                pixels.setPixelColor(154, 0, 0, 0);  // m = echte adres van de led 0-167</p><p>                pixels.show();
                delay(wait);
    }
        else {</p><p>                pixels.setPixelColor(m, Wheel(((f * 256 / e) + d) & 255));    // m = echte adres van de led 0-168
                                                                              // f = alternatief led nr in de rij van het aantal dat aan is ipv het aantal leds 168
                                  j=j+0.1;                                    // e = aantal leds dat aan is
                              if (j>256) {j=j-256;}                           // d = j als integer
                                  d=j;
    pixels.show();
    delay(wait);</p><p>     }
  }</p><p>//--------------------------------------------
//  *** einde rainbow effect ***
//--------------------------------------------</p><p>//--------------------------------------------
//  *** begin Wheel ***
//--------------------------------------------</p><p>// Input a value 0 to 255 to get a color value.
// The colours are a transition r - g - b - back to r.
uint32_t Wheel(byte WheelPos) {
  WheelPos = 255 - WheelPos;
  if(WheelPos < 85) {
    return pixels.Color(255 - WheelPos * 3, 0, WheelPos * 3);
  }
  if(WheelPos < 170) {
    WheelPos -= 85;
    return pixels.Color(0, WheelPos * 3, 255 - WheelPos * 3);
  }
  WheelPos -= 170;
  return pixels.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
}</p><p>//--------------------------------------------
//  *** einde Wheel ***
//--------------------------------------------</p><p>//Theatre-style crawling lights with rainbow effect
void theaterChaseRainbow(uint8_t wait) {
  for (int j=0; j < 256; j++) {     // cycle all 256 colors in the wheel
    for (int q=0; q < 3; q++) {
      for (int i=0; i < pixels.numPixels(); i=i+3) {
        pixels.setPixelColor(i+q, Wheel( (i+j) % 255));    //turn every third pixel on
      }
      pixels.show();</p><p>      delay(wait);</p><p>      for (int i=0; i < pixels.numPixels(); i=i+3) {
        pixels.setPixelColor(i+q, 0);        //turn every third pixel off
      }
    }
  }
}</p><p>//--------------------------------------------
//  *** begin void DCF77Check ***
//--------------------------------------------</p><p>//void DCF77Check(void)
void DCF77Check()</p><p>     {</p><p>       DCF.Start();                 // start the DCF-module</p><p>//       Serial.println("It will take at least 2 minutes until a first update can be processed.");</p><p>       zetFunk();                  //funk led op 1 in tussen array</p><p>      {
       if (initFunk == 1){ </p><p>       FunkColor = FunkBlue;       //zet kleur blauw funk ontvangen</p><p>      } else {</p><p>       FunkColor = FunkBlack;      // leds niet aanzetten
      }
     }
       aanFunk();                  //funk leds aanzetten</p><p>       
     { 
      
       for (int i = 0; i < 120; i++) {</p><p>       time_t DCFtime = DCF.getTime();   // Check if new DCF77 time is available</p><p>       if (DCFtime!=0) {
       Serial.println("Time is updated");</p><p>       RTC.adjust(DCFtime);
       setTime(DCFtime);</p><p>       delay(1000); </p><p>      {
       if (initFunk == 1){ </p><p>       FunkColor = FunkGreen;      // zet kleur groen funk OK</p><p>      } else {</p><p>       FunkColor = FunkBlack;      // leds niet aanzetten
      }
     }</p><p>       aanFunk();                  //funk leds aanzetten</p><p>       initFunk = 0;               //funk leds alleen aan bij opstart</p><p>       DCF.Stop();</p><p>       delay(10000);
       
       break;      
       
         } else {</p><p>       delay(5000);</p><p>        }
       }
      }</p><p>      {
       if (initFunk == 1){ </p><p>      FunkColor = FunkRed;        // zet kleur rood funk niet OK</p><p>      } else {</p><p>       FunkColor = FunkBlack;      // leds niet aanzetten
      }
     }
 
      aanFunk();                  //funk leds aanzetten</p><p>      initFunk = 0;               //funk leds alleen aan bij opstart</p><p>      DCF.Stop();</p><p>      delay(10000);      
    }</p><p>//--------------------------------------------
//  *** einde void DCF77Check ***
//--------------------------------------------</p><p>//--------------------------------------------
//  *** begin void aanFunk ***
//--------------------------------------------</p><p>void aanFunk()
     {   </p><p>       for(int k = 0; k <numpixels; k++){=""  ="" loop="" over="" het="" led="" array="" 168="" posities=""   =""  if="" (led_aan[k]="=" 1="" )="" {="" die="" aan="" moet="" zijn="" ook="" zetten,="" dus="" 167=""  pixels.setpixelcolor(k,="" funkcolor);="" zetten=""  pixels.show();="" this="" sends="" the="" updated="" pixel="" color="" to="" hardware.<="" p=""></numpixels;></p><p>     }
       else{
 
       pixels.setPixelColor(k, pixels.Color(0,0,0));                 // led uit zetten
       pixels.show();                                                // This sends the updated pixel color to the hardware.</p><p>     }}}</p><p>//--------------------------------------------
//  *** einde void aanFunk ***
//--------------------------------------------</p><p>//--------------------------------------------
//  *** begin void ledaanzeten ***
//-------------------------------------------- </p><p>void ledaanzeten() {
          //leds die moeten worden aangezet</p><p>#ifdef secondeflash</p><p>         knipper =  dt.second  ;
      if (knipper == 0) { knipper = 60 ;}</p><p>      if ( (knipper % 2) == 0) {        //  0 = even en 1 = oneven seconde voor linker en rechter seconde led te laten knipperen</p><p>        Led_Aan[167]=1; }               // links de even secondes</p><p>      else {</p><p>        Led_Aan[167]=0; }               // rechts de oneven secondes 167 = 0 en 154 = 1 </p><p>        Led_Aan[154]=1;                 // seconde led rechts default aanzetten en controlleren met led links of hij aan of uit moet zijn</p><p>#endif secondeflash</p><p>// tekst HET IS   </p><p>             { Led_Aan[0]=1,  Led_Aan[1]=1,  Led_Aan[2]=1,  Led_Aan[4]=1, Led_Aan[5]=1 ; }</p><p>  
// Minuten bepalen en aanzetten</p><p>          minuten =  dt.minute  ;</p><p>         if (minuten >= 0 && minuten < 10) {
          if(minuten == 0) {
            zetUur();
  } else if (minuten == 1) {
            zetmEen();
            zetOver();         
  } else if (minuten == 2) {
            zetmTwee();
            zetOver();
  } else if (minuten == 3) {
            zetmDrie();
            zetOver();
  } else if (minuten == 4) {
            zetmVier();
            zetOver();
  } else if (minuten == 5) {
            zetmVijf();
            zetOver();                        
  } else if (minuten == 6) {
            zetmZes();
            zetOver();
  } else if (minuten == 7) {
            zetmZeven();
            zetOver();
  } else if (minuten == 8) {
            zetmAcht();
            zetOver();            
  } else if (minuten == 9) {
            zetmNegen();
            zetOver();
  }
  } else if(minuten >= 10 && minuten < 20) {            
         if (minuten == 10) {
            zetmTien1();
            zetOver();
  } else if (minuten == 11) {
            zetmElf();
            zetOver();
  } else if (minuten == 12) {
            zetmTwaalf();
            zetOver();
  } else if (minuten == 13) {
            zetmDertien();
            zetOver();
  } else if (minuten == 14) {
            zetmVeertien();
            zetOver();
  } else if (minuten == 15) {
            zetmKwart();
            zetOver();
  } else if (minuten == 16) {
            zetmZes();
            zetmTien2();
            zetOver();
  } else if (minuten == 17) {
            zetmZeven();
            zetmTien2();
            zetOver();
  } else if (minuten == 18) {
            zetmAcht();
            zetmTien2();
            zetOver();
  } else if (minuten == 19) {
            zetmNegen();
            zetmTien1();
            zetOver();
  }
  } else if(minuten >= 20 && minuten < 30) {             
         if (minuten == 20) {
            zetmTwintig();
            zetOver();
  } else if (minuten == 21) {
            zetmEen();
            zetmEn1();
            zetmTwintig();            
            zetOver();
  } else if (minuten == 22) {
            zetmTwee();
            zetmEn1();
            zetmTwintig();
            zetOver();
  } else if (minuten == 23) {
            zetmDrie();
            zetmEn2();
            zetmTwintig();
            zetOver();
  } else if (minuten == 24) {
            zetmVier();
            zetmEn1();
            zetmTwintig();
            zetOver();
  } else if (minuten == 25) {
            zetmVijf();
            zetVoor();
            zetHalf();
  } else if (minuten == 26) {
            zetmVier();
            zetVoor();
            zetHalf();
  } else if (minuten == 27) {
            zetmDrie();
            zetVoor();
            zetHalf();
  } else if (minuten == 28) {
            zetmTwee();
            zetVoor();
            zetHalf();
  } else if (minuten == 29) {
            zetmEen();
            zetVoor();
            zetHalf();
  }
  } else if(minuten >= 30 && minuten < 40) {
         if (minuten == 30) {
            zetHalf();            
  } else if (minuten == 31) {
            zetmEen();
            zetOver();
            zetHalf();         
  } else if (minuten == 32) {
            zetmTwee();
            zetOver();
            zetHalf();
  } else if (minuten == 33) {
            zetmDrie();
            zetOver();
            zetHalf();
  } else if (minuten == 34) {
            zetmVier();
            zetOver();
            zetHalf();
  } else if (minuten == 35) {
            zetmVijf();
            zetOver();
            zetHalf();                        
  } else if (minuten == 36) {
            zetmVier();
            zetmEn1();
            zetmTwintig();
            zetVoor();
  } else if (minuten == 37) {
            zetmDrie();
            zetmEn2();
            zetmTwintig();
            zetVoor();
  } else if (minuten == 38) {
            zetmTwee();
            zetmEn1();
            zetmTwintig();
            zetVoor();
  } else if (minuten == 39) {
            zetmEen();
            zetmEn1();
            zetmTwintig();
            zetVoor();
  }
  } else if(minuten >= 40 && minuten < 50) { 
         if (minuten == 40) {
            zetmTwintig();
            zetVoor();
  } else if (minuten == 41) {
            zetmNegen();
            zetmTien1();
            zetVoor();
  } else if (minuten == 42) {
            zetmAcht();
            zetmTien2();
            zetVoor();
  } else if (minuten == 43) {
            zetmZeven();
            zetmTien1();
            zetVoor();
  } else if (minuten == 44) {
            zetmZes();
            zetmTien2();
            zetVoor();
  } else if (minuten == 45) {
            zetmKwart();
            zetVoor();
  } else if (minuten == 46) {
            zetmVeertien();
            zetVoor();
  } else if (minuten == 47) {
            zetmDertien();
            zetVoor();
  } else if (minuten == 48) {
            zetmTwaalf();
            zetVoor();
  } else if (minuten == 49) {
            zetmElf();
            zetVoor();
  }
  } else if(minuten >= 50 && minuten < 60) {  
         if (minuten == 50) {
            zetmTien1();
            zetVoor();
  } else if (minuten == 51) {
            zetmNegen();
            zetVoor();
  } else if (minuten == 52) {
            zetmAcht();
            zetVoor();
  } else if (minuten == 53) {
            zetmZeven();
            zetVoor();
  } else if (minuten == 54) {
            zetmZes();
            zetVoor();
  } else if (minuten == 55) {
            zetmVijf();
            zetVoor();
  } else if (minuten == 56) {
            zetmVier();
            zetVoor();
  } else if (minuten == 57) {
            zetmDrie();
            zetVoor();
  } else if (minuten == 58) {
            zetmTwee();
            zetVoor();
  } else if (minuten == 59) {
            zetmEen();
            zetVoor();
  } 
  }</p><p>// Uren bepalen en aanzetten
                           
          uren =  dt.hour  ;
            if(uren >= 12) {
            uren -= 12;
 }
    if(minuten >= 25) {
     uren++;
   }</p><p>  if(uren == 12) {
    uren = 0;
  }</p><p>  switch(uren) {
    case 0:
      zetuTwaalf();
      break;
   case 1:
      zetuEen();
      break;
    case 2:
      zetuTwee();
      break;
    case 3:
      zetuDrie();
      break;      
    case 4:
      zetuVier();
      break;
    case 5:
      zetuVijf();
      break;
    case 6:
      zetuZes();
      break;
    case 7:
      zetuZeven();
      break;
    case 8:
      zetuAcht();
      break;
    case 9:
      zetuNegen();
      break;
    case 10:
      zetuTien();
      break;
    case 11:
      zetuElf();
      break;
  }</p><p>}</p><p>//--------------------------------------------
//  *** einde void ledaanzeten ***
//-------------------------------------------- </p><p>//--------------------------------------------
// Leds die de woorden maken
//--------------------------------------------</p><p>void zetmEen() {</p><p>           Led_Aan[7]=1, Led_Aan[8]=1, Led_Aan[9]=1 ;                                     // min - een</p><p>}
void zetmTwee() {</p><p>           Led_Aan[27]=1, Led_Aan[26]=1, Led_Aan[25]=1, Led_Aan[24]=1 ;                   // min - twee</p><p>}
void zetmDrie() {</p><p>           Led_Aan[56]=1, Led_Aan[57]=1, Led_Aan[58]=1, Led_Aan[59]=1 ;                   // min - drie</p><p>}</p><p>void zetmVier() {</p><p>           Led_Aan[31]=1, Led_Aan[32]=1, Led_Aan[33]=1, Led_Aan[34]=1 ;                   // min - vier</p><p>}</p><p>void zetmVijf() {</p><p>           Led_Aan[10]=1, Led_Aan[11]=1, Led_Aan[12]=1, Led_Aan[13]=1 ;                   // min - vijf</p><p>}</p><p>void zetmZes() {</p><p>           Led_Aan[28]=1, Led_Aan[29]=1, Led_Aan[30]=1 ;                                  // min - zes</p><p>}</p><p>void zetmZeven() {</p><p>           Led_Aan[19]=1, Led_Aan[20]=1, Led_Aan[21]=1, Led_Aan[22]=1, Led_Aan[23]=1 ;    // min - zeven</p><p>}</p><p>void zetmAcht() {</p><p>           Led_Aan[42]=1, Led_Aan[43]=1, Led_Aan[44]=1, Led_Aan[45]=1 ;                   // min - acht</p><p>}</p><p>void zetmNegen() {</p><p>           Led_Aan[14]=1, Led_Aan[15]=1, Led_Aan[16]=1, Led_Aan[17]=1, Led_Aan[18]=1 ;    // min - negen</p><p>}</p><p>void zetmTien1() {</p><p>           Led_Aan[49]=1, Led_Aan[48]=1, Led_Aan[47]=1, Led_Aan[46]=1 ;                   // min - tien (1)</p><p>}</p><p>void zetmTien2() {</p><p>           Led_Aan[64]=1, Led_Aan[65]=1, Led_Aan[66]=1, Led_Aan[67]=1 ;                   // min - tien (2)</p><p>}</p><p>void zetmElf() {</p><p>           Led_Aan[55]=1, Led_Aan[54]=1, Led_Aan[53]=1 ;                                  // min - elf</p><p>}</p><p>void zetmTwaalf() {</p><p>           Led_Aan[35]=1, Led_Aan[36]=1, Led_Aan[37]=1, Led_Aan[38]=1, Led_Aan[39]=1, Led_Aan[40]=1 ;      // min - twaalf</p><p>}</p><p>void zetmDertien() {</p><p>           Led_Aan[52]=1, Led_Aan[51]=1, Led_Aan[50]=1, Led_Aan[49]=1, Led_Aan[48]=1, Led_Aan[47]=1, Led_Aan[46]=1 ;                   // min - dertien</p><p>}</p><p>void zetmVeertien() {</p><p>           Led_Aan[60]=1, Led_Aan[61]=1, Led_Aan[62]=1, Led_Aan[63]=1, Led_Aan[64]=1, Led_Aan[65]=1, Led_Aan[66]=1, Led_Aan[67]=1 ;                   // min - veertien</p><p>}</p><p>void zetmKwart() {</p><p>           Led_Aan[79]=1, Led_Aan[80]=1, Led_Aan[81]=1, Led_Aan[82]=1, Led_Aan[83]=1 ;                   // min - vijftien = kwart</p><p>}</p><p>void zetmTwintig() {</p><p>           Led_Aan[71]=1, Led_Aan[72]=1, Led_Aan[73]=1, Led_Aan[74]=1, Led_Aan[75]=1, Led_Aan[76]=1, Led_Aan[77]=1 ;        // min - twintig over</p><p>}</p><p>//--------------------------------------------
// uren
//--------------------------------------------</p><p>void zetuEen() {</p><p>           Led_Aan[115]=1, Led_Aan[116]=1, Led_Aan[117]=1 ;                                                   // uren - een</p><p>}</p><p>void zetuTwee() {</p><p>           Led_Aan[108]=1, Led_Aan[109]=1, Led_Aan[110]=1, Led_Aan[111]=1 ;                                   // uren - twee</p><p>}</p><p>void zetuDrie() {</p><p>           Led_Aan[141]=1, Led_Aan[142]=1, Led_Aan[143]=1, Led_Aan[144]=1 ;                                   // uren - drie</p><p>}</p><p>void zetuVier() {</p><p>           Led_Aan[119]=1, Led_Aan[120]=1, Led_Aan[121]=1, Led_Aan[122]=1 ;                                   // uren - vier</p><p>}</p><p>void zetuVijf() {</p><p>           Led_Aan[126]=1, Led_Aan[127]=1, Led_Aan[128]=1, Led_Aan[129]=1 ;                                   // uren - vijf</p><p>}</p><p>void zetuZes() {</p><p>           Led_Aan[104]=1, Led_Aan[105]=1, Led_Aan[106]=1 ;                                                   // uren - zes </p><p>}</p><p>void zetuZeven() {</p><p>           Led_Aan[135]=1, Led_Aan[136]=1, Led_Aan[137]=1, Led_Aan[138]=1, Led_Aan[139]=1 ;                   // uren - zeven</p><p>}</p><p>void zetuAcht() {</p><p>           Led_Aan[150]=1, Led_Aan[151]=1, Led_Aan[152]=1, Led_Aan[153]=1 ;                                   // uren - acht</p><p>}</p><p>void zetuNegen() {</p><p>           Led_Aan[98]=1, Led_Aan[99]=1, Led_Aan[100]=1, Led_Aan[101]=1, Led_Aan[102]=1 ;                     // uren - negen</p><p>}</p><p>void zetuTien() {</p><p>           Led_Aan[131]=1, Led_Aan[132]=1, Led_Aan[133]=1, Led_Aan[134]=1 ;                                   // uren - tien
 
}</p><p>void zetuElf() {</p><p>           Led_Aan[112]=1, Led_Aan[113]=1, Led_Aan[114]=1 ;                                                   // uren - elf</p><p>}</p><p>void zetuTwaalf() {</p><p>           Led_Aan[161]=1, Led_Aan[162]=1, Led_Aan[163]=1, Led_Aan[164]=1, Led_Aan[165]=1, Led_Aan[166]=1 ;                   // uren - twaalf</p><p>}</p><p>//--------------------------------------------
// Zet de rest
//--------------------------------------------</p><p>void zetUur() {</p><p>           Led_Aan[156]=1, Led_Aan[157]=1, Led_Aan[158]=1 ;              // uur</p><p>}</p><p>void zetmEn1() {</p><p>           Led_Aan[46]=1, Led_Aan[47]=1 ;                                 // en (1)</p><p>}</p><p>void zetmEn2() {</p><p>           Led_Aan[68]=1, Led_Aan[69]=1 ;                                 // en (2)</p><p>}</p><p>void zetVoor() {</p><p>           Led_Aan[89]=1, Led_Aan[90]=1, Led_Aan[91]=1, Led_Aan[92]=1 ;   // voor</p><p>}</p><p>void zetOver() {</p><p>           Led_Aan[85]=1, Led_Aan[86]=1, Led_Aan[87]=1, Led_Aan[88]=1 ;   // over</p><p>}</p><p>void zetHalf() {</p><p>           Led_Aan[94]=1, Led_Aan[95]=1, Led_Aan[96]=1, Led_Aan[97]=1 ;   // half</p><p>}</p><p>void zetFunk() {</p><p>           Led_Aan[53]=1, Led_Aan[93]=1, Led_Aan[117]=1, Led_Aan[140]=1 ;   // funk</p><p>}</p><p>//--------------------------------------------
//  *** begin void getDCFTime ***
//--------------------------------------------</p><p>unsigned long getDCFTime()
{ 
  time_t DCFtime = DCF.getTime();
  // Indicator that a time check is done
  if (DCFtime!=0) {
    Serial.print("X");  
  }
  return DCFtime;
}</p><p>//--------------------------------------------
//  *** einde void getDCFTime ***
//--------------------------------------------</p><p>//--------------------------------------------
//  *** begin void printDigits ***
//--------------------------------------------</p><p>void printDigits(int digits){
  // utility function for digital clock display: prints preceding colon and leading 0
  Serial.print(":");
  if(digits < 10)
    Serial.print('0');
  Serial.print(digits);
}</p><p>//--------------------------------------------
//  *** einde void printDigits ***
//--------------------------------------------</p><p>//--------------------------------------------
//  *** begin void digitalClockDisplay ***
//--------------------------------------------</p><p>void digitalClockDisplay(){
  // digital clock display of the time
  Serial.println("");
  Serial.print(hour());
  printDigits(minute());
  printDigits(second());
  Serial.print(" ");
  Serial.print(day());
  Serial.print(" ");
  Serial.print(month());
  Serial.print(" ");
  Serial.print(year());
  Serial.println();
}</p><p>//--------------------------------------------
//  *** einde void digitalClockDisplay ***
//--------------------------------------------</p><p>//--------------------------------------------
//  *** einde code ***
//--------------------------------------------</p>

Step 7: The Hardware Description

Under construction

Step 8: The Software Description

Under construction

<p>Nice. Very detailed code. I appreciate that. It makes modifying it much easier.</p>

About This Instructable

451views

6favorites

License:

More by Jan5412:Rainbow Word Clock with a full rainbow effect.  
Add instructable to: