Bangun Jam Kata Italia dengan Arduino Nano, NeoPixel, LCD, dan RTC
Komponen dan perlengkapan
Arduino Nano R3
×
1
Strip NeoPixel
144
×
1
Layar LCD Standar Adafruit - 16x2 Putih pada Biru
dengan modul I2C
×
1
Jam Real-Time (RTC)
×
1
Tombol Tekan SparkFun 12mm
×
4
Resistor 10k ohm
×
3
Resistor 475 ohm
×
1
1N4007 – Diod Tegangan Tinggi, Arus Tinggi
×
3
Konverter DC DC Adjustable Step Down
×
1
Bingkai Dinding RIBBA (Ikea)
×
1
Tutup Kotak Gewiss 150 x 110
×
1
Strip aluminium 230 mm x 10 mm x 1mm
×
1
Tentang proyek ini
Kesukaanku terhadap jam tangan Arduino, membawaku untuk membuat “Jam Kata”, karena saya tinggal di Italia, saya berbahasa Italia. Untuk pembuatan proyek ini, saya terinspirasi oleh tutorial “Jam Kata Javelin”, saya membuat beberapa perubahan kecil ... dan inilah untukmu “Jam Kata Italia”!
Selain “memberitahu jam” dalam bahasa Italia, saya ingin menambahkan ulang tahun keluargaku (termasuk kucing). Untuk pembuatan “bingkai” saya menggunakan yang sudah dibuat oleh IKEA, dan untuk perubahan internal saya menggunakan materi yang ada di rumah:
Untuk pembuatan layar akan ditampilkan pola yang digambar dengan Inkscape.
Panel saya berukuran 12 x 12 huruf dengan jejak 200 mm. Karena saya tidak memiliki printer 3D, saya membuat grid dengan strip aluminium, dan telah mengisolasi kontak LED dengan spons perekat, ini juga berfungsi untuk mengisolasi cahaya.
Rangkaian Elektronik
Untuk menjaga waktu, saya menggunakan RTC.
Untuk dapat menyesuaikan waktu, saya menambahkan tombol (P1, P2, P3) dan layar 16 x 2.(Lihat juga proyek “Clock Set Date Time”). Seperti yang terlihat dari diagram penyaluran, tombol terhubung ke Arduino melalui rangkaian pull-down.
Karena layar hanya berfungsi untuk menyesuaikan waktu, saya mengganti jumper dengan tombol, dengan demikian, lampu hanya menyala saat digunakan. Diod D1 berfungsi sebagai perlindungan polaritas terbalik.
Diod D2 berfungsi untuk tidak menyediakan daya ke strip neopixel, saat, untuk alasan apa pun, kita harus mengubah sketsa Arduino (terlalu banyak arus dapat merusaknya). Diod D3 berfungsi untuk menurunkan tegangan ke 5 volt, tegangan pada Neopixel.
Saya melampirkan diagram rangkaian, skema Fritzing, dan tata letak PCB.
Matrix
Untuk membuat matrix saya menghubungkan berbagai strip seperti gambar. Berkelok-klok dari kiri atas ke bawah.
Pustaka Arduino
RTC
LiquidCrystal_I2C
Adafruit_NeoPixel
Penjelasan Kode
Kode dibagi menjadi 5 bagian utama:
“DisplayDateTime”: menampilkan tanggal dan waktu pada layar lcd
“HourClock”: menampilkan jam pada panel
“MinuteClock”: menampilkan menit pada panel
“Auguri”: Selamat ulang tahun
“Void paintWord (arrWord int [], uint32_t intColor)” adalah inti kode untuk menyala neopixel, “arrWord int []” adalah LED yang harus menyala, “uint32_t intColor” adalah warnanya
Untuk mendapatkan jam yang lebih akurat, saya menambahkan angka 1, 2, 3, 4 yang sesuai dengan menit progresif.
Contoh:“SONO LE ORE DIECI E VENTI 4”berarti 10:24 (10:20 + 00:04), “SONO LE DIECI MENO QUINDICI 2” berarti 09:47 (09:45 + 00:02)
Rangkaian
Buka bingkai dan bersihkan kaca dengan baik
Masukkan cetakan di Acetate
Masukkan kertas cetak
Masukkan grid
Masukkan panel dengan LED
Tempelkan selembar plywood, sedikit 'lebih besar dari kotak kontrol
Kunci dengan baut self-tapping kotak kontrol
Perhatikan sangat baik penyelarasan kedua cetakan
Lokasi
Letakkan di ruang tamu lalu dia akan terlihat bagus.
Kode
Italian WordClock
Italian WordClockArduino
/* :Project: WordClock :Author: Tiziano Bianchettin :Date: 25/09/2016 :Revision: 1 :License: Public Domain thanks to: https://www.instructables.com/id/Javelins-Word-Clock/ https://arduinoenonsolo.blogspot.it/2012/12/orologio-con-arduino-e-il-ds1307.html https://www.mauroalfieri.it/ https://www.danielealberti.it/ https://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); ... This file has been truncated, please download it to see its full contents.