Animated Word Clock
Build your own word clock with an animated display. Includes a stylish 3D-printed case and five animation patterns.
Components and supplies
1
Arduino Nano R3
Tools and machines
1
3D Printer (generic)
Project description
Code
Animated Word Clock Arduino Code
arduino
1 2/* 3D Printed Word Clock 3 * by TechKiwiGadgets May 2019 4 * 5 * 6 * 7 * V4 - Final production version all modes working including LDR 8 * V5 - Adjusted delays after time completed 9 * V6 - Adjusted dimmer circuit (still need to blank off Nano LED glare 10 * V7 - Optimise dimmer at maximum darkness 11 * V9 - Added two more animations 12 * V10 - Limit the dimmer to min of 20 13*/ 14 15 16 17// Hardware setup 18// RTC Module 19// RTC SDA - A4 20// RTC SCL - A5 21 22// WS2812 LED Data Bus D11 used to control LED chain 23 24//Libraries 25 26 27#include <TimeLib.h> 28#include <Wire.h> 29#include <DS1307RTC.h> // a basic DS1307 library that returns time as a time_t 30 31// WS2182 LED Driver Library Setup 32#include "FastLED.h" 33// How many leds in your strip? 34#define NUM_LEDS 110 // Note: First LED is address 0 in a 11x10 matrix 35#define DATA_PIN 11 // Note: D11 used to control LED chain 36 37// Define the array of leds 38CRGB leds[NUM_LEDS]; // Defines individual addreaasable LED in the LED chain 39 40// Define Led Matrix 41// Array with following locations: { 0 , 1 , 2 3 } 42// Array with following Structure: {Value , X , Y, LED Colour # } 43byte ledmatrix[110][4]; 44 45// Populate the LED Matrix with X,Y Coordinates 46 47byte tempctr = 0; // Points to each LED location 48 49byte animation = 0; // Used to cycle through animation effects 50byte color = 0 ; // Used to cycle through color effects 51 52 53//Constants 54 55int t1 = 200; // Duration in microseconds that LEDs on during callibration 56 57 58 59 60// LED Colour control variables A,B,C leds[33] = CRGB( A, B, C); 61int A = 0; // LED vaiable for CRGB position 1 62int B = 255; // LED vaiable for CRGB position 2 63int C = 0; // LED vaiable for CRGB position 3 64int testLED = 0;// Used to test the colour of LED Arrays 65 66 67//Variables 68 69int cyclerefresh = 600; // used to count cycles before refreshing the display 70 71int T1 = 0;// LED Powerup Sequence delay 72 73// Dimmer is the delay in microseconds impacting LED brightness 74int Dimmer = 400; 75float smoothedDim = 400; 76const float alpha = 0.6; 77// LDR is across A7 and has an input range of 6K to 24k from light to dark respectively 78int LDR; // The variable dimmer is the duration in Millseconds that each LED is left on before being turned off in the LED array 79 80 81void setup() { 82 Serial.begin(9600); // Setupserial interface for test data outputs 83 84 85 86 87 88// WS2182 LED Driver Setup 89 LEDS.addLeds<WS2812,DATA_PIN,GRB>(leds,NUM_LEDS); // Default if RGB for this however may vary dependent on LED manufacturer 90 LEDS.setBrightness(100); //Set brightness of LEDs here 91 // limit my draw to 1A at 5v of power draw 92// FastLED.setMaxPowerInVoltsAndMilliamps(5,200); 93 FastLED.setDither(0); // Turns off Auto Dithering function to remove flicker 94 95 //Initialize RTC 96 97 //while (!Serial) ; // wait until Arduino Serial Monitor opens 98 delay(200); 99 setSyncProvider(RTC.get); // the function to get the time from the RTC 100 setSyncInterval(10); // sync the time every 60 seconds (1 minutes) 101 if(timeStatus()!= timeSet){ 102 Serial.println("Unable to sync with the RTC"); 103 RTC.set(1408278800); // set the RTC to Aug 25 2014 9:00 am 104 setTime(1408278800); 105 } 106 else{ 107 Serial.println("RTC has set the system time"); 108 } 109 110 111// Pre-load the Matrix with colour and coordinate values 112 113 for (byte x = 0; x < 11; x++) { 114 115 for (byte y = 0; y < 10; y++) { 116 117 tempctr = ((x * 10)+(9 - y)); // Calculate the LED value in the 11 x 10 Matrix 118 119 // Poke the coordinates into the array for each LED in the Matrix 120 121 ledmatrix[tempctr][0] = 0; 122 ledmatrix[tempctr][1] = x; 123 ledmatrix[tempctr][2] = y; 124 ledmatrix[tempctr][3] = 0; // Load Green as first colour 125 126/* 127 Serial.print(tempctr); 128 Serial.print(" x: "); 129 Serial.print(x); 130 Serial.print(" y: "); 131 Serial.println(y); 132*/ 133 134 135 } 136 137 } 138 139//delay(2000); 140 141 // initialize the Button I/O pins as Digital Inputs for Increment and Decrement time for manual adjustment of time 142 // Setup Input Mode and Select Push Buttons 143 pinMode(3,INPUT_PULLUP); // Animation Button 144 pinMode(4,INPUT_PULLUP); // Time Set Button + Animation means increment time, Time Set Button + Colour means decrement time 145 pinMode(5,INPUT_PULLUP); // Colour Button 146 147 148 ledtest(); // startup led test 149 150 151 152 153} 154 155 156void loop() { 157 158cyclerefresh++; // Increment refresh counter 159 160 161// ****** Adjust Brightness of the LEDs using the LDR on A7 ****** 162// AnalogRead of A7 yeilds 220 = Dark, 600 = Bright 163// firstly use smooting algorythm to aoiv fluctuations due to sudden changes of light 164 165 smoothedDim = (alpha * smoothedDim) + ( (1 - alpha) * analogRead(7)); 166 167// Translate 380 into range of 100 using map(value, fromLow, fromHigh, toLow, toHigh) 168 169// Dimmer = abs(map(smoothedDim, 220, 420, 1, 100)); 170 171 Dimmer = map(smoothedDim, 240, 420, 20, 100);// Changed min value to 4 172 if(Dimmer < 20) { 173 Dimmer = 20; 174 } 175 176 177 178 LEDS.setBrightness(Dimmer); //Set brightness of LEDs here 179 180// Read the current date and time from the RTC 181 182 if ((timeStatus() == timeSet)&&(cyclerefresh >5)) { 183 184 cyclerefresh = 0; // Reset refresh counter 185 186 UpdateArray(); // Update Array with time 187 // Choose the display algorythm 188 189 if (animation == 0 ){ // Display animation option 1 standard Word Clock Display 190 RainbowDisplay(); 191 } else 192 if (animation == 1 ){ // Display animation option 2 Matrix effect 193 Matrixeffect(); 194 } else 195 if (animation == 2 ){ // Display animation option 3 Typing effect 196 TypeDisplay(); 197 } else 198 if (animation == 3 ){ // Display animation option 4 rainbow effect 199 UpdateDisplay(); 200 } else 201 if (animation == 4 ){ // Display animation option 4 rainbow effect 202 WipeDisplay(); 203 } else 204 if (animation == 5 ){ // Display animation option 4 rainbow effect 205 CircleDisplay(); 206 } else 207 if (animation == 6 ){ // Display animation option 4 rainbow effect 208 RainDisplay(); 209 } 210 211 212 } 213 214 215 216//delay(400); 217// Serial.println(analogRead(7)); 218// Serial.println(smoothedDim); 219 Serial.println(Dimmer); 220 // Serial.println(analogRead(7)); // 220 = Dark, 600 = Bright 221 222 223 224 animationbutton(); // Animation Button Pushed 225 colorbuttonpushed(); // Color Button Pushed 226 incrementpushed(); //Increment Time Button Pushed 227 decrementpushed(); //Decrement Time Button Pushed 228 229 230 231} 232 233 234 235void animationbutton() { 236 // Animation Button Pushed 237 if((digitalRead(3) == HIGH)&&(digitalRead(4) == HIGH)&&(digitalRead(5) == LOW)){ 238 delay(100); // Debounce by waiting then checking again 239 if((digitalRead(3) == HIGH)&&(digitalRead(4) == HIGH)&&(digitalRead(5) == LOW)){ 240 241 animation++; 242 if (animation > 6 ) { 243 animation = 0; 244 } 245 // Signal to user that change made 246 blankscreen(); 247 flagscreen1(); 248 delay(1000); 249 blankscreen(); 250 cyclerefresh = 10; // Reset refresh screen counter 251 } 252 delay(100); 253 } 254} 255 256void decrementpushed() { 257 258 //Decrement Button Pushed 259 if((digitalRead(3) == LOW)&&(digitalRead(4) == LOW)&&(digitalRead(5) == HIGH)){ 260 delay(100); // Debounce by waiting then checking again 261 if((digitalRead(3) == LOW)&&(digitalRead(4) == LOW)&&(digitalRead(5) == HIGH)){ 262 if(timeStatus() == timeSet){ 263 adjustTime(-60); 264 RTC.set(now() -60); 265 266 // Signal to user that change made 267 blankscreen(); 268 flagscreen3(); 269 delay(1000); 270 blankscreen(); 271 cyclerefresh = 10; // Reset refresh screen counter 272 273 } 274 } 275 delay(100); 276 } 277} 278 279void incrementpushed() { 280 //Increment Button Pushed 281 if((digitalRead(4) == LOW)&&(digitalRead(5) == LOW)&&(digitalRead(3) == HIGH)){ 282 delay(100); // Debounce by waiting then checking again 283 if((digitalRead(4) == LOW)&&(digitalRead(5) == LOW)&&(digitalRead(3) == HIGH)){ 284 if(timeStatus() == timeSet){ 285 adjustTime(60); 286 RTC.set(now() + 60); 287 288 // Signal to user that change made 289 blankscreen(); 290 flagscreen4(); 291 delay(1000); 292 blankscreen(); 293 cyclerefresh = 10; // Reset refresh screen counter 294 295 } 296 } 297 delay(100); 298 } 299} 300 301 302void colorbuttonpushed() { 303 // Color Button Pushed 304 if((digitalRead(3) == LOW)&&(digitalRead(4) == HIGH)&&(digitalRead(5) == HIGH)){ 305 delay(100); // Debounce by waiting then checking again 306 if((digitalRead(3) == LOW)&&(digitalRead(4) == HIGH)&&(digitalRead(5) == HIGH)){ 307 308 color++; 309 if (color > 6 ) { 310 color = 0; 311 } 312 // Signal to user that change made 313 blankscreen(); 314 flagscreen2(); 315 delay(1000); 316 blankscreen(); 317 cyclerefresh = 10; // Reset refresh screen counter 318 } 319 delay(100); 320 } 321} 322 323void WipeDisplay() { // Horizont 324 325 // Blank display 326fill_solid( leds, 110, CRGB(0,0,0)); 327FastLED.show(); 328delay(300); 329 330byte tctr = 0; 331 332 for (byte r = 0; r < 10; r++) { 333 334 for (byte c = 0; c < 11; c++) { 335 336 // Calculate the LED location 337 338 tctr = ((c * 10)+(9 - r)); // Calculate the LED value in the 11 x 10 Matrix 339 340 if ( color == 0) { 341 342 leds[tctr] = CRGB::Green; 343 344 } else if ( color == 1) { 345 346 leds[tctr] = CRGB::Red; 347 348 } else if ( color == 2) { 349 350 leds[tctr] = CRGB::Blue; 351 352 } else if ( color == 3) { 353 354 leds[tctr] = CRGB::Aqua; 355 356 } else if ( color == 4) { 357 358 leds[tctr] = CRGB::Indigo; 359 360 } else if ( color == 5) { 361 362 leds[tctr] = CRGB::Violet; 363 }else if ( color == 6) { 364 365 leds[tctr] = CRGB::Orange; 366 } 367 368 FastLED.show(); 369 delay(5); // Set delay between typing out time characters 370 371 372 373 if ( ledmatrix[tctr][0] == 1) { 374 375 leds[tctr] = CRGB( 120, 255, 255); 376 FastLED.show(); 377// delay(200); // Set delay between typing out time characters 378 379 380 381 382 } 383 } 384 385 } 386 387delay(3000); 388} 389 390 391 392void WipeDisplay2() { // Horizont 393 394 // Blank display 395fill_solid( leds, 110, CRGB(0,0,0)); 396FastLED.show(); 397delay(300); 398 399byte tctr = 0; 400 401 for (byte r = 0; r < 10; r++) { 402 403 for (byte c = 0; c < 11; c++) { 404 405 // Calculate the LED location 406 407 tctr = ((c * 10)+(9 - r)); // Calculate the LED value in the 11 x 10 Matrix 408 409 if ( color == 0) { 410 411 leds[tctr] = CRGB::Green; 412 413 } else if ( color == 1) { 414 415 leds[tctr] = CRGB::Red; 416 417 } else if ( color == 2) { 418 419 leds[tctr] = CRGB::Blue; 420 421 } else if ( color == 3) { 422 423 leds[tctr] = CRGB::Aqua; 424 425 } else if ( color == 4) { 426 427 leds[tctr] = CRGB::Indigo; 428 429 } else if ( color == 5) { 430 431 leds[tctr] = CRGB::Violet; 432 }else if ( color == 6) { 433 434 leds[tctr] = CRGB::Orange; 435 } 436 437 FastLED.show(); 438 delay(50); // Set delay between typing out time characters 439 440 441 442 if ( ledmatrix[tctr][0] == 1) { 443 444 leds[tctr] = CRGB( 120, 255, 255); 445 FastLED.show(); 446// delay(200); // Set delay between typing out time characters 447 448 449 450 451 } else { 452 453 leds[tctr] = CRGB::Black; 454 FastLED.show(); 455 } 456 } 457 458 } 459} 460 461void UpdateDisplay() { // Step through each location in the Matrix Display Array Data in LED Matrix 462 463 464 for (int l = 0; l < 110; l++) { 465 466 if ( ledmatrix[l][0] == 1) { 467 468 if ( color == 0) { 469 470 leds[l] = CRGB::Green; 471 472 } else if ( color == 1) { 473 474 leds[l] = CRGB::Red; 475 476 } else if ( color == 2) { 477 478 leds[l] = CRGB::Blue; 479 480 } else if ( color == 3) { 481 482 leds[l] = CRGB::Yellow; 483 484 } else if ( color == 4) { 485 486 leds[l] = CRGB::White; 487 488 } else if ( color == 5) { 489 490 leds[l] = CRGB::Violet; 491 492 }else if ( color == 6) { 493 494 leds[l] = CRGB::Aqua; 495 496 } 497 498 499 } else { 500 501 leds[l] = CRGB::Black; 502 503 } 504 505 } 506 507 508 FastLED.show(); 509} 510 511 512void RainDisplay() { // Step through each location in the Matrix Display Array Data in LED Matrix 513 514 515byte colorflag = 0; 516 517 for (int l = 0; l < 110; l++) { 518 519 leds[l] = CRGB::Blue; 520 FastLED.show(); 521 delay(20); 522 leds[l] = CRGB::Black; 523 FastLED.show(); 524 525 if ( ledmatrix[l][0] == 1) { 526 leds[l] = CRGB( 120, 255, 255); 527 FastLED.show(); 528 } 529 530 } 531 532 533 FastLED.show(); 534 535delay(2000); 536} 537 538 539 540 541 542void RainbowDisplay () { // Step through each location in the Matrix Display Array Data in LED Matrix 543 544byte colorflag = 0; 545 546 547 for (int l = 0; l < 110; l++) { 548 549 if ( ledmatrix[l][0] == 1) { 550 551 if ( colorflag == 0) { 552 553 leds[l] = CRGB::Red; 554 555 } else if ( colorflag == 1) { 556 557 leds[l] = CRGB::Orange; 558 559 } else if ( colorflag == 2) { 560 561 leds[l] = CRGB::Green; 562 563 } else if ( colorflag == 3) { 564 565 leds[l] = CRGB::Aqua; 566 567 } else if ( colorflag == 4) { 568 569 leds[l] = CRGB::Indigo; 570 571 } else if ( colorflag == 5) { 572 573 leds[l] = CRGB::Violet; 574 } 575 576 colorflag++; 577 if (colorflag == 6) { 578 colorflag = 0; // Reset to beginneing of rainbow 579 } 580 581 } else { 582 583 leds[l] = CRGB::Black; 584 585 } 586 587 } 588 589 590 FastLED.show(); 591} 592 593void blankscreen() { // Blank out all LEDs 594 // Blank display 595 fill_solid( leds, 110, CRGB(0,0,0)); 596 FastLED.show(); 597 598} 599 600 601 602void flagscreen1() { // Blank out all LEDs 603 604 // Blank display 605fill_solid( leds, 110, CRGB(150,255,255)); 606FastLED.show(); 607delay(300); 608 609byte tctr = 0; 610 611 for (byte r = 2; r < 8; r++) { 612 613 for (byte c = 2; c < 9; c++) { 614 615 // Calculate the LED location 616 617 tctr = ((c * 10)+(9 - r)); // Calculate the LED value in the 11 x 10 Matrix 618 619 leds[tctr] = CRGB::Red; 620 621 622 FastLED.show(); 623 } 624 } 625} 626 627void flagscreen2() { // Blank out all LEDs 628 629 // Blank display 630fill_solid( leds, 110, CRGB(150,255,255)); 631FastLED.show(); 632delay(300); 633 634byte tctr = 0; 635 636 for (byte r = 2; r < 8; r++) { 637 638 for (byte c = 2; c < 9; c++) { 639 640 // Calculate the LED location 641 642 tctr = ((c * 10)+(9 - r)); // Calculate the LED value in the 11 x 10 Matrix 643 644 leds[tctr] = CRGB::Blue; 645 646 647 FastLED.show(); 648 } 649 } 650} 651 652void flagscreen3() { // Blank out all LEDs 653 654 // Blank display 655fill_solid( leds, 110, CRGB(150,255,255)); 656FastLED.show(); 657delay(300); 658 659byte tctr = 0; 660 661 for (byte r = 2; r < 8; r++) { 662 663 for (byte c = 2; c < 9; c++) { 664 665 // Calculate the LED location 666 667 tctr = ((c * 10)+(9 - r)); // Calculate the LED value in the 11 x 10 Matrix 668 669 leds[tctr] = CRGB::Purple; 670 671 672 FastLED.show(); 673 } 674 } 675} 676 677void flagscreen4() { // Blank out all LEDs 678 679 // Blank display 680fill_solid( leds, 110, CRGB(150,255,255)); 681FastLED.show(); 682delay(300); 683 684byte tctr = 0; 685 686 for (byte r = 2; r < 8; r++) { 687 688 for (byte c = 2; c < 9; c++) { 689 690 // Calculate the LED location 691 692 tctr = ((c * 10)+(9 - r)); // Calculate the LED value in the 11 x 10 Matrix 693 694 leds[tctr] = CRGB::Orange; 695 696 697 FastLED.show(); 698 } 699 } 700} 701 702void TypeDisplay() { // Type out each row in matrix through each location in the Matrix Display Array Data in LED Matrix 703 704// Blank display 705fill_solid( leds, 110, CRGB(0,0,0)); 706FastLED.show(); 707 708byte tctr = 0; 709 710 for (byte r = 0; r < 10; r++) { 711 712 for (byte c = 0; c < 11; c++) { 713 714 // Calculate the LED location 715 716 tctr = ((c * 10)+(9 - r)); // Calculate the LED value in the 11 x 10 Matrix 717 718 if ( ledmatrix[tctr][0] == 1) { 719 720 leds[tctr] = CRGB( 120, 255, 255); 721 FastLED.show(); 722 delay(200); // Set delay between typing out time characters 723 724 725 if ( color == 0) { 726 727 leds[tctr] = CRGB::Green; 728 729 } else if ( color == 1) { 730 731 leds[tctr] = CRGB::Red; 732 733 } else if ( color == 2) { 734 735 leds[tctr] = CRGB::Blue; 736 737 } else if ( color == 3) { 738 739 leds[tctr] = CRGB::Aqua; 740 741 } else if ( color == 4) { 742 743 leds[tctr] = CRGB::Indigo; 744 745 } else if ( color == 5) { 746 747 leds[tctr] = CRGB::Violet; 748 }else if ( color == 6) { 749 750 leds[tctr] = CRGB::Orange; 751 } 752 753 FastLED.show(); 754 delay(50); // Set delay between typing out time characters 755 756 } else { 757 758 leds[tctr] = CRGB::Black; 759 FastLED.show(); 760 } 761 } 762 763 } 764delay(2000); 765} 766 767 768 769 770 771 772 773 774 775void CircleDisplay() { // Running LED chaser from inside to out 776 777fill_solid( leds, 110, CRGB(0,0,0)); 778FastLED.show(); 779 780byte tctr = 0; 781 782byte x1 = 0; 783byte x2 = 10; 784 785byte y1 = 0; 786byte y2 = 9; 787 788byte dw = 20; // Delay 789 790for (byte f = 1; f < 7; f++) { 791 792 for (byte m = x1; m < x2; m++) { // Print first row left to right 793 794 tctr = ((m * 10)+(9 - y1)); // Calculate the LED value in the 11 x 10 Matrix 795 796 leds[tctr] = CRGB::Green; 797 FastLED.show(); 798 delay(dw); // Set delay between typing out time characters 799 leds[tctr] = CRGB::Black; 800 FastLED.show(); 801 802 // Display result 803 if ( ledmatrix[tctr][0] == 1) { 804 leds[tctr] = CRGB( 120, 255, 255); 805 FastLED.show(); 806 } 807 808 } 809 810 for (byte m = y1; m < y2; m++) { // Print first column rhs top to bottom 811 812 tctr = ((x2 * 10)+(9 - m)); // Calculate the LED value in the 11 x 10 Matrix 813 814 leds[tctr] = CRGB::Green; 815 FastLED.show(); 816 delay(dw); // Set delay between typing out time characters 817 leds[tctr] = CRGB::Black; 818 FastLED.show(); 819 // Display result 820 if ( ledmatrix[tctr][0] == 1) { 821 leds[tctr] = CRGB( 120, 255, 255); 822 FastLED.show(); 823 } 824 825 } 826 827 for (byte m = x2; m > x1; m--) { // Print bottom row right to left 828 829 tctr = ((m * 10)+(9 - y2)); // Calculate the LED value in the 11 x 10 Matrix 830 831 leds[tctr] = CRGB::Green; 832 FastLED.show(); 833 delay(dw); // Set delay between typing out time characters 834 leds[tctr] = CRGB::Black; 835 FastLED.show(); 836 837 // Display result 838 if ( ledmatrix[tctr][0] == 1) { 839 leds[tctr] = CRGB( 120, 255, 255); 840 FastLED.show(); 841 } 842 843 } 844 845 for (byte m = y2; m > y1; m--) { // Print first column lhs bottom to top 846 847 tctr = ((x1 * 10)+(9 - m)); // Calculate the LED value in the 11 x 10 Matrix 848 849 leds[tctr] = CRGB::Green; 850 FastLED.show(); 851 delay(dw); // Set delay between typing out time characters 852 leds[tctr] = CRGB::Black; 853 FastLED.show(); 854 855 // Display result 856 if ( ledmatrix[tctr][0] == 1) { 857 leds[tctr] = CRGB( 120, 255, 255); 858 FastLED.show(); 859 } 860 } 861 x1++; 862 x2--; 863 y1++; 864 y2--; 865 } 866 867delay(2000); 868} 869 870 871void Matrixeffect() { // Matrix effect where characters fall from the sky randomly and then settle on letters in words 872 873// Blank display 874fill_solid( leds, 110, CRGB(0,0,0)); 875FastLED.show(); 876delay(300); 877 878byte w = 0; // temp variable 879 880// Generate random delay speeds for each falling charater in columns 881byte dly1[11] = { random(10), random(10), random(10), random(10), random(10), random(10), random(10), random(10), random(10), random(10), random(10) }; 882 883byte ptr[11] = { 0,0,0,0,0,0,0,0,0,0,0 }; // Points to the LED in each column we need to deal with 884/* 885 for ( byte o = 0; o < 11 ; o++) { 886 887 Serial.print(dly1[o]); 888 Serial.print(" "); 889 Serial.println(ptr[o]); 890 } 891*/ 892 893 for ( byte t = 0; t < 200; t++) { // Counter for completing all changes for 10 rows 894 895 for ( byte c = 0; c < 11; c++) { // Count through columns and check timer not exceeded 896 897 898 if ((t > (dly1[c]*(ptr[c] + 1))) && ptr[c] < 9 ) { // If timer exceeded then erase current value and draw a white curosr in this position based on random time period 899 900 901 // Write over the previous value 902 // Calculate the LED value from the Column and ptr value 903 w = ((c * 10)+(9 - ptr[c])); // Calculate the LED value in the 11 x 10 Matrix 904 905 906 907 if ( (ledmatrix[w][0] == 1) &&(ptr[c]!=0)) { // If the bit set in LED Matrix then leave White 908 leds[w] = CRGB(120,255,255); 909 } else { 910 leds[w] = CRGB(0,150,0); 911 } 912 913 FastLED.show(); 914 delay(20); 915 916 ptr[c]++; // Increment row and print White value 917 918 if ( ptr[c] < 9 ) { 919 920 // Calculate the LED value from the Column and ptr value 921 w = ((c * 10)+(9 - ptr[c])); // Calculate the LED value in the 11 x 10 Matrix 922 leds[w] = CRGB(120,255,255); 923 FastLED.show(); 924 925 926 927 } else { 928 // Calculate the LED value from the Column and ptr value 929 w = ((c * 10)+(9 - ptr[c])); // Calculate the LED value in the 11 x 10 Matrix 930 leds[w] = CRGB(0,150,0); 931 FastLED.show(); 932 933 } 934 935 } 936 } 937 938 } 939 940 // Do last row in Array with White 941 942 for ( byte n = 0; n < 101; n=n+10){ 943 944 if (ledmatrix[n][0] == 1){ 945 946 leds[n] = CRGB(120,255,255); 947 FastLED.show(); 948 } 949 } 950 951/// Now clear the screen 952 953// Generate random delay speeds for each falling charater in columns 954byte dly2[11] = { random(10), random(10), random(10), random(10), random(10), random(10), random(10), random(10), random(10), random(10), random(10) }; 955 956byte ptr2[11] = { 0,0,0,0,0,0,0,0,0,0,0 }; // Points to the LED in each column we need to deal with 957/* 958 for ( byte o = 0; o < 11 ; o++) { 959 960 Serial.print(dly1[o]); 961 Serial.print(" "); 962 Serial.println(ptr[o]); 963 } 964*/ 965 966 for ( byte t = 0; t < 200; t++) { // Counter for completing all changes for 10 rows 967 968 for ( byte c = 0; c < 11; c++) { // Count through columns and check timer not exceeded 969 970 971 if ((t > (dly2[c]*(ptr2[c] + 1))) && ptr2[c] < 9 ) { // If timer exceeded then erase current value and draw a white curosr in this position based on random time period 972 973 974 // Write over the previous value 975 // Calculate the LED value from the Column and ptr value 976 w = ((c * 10)+(9 - ptr2[c])); // Calculate the LED value in the 11 x 10 Matrix 977 978 979 980 if ( (ledmatrix[w][0] == 1) &&(ptr2[c]!=0)) { // If the bit set in LED Matrix then leave White 981 leds[w] = CRGB(120,255,255); 982 } else { 983 leds[w] = CRGB(0,0,0); 984 } 985 986 FastLED.show(); 987 delay(5); 988 989 ptr2[c]++; // Increment row and print White value 990 991 if ( ptr2[c] < 9 ) { 992 993 // Calculate the LED value from the Column and ptr value 994 w = ((c * 10)+(9 - ptr2[c])); // Calculate the LED value in the 11 x 10 Matrix 995 leds[w] = CRGB(0,150,0); 996 FastLED.show(); 997 998 999 1000 } else { 1001 // Calculate the LED value from the Column and ptr value 1002 w = ((c * 10)+(9 - ptr2[c])); // Calculate the LED value in the 11 x 10 Matrix 1003 1004 if (ledmatrix[w][0] == 0) { 1005 leds[w] = CRGB(0,0,0); 1006 FastLED.show(); 1007 } 1008 1009 } 1010 1011 } 1012 } 1013 1014 1015 1016 } 1017 1018 1019 // Do last row in Array with White 1020 1021 for ( byte n = 0; n < 101; n=n+10){ 1022 1023 if (ledmatrix[n][0] == 1){ 1024 1025 leds[n] = CRGB(120,255,255); 1026 FastLED.show(); 1027 } 1028 } 1029 1030 1031 1032 // leds[100] = CRGB(255,255,0); 1033 // FastLED.show(); 1034 1035/* 1036 for ( byte o = 0; o < 11 ; o++) { 1037 1038 Serial.print(dly1[o]); 1039 Serial.print(" "); 1040 Serial.println(ptr[o]); 1041 } 1042*/ 1043 1044delay(2000); 1045 1046} 1047 1048 void UpdateArray() { // From time values update the Array with the LED positions that require lighting and turn off the previous LED values 1049 1050 1051 // "Display the time based on current RTC data" 1052 1053itis(); // Display it is permanently 1054 1055 if((minute()>4) && (minute()<10)){ 1056 // FIVE MINUTES 1057 fivemins(); 1058 past(); 1059 1060 dTo(); 1061 dtenmins(); 1062 dquarter(); 1063 dtwenty(); 1064 dhalf(); 1065 doclock(); 1066 } 1067 if((minute()>9) && (minute()<15)) { 1068 //TEN MINUTES; 1069 tenmins(); 1070 past(); 1071 1072 dTo(); 1073 dfivemins(); 1074 dquarter(); 1075 dtwenty(); 1076 dhalf(); 1077 doclock(); 1078 } 1079 1080 if((minute()>14) && (minute()<20)) { 1081 // QUARTER 1082 quarter(); 1083 past(); 1084 1085 dfivemins(); 1086 dTo(); 1087 dtenmins(); 1088 dtwenty(); 1089 dhalf(); 1090 doclock(); 1091 } 1092 1093 if((minute()>19) && (minute()<25)) { 1094 //TWENTY MINUTES 1095 twenty(); 1096 past(); 1097 1098 dfivemins(); 1099 dTo(); 1100 dtenmins(); 1101 dquarter(); 1102 dhalf(); 1103 doclock(); 1104 } 1105 1106if((minute()>24) && (minute()<30)) { 1107 //TWENTY FIVE 1108 twentyfive(); 1109 past(); 1110 1111 dTo(); 1112 dtenmins(); 1113 dquarter(); 1114 dhalf(); 1115 doclock(); 1116 } 1117 1118if((minute()>29) && (minute()<35)) { 1119 // HALF 1120 half(); 1121 past(); 1122 1123 dfivemins(); 1124 dTo(); 1125 dtenmins(); 1126 dquarter(); 1127 dtwenty(); 1128 doclock(); 1129 } 1130 1131 if((minute()>34) && (minute()<40)) { 1132 //TWENTY FIVE TO 1133 twentyfive(); 1134 To(); 1135 1136 dpast(); 1137 dtenmins(); 1138 dquarter(); 1139 dhalf(); 1140 doclock(); 1141 } 1142 1143if((minute()>39) && (minute()<45)) { 1144 //TWENTY TO 1145 twenty(); 1146 To(); 1147 1148 dfivemins(); 1149 dpast(); 1150 dtenmins(); 1151 dquarter(); 1152 dhalf(); 1153 doclock(); 1154 } 1155 1156if((minute()>44) && (minute()<50)) { 1157 // QUARTER TO 1158 quarter(); 1159 To(); 1160 1161 dfivemins(); 1162 dpast(); 1163 dtenmins(); 1164 dtwenty(); 1165 dhalf(); 1166 doclock(); 1167 } 1168 1169if((minute()>49) && (minute()<55)){ 1170 // TEN TO 1171 tenmins(); 1172 To(); 1173 1174 dfivemins(); 1175 dpast(); 1176 dquarter(); 1177 dtwenty(); 1178 dhalf(); 1179 doclock(); 1180 } 1181 1182 if(minute()>54){ 1183 // FIVE TO 1184 fivemins(); 1185 To(); 1186 1187 dpast(); 1188 dtenmins(); 1189 dquarter(); 1190 dtwenty(); 1191 dhalf(); 1192 doclock(); 1193 } 1194 1195 if(minute()<5){ 1196 // OClock 1197 oclock(); 1198 1199 dfivemins(); 1200 dpast(); 1201 dTo(); 1202 dtenmins(); 1203 dquarter(); 1204 dtwenty(); 1205 dhalf(); 1206 1207 } 1208 1209 1210// Display correct Hour for the clock 1211// Do this by determining if after 30mins past the hour 1212 1213if(minute()<35){ 1214 1215// Hours on the clock if 34 minutes or less past the hour 1216 1217 if((hour()==1)||(hour()==13)){ 1218 // One Oclock 1219 one(); 1220 1221 dtwelve(); 1222 dtwo(); 1223 } 1224 1225 if((hour()==2)||(hour()==14)){ 1226 // Two Oclock 1227 two(); 1228 1229 done(); 1230 dthree(); 1231 } 1232 1233 if((hour()==3)||(hour()==15)){ 1234 // Three Oclock 1235 three(); 1236 1237 dtwo(); 1238 dfour(); 1239 } 1240 1241 if((hour()==4)||(hour()==16)){ 1242 // four Oclock 1243 four(); 1244 1245 dthree(); 1246 dfive(); 1247 } 1248 1249 if((hour()==5)||(hour()==17)){ 1250 // five Oclock 1251 five(); 1252 1253 dfour(); 1254 dsix(); 1255 } 1256 1257 if((hour()==6)||(hour()==18)){ 1258 // Six Oclock 1259 six(); 1260 1261 dfive(); 1262 dseven(); 1263 } 1264 if((hour()==7)||(hour()==19)){ 1265 // Seven Oclock 1266 seven(); 1267 1268 dsix(); 1269 deight(); 1270 } 1271 1272 if((hour()==8)||(hour()==20)){ 1273 // Eight Oclock 1274 eight(); 1275 1276 dseven(); 1277 dnine(); 1278 } 1279 1280 if((hour()==9)||(hour()==21)){ 1281 // Nine Oclock 1282 nine(); 1283 1284 deight(); 1285 dten(); 1286 } 1287 1288 if((hour()==10)||(hour()==22)){ 1289 // Ten Oclock 1290 ten(); 1291 1292 dnine(); 1293 deleven(); 1294 } 1295 1296 if((hour()==11)||(hour()==23)){ 1297 // Eleven Oclock 1298 eleven(); 1299 1300 dten(); 1301 dtwelve(); 1302 } 1303 1304 if((hour()==12)||(hour()==0)){ 1305 // Twelve Oclock 1306 twelve(); 1307 1308 deleven(); 1309 done(); 1310 } 1311 1312} else { 1313 1314 1315// Hours on the clock if 35 minutes or more past the hour 1316 1317 if((hour()==1)||(hour()==13)){ 1318 // To two Oclock 1319 two(); 1320 1321 done(); 1322 dthree(); 1323 } 1324 1325 if((hour()==2)||(hour()==14)){ 1326 // To three Oclock 1327 three(); 1328 1329 dtwo(); 1330 dfour(); 1331 } 1332 1333 if((hour()==3)||(hour()==15)){ 1334 // To four Oclock 1335 four(); 1336 1337 dthree(); 1338 dfive(); 1339 } 1340 1341 if((hour()==4)||(hour()==16)){ 1342 // To five Oclock 1343 five(); 1344 1345 dfour(); 1346 dsix(); 1347 } 1348 1349 if((hour()==5)||(hour()==17)){ 1350 // To six Oclock 1351 six(); 1352 1353 dfive(); 1354 dseven(); 1355 } 1356 1357 if((hour()==6)||(hour()==18)){ 1358 // To seven Oclock 1359 seven(); 1360 1361 dsix(); 1362 deight(); 1363 } 1364 if((hour()==7)||(hour()==19)){ 1365 // To eight Oclock 1366 eight(); 1367 1368 dseven(); 1369 dnine(); 1370 } 1371 1372 if((hour()==8)||(hour()==20)){ 1373 // To nine Oclock 1374 nine(); 1375 1376 deight(); 1377 dten(); 1378 } 1379 1380 if((hour()==9)||(hour()==21)){ 1381 // To ten Oclock 1382 ten(); 1383 1384 dnine(); 1385 deleven(); 1386 } 1387 1388 if((hour()==10)||(hour()==22)){ 1389 // To eleven Oclock 1390 eleven(); 1391 1392 dten(); 1393 dtwelve(); 1394 } 1395 1396 if((hour()==11)||(hour()==23)){ 1397 // To twelve Oclock 1398 twelve(); 1399 1400 deleven(); 1401 done(); 1402 } 1403 1404 if((hour()==12)||(hour()==0)){ 1405 // To one Oclock 1406 one(); 1407 1408 dtwelve(); 1409 dtwo(); 1410 } 1411 1412 1413} 1414 1415 1416 1417} 1418 1419void ledtest() { // Powerup sequence for unit 1420 1421 // Flash LED to show calibrate done 1422 1423 for (int x = 0; x < 110; x++) { 1424 leds[x] = CRGB::Blue; 1425 } 1426 FastLED.show(); 1427 delay(300); 1428 1429 for (int x = 0; x < 110; x++) { 1430 leds[x] = CRGB::Green; 1431 } 1432 FastLED.show(); 1433 delay(300); 1434 1435 for (int x = 0; x < 110; x++) { 1436 leds[x] = CRGB::Red; 1437 } 1438 FastLED.show(); 1439 delay(300); 1440 1441 for (int x = 0; x < 110; x++) { 1442 leds[x] = CRGB::Yellow; 1443 } 1444 FastLED.show(); 1445 delay(300); 1446 1447 for (int x = 0; x < 110; x++) { 1448 leds[x] = CRGB::Magenta; 1449 } 1450 FastLED.show(); 1451 delay(300); 1452 1453 1454 for (int x = 0; x < 110; x++) { 1455 1456 leds[x] = CRGB::Black; 1457 1458 } 1459 FastLED.show(); 1460 delay(T1); 1461 1462 1463 1464} 1465 1466 1467 1468// DISPLAY ROUTINES TO TURN ON LEDS 1469 1470 1471void doclock() { 1472 // "oclock" 1473 1474 ledmatrix[50][0] = 0; 1475 ledmatrix[60][0] = 0; 1476 ledmatrix[70][0] = 0; 1477 ledmatrix[80][0] = 0; 1478 ledmatrix[90][0] = 0; 1479 ledmatrix[100][0] = 0; 1480 1481/* 1482 leds[50] = CRGB::Black; 1483 leds[60] = CRGB::Black; 1484 leds[70] = CRGB::Black; 1485 leds[80] = CRGB::Black; 1486 leds[90] = CRGB::Black; 1487 leds[100] = CRGB::Black; 1488 FastLED.show(); 1489*/ 1490 1491} 1492 1493void oclock() { 1494 // "oclock" 1495 ledmatrix[50][0] = 1; 1496 ledmatrix[60][0] = 1; 1497 ledmatrix[70][0] = 1; 1498 ledmatrix[80][0] = 1; 1499 ledmatrix[90][0] = 1; 1500 ledmatrix[100][0] = 1; 1501} 1502 1503 1504void dtwelve() { 1505 // "twelve" 1506 1507 ledmatrix[52][0] = 0; 1508 ledmatrix[62][0] = 0; 1509 ledmatrix[72][0] = 0; 1510 ledmatrix[82][0] = 0; 1511 ledmatrix[92][0] = 0; 1512 ledmatrix[102][0] = 0; 1513 1514} 1515 1516void twelve() { 1517 // "twelve" 1518 ledmatrix[52][0] = 1; 1519 ledmatrix[62][0] = 1; 1520 ledmatrix[72][0] = 1; 1521 ledmatrix[82][0] = 1; 1522 ledmatrix[92][0] = 1; 1523 ledmatrix[102][0] = 1; 1524} 1525 1526void deleven() { 1527 // "eleven" 1528 ledmatrix[51][0] = 0; 1529 ledmatrix[61][0] = 0; 1530 ledmatrix[71][0] = 0; 1531 ledmatrix[81][0] = 0; 1532 ledmatrix[91][0] = 0; 1533 ledmatrix[101][0] = 0; 1534} 1535 1536void eleven() { 1537 // "eleven" 1538 ledmatrix[51][0] = 1; 1539 ledmatrix[61][0] = 1; 1540 ledmatrix[71][0] = 1; 1541 ledmatrix[81][0] = 1; 1542 ledmatrix[91][0] = 1; 1543 ledmatrix[101][0] = 1; 1544} 1545 1546void dten() { 1547 // "ten" 1548 1549 ledmatrix[0][0] = 0; 1550 ledmatrix[10][0] = 0; 1551 ledmatrix[20][0] = 0; 1552 1553} 1554 1555void ten() { 1556 // "ten" 1557 ledmatrix[0][0] = 1; 1558 ledmatrix[10][0] = 1; 1559 ledmatrix[20][0] = 1; 1560} 1561 1562void dnine() { 1563 // "nine" 1564 ledmatrix[2][0] = 0; 1565 ledmatrix[12][0] = 0; 1566 ledmatrix[22][0] = 0; 1567 ledmatrix[32][0] = 0; 1568} 1569 1570void nine() { 1571 // "eleven" 1572 ledmatrix[2][0] = 1; 1573 ledmatrix[12][0] = 1; 1574 ledmatrix[22][0] = 1; 1575 ledmatrix[32][0] = 1; 1576} 1577 1578 1579void deight() { 1580 // "eight" 1581 ledmatrix[1][0] = 0; 1582 ledmatrix[11][0] = 0; 1583 ledmatrix[21][0] = 0; 1584 ledmatrix[31][0] = 0; 1585 ledmatrix[41][0] = 0; 1586} 1587 1588void eight() { 1589 // "eight" 1590 ledmatrix[1][0] = 1; 1591 ledmatrix[11][0] = 1; 1592 ledmatrix[21][0] = 1; 1593 ledmatrix[31][0] = 1; 1594 ledmatrix[41][0] = 1; 1595} 1596 1597 1598void dseven() { 1599 // "seven" 1600 ledmatrix[55][0] = 0; 1601 ledmatrix[65][0] = 0; 1602 ledmatrix[75][0] = 0; 1603 ledmatrix[85][0] = 0; 1604 ledmatrix[95][0] = 0; 1605} 1606void seven() { 1607 // "seven" 1608 ledmatrix[55][0] = 1; 1609 ledmatrix[65][0] = 1; 1610 ledmatrix[75][0] = 1; 1611 ledmatrix[85][0] = 1; 1612 ledmatrix[95][0] = 1; 1613} 1614 1615void dsix() { 1616 // "six" 1617 ledmatrix[83][0] = 0; 1618 ledmatrix[93][0] = 0; 1619 ledmatrix[103][0] = 0; 1620} 1621 1622void six() { 1623 // "six" 1624 ledmatrix[83][0] = 1; 1625 ledmatrix[93][0] = 1; 1626 ledmatrix[103][0] = 1; 1627} 1628 1629void dfive() { 1630 // "five" 1631 ledmatrix[43][0] = 0; 1632 ledmatrix[53][0] = 0; 1633 ledmatrix[63][0] = 0; 1634 ledmatrix[73][0] = 0; 1635} 1636 1637void five() { 1638 // "five" 1639 ledmatrix[43][0] = 1; 1640 ledmatrix[53][0] = 1; 1641 ledmatrix[63][0] = 1; 1642 ledmatrix[73][0] = 1; 1643} 1644 1645 1646 1647void dfour() { 1648 // "four" 1649 ledmatrix[3][0] = 0; 1650 ledmatrix[13][0] = 0; 1651 ledmatrix[23][0] = 0; 1652 ledmatrix[33][0] = 0; 1653} 1654 1655void four() { 1656 // "four" 1657 ledmatrix[3][0] = 1; 1658 ledmatrix[13][0] = 1; 1659 ledmatrix[23][0] = 1; 1660 ledmatrix[33][0] = 1; 1661} 1662 1663void dthree() { 1664 // "three" 1665 ledmatrix[64][0] = 0; 1666 ledmatrix[74][0] = 0; 1667 ledmatrix[84][0] = 0; 1668 ledmatrix[94][0] = 0; 1669 ledmatrix[104][0] = 0; 1670} 1671 1672void three() { 1673 // "three" 1674 ledmatrix[64][0] = 1; 1675 ledmatrix[74][0] = 1; 1676 ledmatrix[84][0] = 1; 1677 ledmatrix[94][0] = 1; 1678 ledmatrix[104][0] = 1; 1679} 1680 1681void dtwo() { 1682 // "two" 1683 ledmatrix[34][0] = 0; 1684 ledmatrix[44][0] = 0; 1685 ledmatrix[54][0] = 0; 1686} 1687 1688void two() { 1689 // "two" 1690 ledmatrix[34][0] = 1; 1691 ledmatrix[44][0] = 1; 1692 ledmatrix[54][0] = 1; 1693} 1694 1695void done() { 1696 // "one" 1697 ledmatrix[4][0] = 0; 1698 ledmatrix[14][0] = 0; 1699 ledmatrix[24][0] = 0; 1700} 1701 1702void one() { 1703 // "one" 1704 ledmatrix[4][0] = 1; 1705 ledmatrix[14][0] = 1; 1706 ledmatrix[24][0] = 1; 1707} 1708 1709void dpast() { 1710 // "past" 1711 ledmatrix[5][0] = 0; 1712 ledmatrix[15][0] = 0; 1713 ledmatrix[25][0] = 0; 1714 ledmatrix[35][0] = 0; 1715} 1716 1717void past() { 1718 // "past" 1719 ledmatrix[5][0] = 1; 1720 ledmatrix[15][0] = 1; 1721 ledmatrix[25][0] = 1; 1722 ledmatrix[35][0] = 1; 1723} 1724 1725void dTo() { 1726 // "To" 1727 ledmatrix[96][0] = 0; 1728 ledmatrix[106][0] = 0; 1729} 1730 1731void To() { 1732 // "To" 1733 ledmatrix[96][0] = 1; 1734 ledmatrix[106][0] = 1; 1735} 1736 1737void dfivemins() { 1738 // "five" 1739 ledmatrix[77][0] = 0; 1740 ledmatrix[87][0] = 0; 1741 ledmatrix[97][0] = 0; 1742 ledmatrix[107][0] = 0; 1743} 1744 1745void fivemins() { 1746 // "five" 1747 ledmatrix[77][0] = 1; 1748 ledmatrix[87][0] = 1; 1749 ledmatrix[97][0] = 1; 1750 ledmatrix[107][0] = 1; 1751} 1752 1753void dtwenty() { 1754 // "twenty" 1755 ledmatrix[7][0] = 0; 1756 ledmatrix[17][0] = 0; 1757 ledmatrix[27][0] = 0; 1758 ledmatrix[37][0] = 0; 1759 ledmatrix[47][0] = 0; 1760 ledmatrix[57][0] = 0; 1761} 1762 1763void twenty() { 1764 // "twenty" 1765 ledmatrix[7][0] = 1; 1766 ledmatrix[17][0] = 1; 1767 ledmatrix[27][0] = 1; 1768 ledmatrix[37][0] = 1; 1769 ledmatrix[47][0] = 1; 1770 ledmatrix[57][0] = 1; 1771} 1772 1773void dtwentyfive() { 1774 // "twenty" 1775 ledmatrix[7][0] = 0; 1776 ledmatrix[17][0] = 0; 1777 ledmatrix[27][0] = 0; 1778 ledmatrix[37][0] = 0; 1779 ledmatrix[47][0] = 0; 1780 ledmatrix[57][0] = 0; 1781 ledmatrix[77][0] = 0; 1782 ledmatrix[87][0] = 0; 1783 ledmatrix[97][0] = 0; 1784 ledmatrix[107][0] = 0; 1785 1786} 1787 1788void twentyfive() { 1789 // "twenty" 1790 ledmatrix[7][0] = 1; 1791 ledmatrix[17][0] = 1; 1792 ledmatrix[27][0] = 1; 1793 ledmatrix[37][0] = 1; 1794 ledmatrix[47][0] = 1; 1795 ledmatrix[57][0] = 1; 1796 ledmatrix[77][0] = 1; 1797 ledmatrix[87][0] = 1; 1798 ledmatrix[97][0] = 1; 1799 ledmatrix[107][0] = 1; 1800} 1801 1802void dquarter() { 1803 // "quarter" 1804 ledmatrix[18][0] = 0; 1805 ledmatrix[28][0] = 0; 1806 ledmatrix[38][0] = 0; 1807 ledmatrix[48][0] = 0; 1808 ledmatrix[58][0] = 0; 1809 ledmatrix[68][0] = 0; 1810 ledmatrix[78][0] = 0; 1811} 1812 1813void quarter() { 1814 // "quarter" 1815 ledmatrix[18][0] = 1; 1816 ledmatrix[28][0] = 1; 1817 ledmatrix[38][0] = 1; 1818 ledmatrix[48][0] = 1; 1819 ledmatrix[58][0] = 1; 1820 ledmatrix[68][0] = 1; 1821 ledmatrix[78][0] = 1; 1822} 1823 1824void dtenmins() { 1825 // "one" 1826 ledmatrix[56][0] = 0; 1827 ledmatrix[66][0] = 0; 1828 ledmatrix[76][0] = 0; 1829} 1830 1831void tenmins() { 1832 // "one" 1833 ledmatrix[56][0] = 1; 1834 ledmatrix[66][0] = 1; 1835 ledmatrix[76][0] = 1; 1836} 1837 1838void dhalf() { 1839 // "half" 1840 ledmatrix[6][0] = 0; 1841 ledmatrix[16][0] = 0; 1842 ledmatrix[26][0] = 0; 1843 ledmatrix[36][0] = 0; 1844} 1845 1846void half() { 1847 // "half" 1848 ledmatrix[6][0] = 1; 1849 ledmatrix[16][0] = 1; 1850 ledmatrix[26][0] = 1; 1851 ledmatrix[36][0] = 1; 1852} 1853 1854 1855 1856void textblock() { 1857 1858 // Personalised Name Text Block 1859 1860} 1861 1862 1863 1864void ditis() { 1865 // "It Is" 1866 ledmatrix[9][0] = 0; 1867 ledmatrix[19][0] = 0; 1868 ledmatrix[39][0] = 0; 1869 ledmatrix[49][0] = 0; 1870} 1871 1872void itis() { 1873 // "It Is" 1874 ledmatrix[9][0] = 1; 1875 ledmatrix[19][0] = 1; 1876 ledmatrix[39][0] = 1; 1877 ledmatrix[49][0] = 1; 1878} 1879 1880 1881 1882
Downloadable files
Animated Word Clock Circuit Diagram
Animated Word Clock Circuit Diagram

Documentation
3D Enclosure files
https://www.thingiverse.com/thing:3658169
Comments
Only logged in users can leave comments