Arduino Project Hub
Project tutorial

Italian Word Clock © GPL3+

Clock that speaks in Italian.

  • 2,242 views
  • 2 comments
  • 9 respects

Components and supplies

About this project

My passion for Arduino watches, led me to make a "Word Clock", since I live in Italy, I did speak in Italian. For the realization of the project, I was inspired by a tutorial "Word Clock Javelin", I made a few small changes ... and here for you "Word Clock of Italy"!

In addition to "tell the hours" in Italian, I wanted to add the birthdays of my family (including the cat). For the construction of the "framework" I used one already made by IKEA, and internal changes I used the material I had at home:

For the realization of the screen will be shown the pattern drawn with Inkscape.

My panel measures 12 x 12 letters with a footprint of 200 mm. Since I do not have a 3D printer, I made the grid with aluminum strips, and have isolated the contact of the LED with adhesive sponge, this also served to isolate the light.

Electronic circuit

To keep time, I used a RTC.

To be able adjust the time, I added buttons (P1, P2, P3) and a 16 x 2 display.(See also the project "Clock Set Date Time "). As seen from the wiring diagram, the buttons are connected to the Arduino via a pull-down circuit.

Since the display only serves to adjust the time, I replaced the jumper with a button, by doing so, it illuminates only to its use. The diode D1 serves as reverse polarity protection.

The diode D2 serves to not feed the neopixel strip, when, for whatever reason, we have to change the sketch Arduino (too much current could damage it). The diode D3 serves to bring at 5 volts, the voltage at Neopixel.

I am attaching the circuit diagram, the Fritzing scheme, the PCB layout.

Matrix

To realize the matrix I connected the various strips as the picture. Zigzagging from top left to descend.

Arduino Libreries

Explanation of the code

The code is divided into 5 main parts:

  • "DisplayDateTime": displays the date and time in the lcd display
  • "HourClock": displays hours in the panel
  • "MinuteClock": displays the minutes in the panel
  • "Auguri": Happy birthday
  • "Void paintWord (arrWord int [], uint32_t intColor)" is the heart of the code to turn on the neopixel, "arrWord int []" are the LEDs should light, "uint32_t intColor" is their color

To get a more accurate clock, I added the numbers 1, 2, 3, 4 corresponding to the progressive minutes.

Example:“SONO LE ORE DIECI E VENTI 4”means 10:24 (10:20 + 00:04), “SONO LE DIECI MENO QUINDICI 2” means 09:47 (09:45 + 00:02)

Assembly

  • Open the frame and clean the glass well
  • Insert printing in Acetate
  • Insert the print paper
  • Insert the grid
  • Insert the panel with the LEDs
  • Paste a piece of plywood, a little 'bigger than the control box
  • Secure with self-tapping screws the control box

Pay close attention to the alignment of the two prints

Location

Put in the living room ago her look good.

Custom parts and enclosures

Screen
wordklock_aWvuaZRw4N.svg

Schematics

electric schematic
Wordclock fnz4riitfv
Fritzing schematic
wordklock_JBoZPYrsYr.fzz

Code

Italian WordClockArduino
/*
:Project: WordClock
:Author: Tiziano Bianchettin
:Date: 25/09/2016
:Revision: 1
:License: Public Domain
thanks to:
  http://www.instructables.com/id/Javelins-Word-Clock/
  http://arduinoenonsolo.blogspot.it/2012/12/orologio-con-arduino-e-il-ds1307.html
  http://www.mauroalfieri.it/
  http://www.danielealberti.it/
  http://www.maffucci.it/
  My electronics laboratory professor "Perito Carli"  
*/
//************libraries**************//
#include <Wire.h>
#include <RTClib.h>
#include <LiquidCrystal_I2C.h>
#include <Adafruit_NeoPixel.h>

//***********neopixel****************//
#define PIN            9 // pin neopixel
#define NUM_LEDS 144 // 12 x 12
#define GIORNO 255 // full on
#define SERA 25 // a tenth on
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LEDS, PIN, NEO_GRB + NEO_KHZ800); // 144 led, pin 9
int intBrightness;

//****************COLORS***********//
uint32_t Red = strip.Color(255, 0, 0); 
uint32_t Green = strip.Color( 0, 255, 0);
uint32_t Blue = strip.Color( 0, 0, 255);
uint32_t White = strip.Color( 255, 255, 255);
uint32_t Yellow = strip.Color( 255, 255, 0);
uint32_t Purple = strip.Color( 60, 0, 255);
uint32_t Off = strip.Color( 0, 0, 0);


LiquidCrystal_I2C lcd(0x27,16,2); // Display  I2C 16 x 2
RTC_DS1307 RTC;
int P1=6; // Button SET MENU'
int P2=7; // Button +
int P3=8; // Button -
int oraagg;
int minagg;
int annoagg;
int meseagg;
int dayagg;
int menu =0;
int ora;


//********Presentation*********//
int  txtSONO[] = {1,2,3,4,6,7,9,10,11,-1};

//********Hours*********//
int  txtUNA[] = {20,21,22,-1};
int  txtDUE[] = {17,18,19,-1};
int  txtTRE[] = {57,58,59,-1};
int  txtQUATTRO[] = {96,97,98,99,100,101,102,-1};
int  txtCINQUE[] = {30,31,32,33,34,35,-1};
int  txtSEI[] = {103,104,105,-1};
int  txtSETTE[] = {48,49,50,51,52,-1};
int  txtOTTO[] = {72,73,74,75,-1};
int  txtNOVE[] = {60,61,62,63,-1};
int  txtDIECI[] = {12,13,14,15,16,-1};
int  txtUNDICI[] = {84,85,86,87,88,89,-1};
int  txtDODOCI[] = {90,91,92,93,94,95,-1};

//********Happy birthday*********//
int  txtAUGURI[] = {24,25,26,27,28,29,-1};
int  txtSIMONE[] = {36,37,38,39,40,41,-1};
int  txtJACOPO[] = {42,43,44,45,46,47,-1};
int  txtMINU[] = {53,54,55,56,-1};
int  txtTIZIANO[] = {65,66,67,68,69,70,71,-1};
int  txtMARILENA[] = {76,77,78,79,80,81,82,83,-1};

//********Minutes*********//
int  txtE[] = {107,-1};
int  txtMENO[] = {116,117,118,119,-1};
int  txtMUNO[] = {5,-1};
int  txtMDUE[] = {64,-1};
int  txtMTRE[] = {106,-1};
int  txtMQUATTRO[] = {125,-1};
int  txtMCINQUE[] = {132,133,134,135,136,137,-1};
int  txtMDIECI[] = {120,121,122,123,124,-1};
int  txtQUINDICI[] = {108,109,110,111,112,113,114,115,-1};
int  txtVENTI[] = {139,140,141,142,143,-1};
int  txtTRENTA[] = {126,127,128,129,130,131,-1};

void setup()
{

  strip.begin();
  strip.show();
  lcd.begin();
  lcd.backlight();
  lcd.clear();

  pinMode(P1,INPUT);
  pinMode(P2,INPUT);
  pinMode(P3,INPUT);

  Serial.begin(9600);
  Wire.begin();
  RTC.begin();

  if (! RTC.isrunning()) {
    Serial.println("RTC is NOT running!");
    // Set the date and time at compile time
    RTC.adjust(DateTime(__DATE__, __TIME__));
  }
  // RTC.adjust(DateTime(__DATE__, __TIME__)); //removing "//" to adjust the time
    // The default display shows the date and time
  int menu=0;
}
 
void loop()
{ 

// check if you press the SET button and increase the menu index
  if(digitalRead(P1))
  {
   menu=menu+1;
  }
// in which subroutine should we go?
  if (menu==0)
    {
     DisplayDateTime(); // void DisplayDateTime
     DateTime now = RTC.now();
     if((now.hour() >= 19) || (now.hour() < 7 )){ // adjust brightness day - night
      intBrightness =  SERA;
      }
      else{
      intBrightness =  GIORNO;
      }
     strip.setBrightness(intBrightness);
     strip.show();
     int timeMin = now.minute();
     int modMin = timeMin % 5; // https://www.arduino.cc/en/Reference/Modulo
     if ( modMin == 0){ // every minute the LEDs change color and lights up the corresponding number
        paintWord(txtSONO, White);
       paintWord(txtMQUATTRO, OFF);
        }
     else if ( modMin == 1){
          paintWord(txtSONO, Yellow);
          paintWord(txtMUNO, Red);
        }
     else if ( modMin == 2){
          paintWord(txtSONO, Green);
          paintWord(txtMUNO, Off);
          paintWord(txtMDUE, Blue);
        }
     else if ( modMin == 3){
          paintWord(txtSONO, Blue);
          paintWord(txtMDUE, Off);
          paintWord(txtMTRE, Green);
        }
     else if ( modMin == 4){
          paintWord(txtSONO, Red);
          paintWord(txtMTRE, Off);
          paintWord(txtMQUATTRO, Yellow);
        }
    
     HourClock(); //void HourClock
     MinuteClock(); // void MinuteClock
     Auguri(); // void Auguri
     
    
     strip.show();
    }
  if (menu==1)
    {
    DisplaySetHour();
    }
  if (menu==2)
    {
    DisplaySetMinute();
    }
  if (menu==3)
    {
    DisplaySetYear();
    }
  if (menu==4)
    {
    DisplaySetMonth();
    }
  if (menu==5)
    {
    DisplaySetDay();
    }
  if (menu==6)
    {
    StoreAgg(); 
    delay(500);
    menu=0;
    }
    delay(100);
}
void showStrip() {
 #ifdef ADAFRUIT_NEOPIXEL_H 
   // NeoPixel
   strip.show();
 #endif
 #ifndef ADAFRUIT_NEOPIXEL_H
   // FastLED
   FastLED.show();
 #endif
}

void setPixel(int Pixel, byte red, byte green, byte blue) {
 #ifdef ADAFRUIT_NEOPIXEL_H 
   // NeoPixel
   strip.setPixelColor(Pixel, strip.Color(red, green, blue));
 #endif
 #ifndef ADAFRUIT_NEOPIXEL_H 
   // FastLED
   leds[Pixel].r = red;
   leds[Pixel].g = green;
   leds[Pixel].b = blue;
 #endif
}

void setAll(byte red, byte green, byte blue) {
  for(int i = 0; i < NUM_LEDS; i++ ) {
    setPixel(i, red, green, blue); 
  }
  showStrip();
}
void Auguri(){
    DateTime now = RTC.now();
    if (now.month() == 11 && now.day() == 6){ //Jacopo
        paintWord(txtAUGURI, Purple);
        paintWord(txtJACOPO, Purple);
        paintWord(txtSIMONE, Off);
        paintWord(txtMINU, Off);
        paintWord(txtTIZIANO, Off);
        paintWord(txtMARILENA, Off);
    }
    else if (now.month() == 4 && now.day() == 25){ //Simone
        paintWord(txtAUGURI, Purple);
        paintWord(txtJACOPO, Off);
        paintWord(txtSIMONE, Purple);
        paintWord(txtMINU, Off);
        paintWord(txtTIZIANO, Off);
        paintWord(txtMARILENA, Off);
    }
    else if (now.month() == 6 && now.day() == 1){ //Minù
        paintWord(txtAUGURI, Purple);
        paintWord(txtJACOPO, Off);
        paintWord(txtSIMONE, Off);
        paintWord(txtMINU, Purple);
        paintWord(txtTIZIANO, Off);
        paintWord(txtMARILENA, Off);
    }
    else if (now.month() == 4 && now.day() == 24){ //Tiziano
        paintWord(txtAUGURI, Purple);
        paintWord(txtJACOPO, Off);
        paintWord(txtSIMONE, Off);
        paintWord(txtMINU, Off);
        paintWord(txtTIZIANO, Purple);
        paintWord(txtMARILENA, Off);
    }
    else if (now.month() == 6 && now.day() == 22){ //Marilena
        paintWord(txtAUGURI, Purple);
        paintWord(txtJACOPO, Off);
        paintWord(txtSIMONE, Off);
        paintWord(txtMINU, Off);
        paintWord(txtTIZIANO, Off);
        paintWord(txtMARILENA, Purple);
    }
    else{
        paintWord(txtAUGURI, Off);
        paintWord(txtJACOPO, Off);
        paintWord(txtSIMONE, Off);
        paintWord(txtMINU, Off);
        paintWord(txtTIZIANO, Off);
        paintWord(txtMARILENA, Off);
    }
}
void DisplayDateTime ()
{
// We show the current date and time
  DateTime now = RTC.now();

  lcd.setCursor(0, 1);
  lcd.print("Ora:");
  if (now.hour()<=9)
  {
    lcd.print("0");
  }
  lcd.print(now.hour(), DEC);
  oraagg=now.hour();
  lcd.print(":");
  if (now.minute()<=9)
  {
    lcd.print("0");
  }
  lcd.print(now.minute(), DEC);
  minagg=now.minute();
  lcd.print(":");
  if (now.second()<=9)
  {
    lcd.print("0");
  }
  lcd.print(now.second(), DEC);

  lcd.setCursor(0, 0);
  lcd.print("Data: ");
  if (now.day()<=9)
  {
    lcd.print("0");
  }
  lcd.print(now.day(), DEC);
  dayagg=now.day();
  lcd.print("/");
  if (now.month()<=9)
  {
    lcd.print("0");
  }
  lcd.print(now.month(), DEC);
  meseagg=now.month();
  lcd.print("/");
  lcd.print(now.year(), DEC);
  annoagg=now.year();
}

void DisplaySetHour()
{
// time setting
  lcd.clear();
  DateTime now = RTC.now();
  if(digitalRead(P2)==HIGH)
  {
    if(oraagg==23)
    {
      oraagg=0;
    }
    else
    {
      oraagg=oraagg+1;
    }
  }
   if(digitalRead(P3)==HIGH)
  {
    if(oraagg==0)
    {
      oraagg=23;
    }
    else
    {
      oraagg=oraagg-1;
    }
  }
  lcd.setCursor(0,0);
  lcd.print("Imposta Ora:");
  lcd.setCursor(0,1);
  lcd.print(oraagg,DEC);
  delay(200);
}

void DisplaySetMinute()
{
// Setting the minutes
  lcd.clear();
  if(digitalRead(P2)==HIGH)
  {
    if (minagg==59)
    {
      minagg=0;
    }
    else
    {
      minagg=minagg+1;
    }
  }
   if(digitalRead(P3)==HIGH)
  {
    if (minagg==0)
    {
      minagg=59;
    }
    else
    {
      minagg=minagg-1;
    }
  }
  lcd.setCursor(0,0);
  lcd.print("Imposta Minuti:");
  lcd.setCursor(0,1);
  lcd.print(minagg,DEC);
  delay(200);
}
  
void DisplaySetYear()
{
// setting the year
  lcd.clear();
  if(digitalRead(P2)==HIGH)
  {    
    annoagg=annoagg+1;
  }
   if(digitalRead(P3)==HIGH)
  {
    annoagg=annoagg-1;
  }
  lcd.setCursor(0,0);
  lcd.print("Imposta Anno:");
  lcd.setCursor(0,1);
  lcd.print(annoagg,DEC);
  delay(200);
}

void DisplaySetMonth()
{
// Setting the month
  lcd.clear();
  if(digitalRead(P2)==HIGH)
  {
    if (meseagg==12)
    {
      meseagg=1;
    }
    else
    {
      meseagg=meseagg+1;
    }
  }
   if(digitalRead(P3)==HIGH)
  {
    if (meseagg==1)
    {
      meseagg=12;
    }
    else
    {
      meseagg=meseagg-1;
    }
  }
  lcd.setCursor(0,0);
  lcd.print("Imposta Mese:");
  lcd.setCursor(0,1);
  lcd.print(meseagg,DEC);
  delay(200);
}

void DisplaySetDay()
{
// Setting the day
  lcd.clear();
  if(digitalRead(P2)==HIGH)
  {
    if (dayagg==31)
    {
      dayagg=1;
    }
    else
    {
      dayagg=dayagg+1;
    }
  }
   if(digitalRead(P3)==HIGH)
  {
    if (dayagg==1)
    {
      dayagg=31;
    }
    else
    {
      dayagg=dayagg-1;
    }
  }
  lcd.setCursor(0,0);
  lcd.print("Imposta Giorno:");
  lcd.setCursor(0,1);
  lcd.print(dayagg,DEC);
  delay(200);
}

void StoreAgg()
{
// Variable saving
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print("SALVATAGGIO IN");
  lcd.setCursor(0,1);
  lcd.print("CORSO");
  RTC.adjust(DateTime(annoagg,meseagg,dayagg,oraagg,minagg,0));
  delay(200);
}
void HourClock()
{
  DateTime now = RTC.now();
  int timeMin = now.minute();
  int modMin = timeMin % 5;  // https://www.arduino.cc/en/Reference/Modulo
  int ora = now.hour() ;
  if ( timeMin >= 40){ // from the 40 minutes, add 1 to "hour"
    ora  = ora+1 ;
  }
 switch (ora ) { 
    case 0:
    case 12: 
    case 24:
        paintWord(txtUNDICI, Off);
            strip.show();
        if ( modMin == 0){
            paintWord(txtDODOCI, White);
            strip.show();
        }
        else if ( modMin == 1){
            paintWord(txtDODOCI, Yellow);
            strip.show();
        }
        else if ( modMin == 2){
            paintWord(txtDODOCI, Green);
            strip.show();
        }
        else if ( modMin == 3){
            paintWord(txtDODOCI, Blue);
            strip.show();
        }
        else if ( modMin == 4){
            paintWord(txtDODOCI, Red);
            strip.show();
        }
        
break;
    case 1:
    case 13:
        paintWord(txtDODOCI, Off);
            strip.show();
        
        if ( modMin == 0){
            paintWord(txtUNA, White);
            strip.show();
        }
        else if ( modMin == 1){
            paintWord(txtUNA, Yellow);
            strip.show();
        }
        else if ( modMin == 2){
            paintWord(txtUNA, Green);
            strip.show();
        }
        else if ( modMin == 3){
            paintWord(txtUNA, Blue);
            strip.show();
        }
        else if ( modMin == 4){
            paintWord(txtUNA, Red);
            strip.show();
        }
        
       
break;
    case 2:
    case 14:
        paintWord(txtUNA, Off);
            strip.show();
        
        if ( modMin == 0){
            paintWord(txtDUE, White);
            strip.show();
        }
        else if ( modMin == 1){
            paintWord(txtDUE, Yellow);
            strip.show();
        }
        else if ( modMin == 2){
            paintWord(txtDUE, Green);
            strip.show();
        }
        else if ( modMin == 3){
            paintWord(txtDUE, Blue);
            strip.show();
        }
        else if ( modMin == 4){
            paintWord(txtDUE, Red);
            strip.show();
        }
break;
    case 3:
    case 15:
        
        paintWord(txtDUE, Off);
            strip.show();
        
        if ( modMin == 0){
            paintWord(txtTRE, White);
            strip.show();
        }
        else if ( modMin == 1){
            paintWord(txtTRE, Yellow);
            strip.show();
        }
        else if ( modMin == 2){
            paintWord(txtTRE, Green);
            strip.show();
        }
        else if ( modMin == 3){
            paintWord(txtTRE, Blue);
            strip.show();
        }
        else if ( modMin == 4){
            paintWord(txtTRE, Red);
            strip.show();
        }
        
break;
    case 4:
    case 16:
       
        paintWord(txtTRE, Off);
            strip.show();
        
        if ( modMin == 0){
            paintWord(txtQUATTRO, White);
            strip.show();
        }
        else if ( modMin == 1){
            paintWord(txtQUATTRO, Yellow);
            strip.show();
        }
        else if ( modMin == 2){
            paintWord(txtQUATTRO, Green);
            strip.show();
        }
        else if ( modMin == 3){
            paintWord(txtQUATTRO, Blue);
            strip.show();
        }
        else if ( modMin == 4){
            paintWord(txtQUATTRO, Red);
            strip.show();
        }
        
break;
    case 5:
    case 17:
       
        paintWord(txtQUATTRO, Off);
            strip.show();
        
        if ( modMin == 0){
            paintWord(txtCINQUE, White);
            strip.show();
        }
        else if ( modMin == 1){
            paintWord(txtCINQUE, Yellow);
            strip.show();
        }
        else if ( modMin == 2){
            paintWord(txtCINQUE, Green);
            strip.show();
        }
        else if ( modMin == 3){
            paintWord(txtCINQUE, Blue);
            strip.show();
        }
        else if ( modMin == 4){
            paintWord(txtCINQUE, Red);
            strip.show();
        }
       
break;
    case 6:
    case 18:
        
        paintWord(txtCINQUE, Off);
            strip.show();
        
        if ( modMin == 0){
            paintWord(txtSEI, White);
            strip.show();
        }
        else if ( modMin == 1){
            paintWord(txtSEI, Yellow);
            strip.show();
        }
        else if ( modMin == 2){
            paintWord(txtSEI, Green);
            strip.show();
        }
        else if ( modMin == 3){
            paintWord(txtSEI, Blue);
            strip.show();
        }
        else if ( modMin == 4){
            paintWord(txtSEI, Red);
            strip.show();
        }
        
break;
    case 7:
    case 19:
       
        paintWord(txtSEI, Off);
            strip.show();
        
        if ( modMin == 0){
            paintWord(txtSETTE, White);
            strip.show();
        }
        else if ( modMin == 1){
            paintWord(txtSETTE, Yellow);
            strip.show();
        }
        else if ( modMin == 2){
            paintWord(txtSETTE, Green);
            strip.show();
        }
        else if ( modMin == 3){
            paintWord(txtSETTE, Blue);
            strip.show();
        }
        else if ( modMin == 4){
            paintWord(txtSETTE, Red);
            strip.show();
        }
       
break;
    case 8:
    case 20:
        
        paintWord(txtSETTE, Off);
            strip.show();
        
        if ( modMin == 0){
            paintWord(txtOTTO, White);
            strip.show();
        }
        else if ( modMin == 1){
            paintWord(txtOTTO, Yellow);
            strip.show();
        }
        else if ( modMin == 2){
            paintWord(txtOTTO, Green);
            strip.show();
        }
        else if ( modMin == 3){
            paintWord(txtOTTO, Blue);
            strip.show();
        }
        else if ( modMin == 4){
            paintWord(txtOTTO, Red);
            strip.show();
        }
       
break;
    case 9:
    case 21:
       
        paintWord(txtOTTO, Off);
            strip.show();
        
        if ( modMin == 0){
            paintWord(txtNOVE, White);
            strip.show();
        }
        else if ( modMin == 1){
            paintWord(txtNOVE, Yellow);
            strip.show();
        }
        else if ( modMin == 2){
            paintWord(txtNOVE, Green);
            strip.show();
        }
        else if ( modMin == 3){
            paintWord(txtNOVE, Blue);
            strip.show();
        }
        else if ( modMin == 4){
            paintWord(txtNOVE, Red);
            strip.show();
        }
        
break;
    case 10:
    case 22:
  
        paintWord(txtNOVE, Off);
            strip.show();
        
        if ( modMin == 0){
            paintWord(txtDIECI, White);
            strip.show();
        }
        else if ( modMin == 1){
            paintWord(txtDIECI, Yellow);
            strip.show();
        }
        else if ( modMin == 2){
            paintWord(txtDIECI, Green);
            strip.show();
        }
        else if ( modMin == 3){
            paintWord(txtDIECI, Blue);
            strip.show();
        }
        else if ( modMin == 4){
            paintWord(txtDIECI, Red);
            strip.show();
        }
        
break;
    case 11:
    case 23:
       
        paintWord(txtDIECI, Off);
            strip.show();
        
        if ( modMin == 0){
            paintWord(txtUNDICI, White);
            strip.show();
        }
        else if ( modMin == 1){
            paintWord(txtUNDICI, Yellow);
            strip.show();
        }
        else if ( modMin == 2){
            paintWord(txtUNDICI, Green);
            strip.show();
        }
        else if ( modMin == 3){
            paintWord(txtUNDICI, Blue);
            strip.show();
        }
        else if ( modMin == 4){
            paintWord(txtUNDICI, Red);
            strip.show();
        }
break;
    }
}
void MinuteClock()
{
  DateTime now = RTC.now();
  int timeMin = now.minute();
  int modMin = timeMin % 5; // https://www.arduino.cc/en/Reference/Modulo
  switch (now.minute()) { 
    case 5:
    case 6:
    case 7:
    case 8:
    case 9:

        if ( modMin == 0){
            paintWord(txtE, White);
            paintWord(txtMCINQUE, White);
            strip.show();
        }
        else if ( modMin == 1){
            paintWord(txtE, Yellow);
            paintWord(txtMCINQUE, Yellow);
            strip.show();
        }
        else if ( modMin == 2){
            paintWord(txtE, Green);
            paintWord(txtMCINQUE, Green);
            strip.show();
        }
        else if ( modMin == 3){
            paintWord(txtE, Blue);
            paintWord(txtMCINQUE, Blue);
            strip.show();
        }
        else if ( modMin == 4){
            paintWord(txtE, Red);
            paintWord(txtMCINQUE, Red);
            strip.show();
        }
break;


    case 10:
    case 11:
    case 12:
    case 13:
    case 14:
        paintWord(txtMCINQUE, Off);
        strip.show();
        if ( modMin == 0){
            paintWord(txtE, White);
            paintWord(txtMDIECI, White);
            strip.show();
        }
        else if ( modMin == 1){
            paintWord(txtE, Yellow);
            paintWord(txtMDIECI, Yellow);
            strip.show();
        }
        else if ( modMin == 2){
            paintWord(txtE, Green);
            paintWord(txtMDIECI, Green);
            strip.show();
        }
        else if ( modMin == 3){
            paintWord(txtE, Blue);
            paintWord(txtMDIECI, Blue);
            strip.show();
        }
        else if ( modMin == 4){
            paintWord(txtE, Red);
            paintWord(txtMDIECI, Red);
            strip.show();
        }
        
break;

    case 15:
    case 16:
    case 17:
    case 18:
    case 19:
        paintWord(txtMDIECI, Off);
            strip.show();      
        if ( modMin == 0){
            paintWord(txtE, White);
            paintWord(txtQUINDICI, White);
            strip.show();
        }
        else if ( modMin == 1){
            paintWord(txtE, Yellow);
            paintWord(txtQUINDICI, Yellow);
            strip.show();
        }
        else if ( modMin == 2){
            paintWord(txtE, Green);
            paintWord(txtQUINDICI, Green);
            strip.show();
        }
        else if ( modMin == 3){
            paintWord(txtE, Blue);
            paintWord(txtQUINDICI, Blue);
            strip.show();
        }
        else if ( modMin == 4){
            paintWord(txtE, Red);
            paintWord(txtQUINDICI, Red);
            strip.show();
        }
break;


    case 20:
    case 21:
    case 22:
    case 23:
    case 24:
        paintWord(txtQUINDICI, Off);
            strip.show();      
        if ( modMin == 0){
            paintWord(txtE, White);
            paintWord(txtVENTI, White);
            strip.show();
        }
        else if ( modMin == 1){
            paintWord(txtE, Yellow);
            paintWord(txtVENTI, Yellow);
            strip.show();
        }
        else if ( modMin == 2){
            paintWord(txtE, Green);
            paintWord(txtVENTI, Green);
            strip.show();
        }
        else if ( modMin == 3){
            paintWord(txtE, Blue);
            paintWord(txtVENTI, Blue);
            strip.show();
        }
        else if ( modMin == 4){
            paintWord(txtE, Red);
            paintWord(txtVENTI, Red);
            strip.show();
        }
break;

    case 25:
    case 26:
    case 27:
    case 28:
    case 29:
             
        if ( modMin == 0){
            paintWord(txtE, White);
            paintWord(txtVENTI, White);
            paintWord(txtMCINQUE, White);
            strip.show();
        }
        else if ( modMin == 1){
            paintWord(txtE, Yellow);
            paintWord(txtVENTI, Yellow);
            paintWord(txtMCINQUE, Yellow);
            strip.show();
        }
        else if ( modMin == 2){
            paintWord(txtE, Green);
            paintWord(txtVENTI, Green);
            paintWord(txtMCINQUE, Green);
            strip.show();
        }
        else if ( modMin == 3){
            paintWord(txtE, Blue);
            paintWord(txtVENTI, Blue);
            paintWord(txtMCINQUE, Blue);
            strip.show();
        }
         else if ( modMin == 4){
            paintWord(txtE, Red);
            paintWord(txtVENTI, Red);
            paintWord(txtMCINQUE, Red);
            strip.show();
        }
break;

    case 30:
    case 31:
    case 32:
    case 33:
    case 34:
        paintWord(txtVENTI, Off); 
        paintWord(txtMCINQUE, Off);   
            strip.show(); 
        if ( modMin == 0){
            paintWord(txtE, White);
            paintWord(txtTRENTA, White);
            strip.show();
        }
        else if ( modMin == 1){
            paintWord(txtE, Yellow);
            paintWord(txtTRENTA, Yellow);
            strip.show();
        }
        else if ( modMin == 2){
            paintWord(txtE, Green);
            paintWord(txtTRENTA, Green);
            strip.show();
        }
        else if ( modMin == 3){
            paintWord(txtE, Blue);
            paintWord(txtTRENTA, Blue);
            strip.show();
        }
         else if ( modMin == 4){
            paintWord(txtE, Red);
            paintWord(txtTRENTA, Red);
            strip.show();
        }
break;

    case 35:
    case 36:
    case 37:
    case 38:
    case 39:
        if ( modMin == 0){
            paintWord(txtE, White);
            paintWord(txtTRENTA, White);
            paintWord(txtMCINQUE, White);
            strip.show();
        }
        else if ( modMin == 1){
            paintWord(txtE, Yellow);
            paintWord(txtTRENTA, Yellow);
            paintWord(txtMCINQUE, Yellow);
            strip.show();
        }
        else if ( modMin == 2){
            paintWord(txtE, Green);
            paintWord(txtTRENTA, Green);
            paintWord(txtMCINQUE, Green);
            strip.show();
        }
        else if ( modMin == 3){
            paintWord(txtE, Blue);
            paintWord(txtTRENTA, Blue);
            paintWord(txtMCINQUE, Blue);
            strip.show();
        }
        else if ( modMin == 4){
            paintWord(txtE, Red);
            paintWord(txtTRENTA, Red);
            paintWord(txtMCINQUE, Red);
            strip.show();
        }
break;

    case 40:
    case 41:
    case 42:
    case 43:
    case 44:
        paintWord(txtE, Off);
        paintWord(txtTRENTA, Off);
        paintWord(txtMCINQUE, Off);    
            strip.show();  
        if ( modMin == 0){
            paintWord(txtMENO, White);  //from the 40 minutes, add 1 to "now" and Printing "meno"
            paintWord(txtVENTI, White);
            strip.show();
        }
        else if ( modMin == 1){
            paintWord(txtMENO, Yellow);
            paintWord(txtVENTI, Yellow);
            strip.show();
        }
        else if ( modMin == 2){
            paintWord(txtMENO, Green);
            paintWord(txtVENTI, Green);
            strip.show();
        }
        else if ( modMin == 3){
            paintWord(txtMENO, Blue);
            paintWord(txtVENTI, Blue);
            strip.show();
        }
        else if ( modMin == 4){
            paintWord(txtMENO, Red);
            paintWord(txtVENTI, Red);
            strip.show();
        }
break;

    case 45:
    case 46:
    case 47:
    case 48:
    case 49:
        paintWord(txtVENTI, Off);
            strip.show();      
        if ( modMin == 0){
            paintWord(txtMENO, White);
            paintWord(txtQUINDICI, White);
            strip.show();
        }
        else if ( modMin == 1){
            paintWord(txtMENO, Yellow);
            paintWord(txtQUINDICI, Yellow);
            strip.show();
        }
        else if ( modMin == 2){
            paintWord(txtMENO, Green);
            paintWord(txtQUINDICI, Green);
            strip.show();
        }
        else if ( modMin == 3){
            paintWord(txtMENO, Blue);
            paintWord(txtQUINDICI, Blue);
            strip.show();
        }
        else if ( modMin == 4){
            paintWord(txtMENO, Red);
            paintWord(txtQUINDICI, Red);
            strip.show();
        }
break;

    case 50:
    case 51:
    case 52:
    case 53:
    case 54:
        paintWord(txtQUINDICI, Off);
            strip.show();      
        if ( modMin == 0){
            paintWord(txtMENO, White);
            paintWord(txtMDIECI, White);
            strip.show();
        }
        else if ( modMin == 1){
            paintWord(txtMENO, Yellow);
            paintWord(txtMDIECI, Yellow);
            strip.show();
        }
        else if ( modMin == 2){
            paintWord(txtMENO, Green);
            paintWord(txtMDIECI, Green);
            strip.show();
        }
        else if ( modMin == 3){
            paintWord(txtMENO, Blue);
            paintWord(txtMDIECI, Blue);
            strip.show();
        }
        else if ( modMin == 4){
            paintWord(txtMENO, Red);
            paintWord(txtMDIECI, Red);
            strip.show();
        }
break;

    case 55:
    case 56:
    case 57:
    case 58:
    case 59:
      
        paintWord(txtMDIECI, Off);
            strip.show();      
        if ( modMin == 0){
            paintWord(txtMENO, White);
            paintWord(txtMCINQUE, White);
            strip.show();
        }
        else if ( modMin == 1){
            paintWord(txtMENO, Yellow);
            paintWord(txtMCINQUE, Yellow);
            strip.show();
        }
        else if ( modMin == 2){
            paintWord(txtMENO, Green);
            paintWord(txtMCINQUE, Green);
            strip.show();
        }
        else if ( modMin == 3){
            paintWord(txtMENO, Blue);
            paintWord(txtMCINQUE, Blue);
            strip.show();
        }
        else if ( modMin == 4){
            paintWord(txtMENO, Red);
            paintWord(txtMCINQUE, Red);
            strip.show();
        }
break;

    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
        paintWord(txtMENO, Off);      
        paintWord(txtMCINQUE, Off);
            strip.show();
break;
    }
}
void paintWord(int arrWord[], uint32_t intColor){
    for(int i = 0; i < strip.numPixels() + 1; i++){
        if(arrWord[i] == -1){
            strip.show();
        break;
        }
        else{
            strip.setPixelColor(arrWord[i],intColor);
        }
    }
}
Italian WordClock

Comments

Similar projects you might like

An Arduino-Powered Easter Egg Printer

Project showcase by ELEKS

  • 1,187 views
  • 0 comments
  • 19 respects

Automatic Fear 1.0

Project tutorial by Alexis Santiago Allende

  • 279 views
  • 1 comment
  • 5 respects

Arduino Addons : Battery Level Indicator

Project showcase by Arduino World

  • 1,710 views
  • 6 comments
  • 21 respects

End-Effector and Control Logic for Robot

Project showcase by Team PowerBerry

  • 3,026 views
  • 2 comments
  • 23 respects

Pi Time - A Fabric Arduino Clock

Project showcase by Team Chris And Jessica Hogan

  • 2,938 views
  • 2 comments
  • 14 respects

Arduino Toolboxes : Analog Level Visualizer

Project showcase by Arduino World

  • 4,141 views
  • 14 comments
  • 20 respects
Add projectSign up / Login