Differences

This shows you the differences between two versions of the page.

Link to this comparison view

pm:prj2023:tmiu:digitalclock [2023/05/30 16:38]
sajjad.al [Software Design]
pm:prj2023:tmiu:digitalclock [2023/05/30 16:58] (current)
sajjad.al [Introduction]
Line 7: Line 7:
  
   ​   ​
-• The goal and purpose of this project is to build and design a simple Digital Clock with Alarm and LED Matrix Display, to displays the current time on LED display and it also can be set to sound an Alarm on a specific time. The clock uses an LED matrix to display the time, and a buzzer to sound the alarm.+• The goal and purpose of this project is to build and design a simple Digital Clock with Alarm and LED Matrix Display, to displays the current time and date on LED display and it also can be set to sound an Alarm on a specific time. The clock uses an LED matrix to display the time, and a buzzer to sound the alarm. 
  
  
-• The idea of this project comes from an actual Digital clock but I added the Alarm function. ​ 
  
  
Line 23: Line 23:
  
  
-{{:​pm:​prj2023:​tmiu:​pic.jpg?200|}} + 
-===== Hardware Design =====+{{:​pm:​prj2023:​tmiu:​1.jpg?​200|}}===== Hardware Design =====
  
  
Line 85: Line 85:
  
 #define CS_PIN ​   10 #define CS_PIN ​   10
- +  ​
 int i = 9; int i = 9;
 +
 int Animation; int Animation;
 +
 String RandAn; String RandAn;
    
Line 93: Line 95:
  
 // Brightness variables // Brightness variables
 +
 int brightness = 5;       // Initial brightness level int brightness = 5;       // Initial brightness level
 +
 const int brightnessStep = 1;  // Step to increase/​decrease brightness const int brightnessStep = 1;  // Step to increase/​decrease brightness
 +
 const int brightnessMin = 0;  // Minimum brightness level const int brightnessMin = 0;  // Minimum brightness level
 +
 const int brightnessMax = 15; // Maximum brightness level const int brightnessMax = 15; // Maximum brightness level
  
 // Button pin numbers // Button pin numbers
 +
 const int brightnessUpPin = 2; const int brightnessUpPin = 2;
 +
 const int brightnessDownPin = 3; const int brightnessDownPin = 3;
 +
 const int alarmButtonPin = 4;    // Alarm button pin const int alarmButtonPin = 4;    // Alarm button pin
  
Line 106: Line 115:
  
 bool isAlarmEnabled = false; bool isAlarmEnabled = false;
 +
 bool isAlarmOn = false; bool isAlarmOn = false;
    
 char daysOfTheWeek[7][12] = {"​sun",​ "​mon",​ "​tues",​ "​wedn",​ "​thur",​ "​fri",​ "​sat"​};​ char daysOfTheWeek[7][12] = {"​sun",​ "​mon",​ "​tues",​ "​wedn",​ "​thur",​ "​fri",​ "​sat"​};​
 +
 char monthOfTheYear[12][12] = {"​Jan",​ "​Feb",​ "​Mar",​ "​April",​ "​May",​ "​Jun",​ "​Jul",​ "​Aug",​ "​Sept",​ "​Oct",​ "​Nov",​ "​Dec"​};​ char monthOfTheYear[12][12] = {"​Jan",​ "​Feb",​ "​Mar",​ "​April",​ "​May",​ "​Jun",​ "​Jul",​ "​Aug",​ "​Sept",​ "​Oct",​ "​Nov",​ "​Dec"​};​
    
 struct sCatalog struct sCatalog
 +
 { {
 +
   textEffect_t ​ effect; ​     textEffect_t ​ effect; ​  
 +  ​
   const char *  psz;      ​   const char *  psz;      ​
 +  ​
   uint16_t ​     speed; ​   ​   uint16_t ​     speed; ​   ​
 +  ​
   uint16_t ​     pause; ​   ​   uint16_t ​     pause; ​   ​
 }; };
 +
    
 sCatalog catalog[] = sCatalog catalog[] =
 +
 { {
   { PA_PRINT,"",​80,​3000 },   { PA_PRINT,"",​80,​3000 },
 +  ​
   { PA_SCROLL_UP,"",​80,​3000 },   { PA_SCROLL_UP,"",​80,​3000 },
 +  ​
   { PA_SCROLL_DOWN,"",​80,​3000 },   { PA_SCROLL_DOWN,"",​80,​3000 },
 +  ​
   { PA_SCROLL_LEFT,"",​80,​3000 },   { PA_SCROLL_LEFT,"",​80,​3000 },
 +  ​
   { PA_SCROLL_RIGHT,"",​80,​3000 },   { PA_SCROLL_RIGHT,"",​80,​3000 },
 +  ​
   { PA_SPRITE,"",​80,​3000 ​ },   { PA_SPRITE,"",​80,​3000 ​ },
 +  ​
   { PA_SLICE,"",​15,​3000 ​ },   { PA_SLICE,"",​15,​3000 ​ },
 +  ​
   { PA_MESH,"",​150,​3000 ​ },   { PA_MESH,"",​150,​3000 ​ },
 +  ​
   { PA_FADE,"",​250,​3000 ​ },   { PA_FADE,"",​250,​3000 ​ },
 +  ​
   { PA_DISSOLVE,"",​500,​3000 ​ },   { PA_DISSOLVE,"",​500,​3000 ​ },
 +  ​
   { PA_BLINDS,"",​120,​3000 ​ },   { PA_BLINDS,"",​120,​3000 ​ },
 +  ​
   { PA_RANDOM,"",​50,​3000 ​ },   { PA_RANDOM,"",​50,​3000 ​ },
 +  ​
   { PA_WIPE,"",​80,​3000 ​ },   { PA_WIPE,"",​80,​3000 ​ },
 +  ​
   { PA_WIPE_CURSOR,"",​80,​3000 ​ },   { PA_WIPE_CURSOR,"",​80,​3000 ​ },
 +  ​
   { PA_SCAN_HORIZ,"",​80,​3000 ​ },   { PA_SCAN_HORIZ,"",​80,​3000 ​ },
 +  ​
   { PA_SCAN_HORIZX,"",​80,​3000 ​ },   { PA_SCAN_HORIZX,"",​80,​3000 ​ },
 +  ​
   { PA_SCAN_VERT,"",​80,​3000 ​ },   { PA_SCAN_VERT,"",​80,​3000 ​ },
 +  ​
   { PA_SCAN_VERTX,"",​80,​3000 ​ },   { PA_SCAN_VERTX,"",​80,​3000 ​ },
 +  ​
   { PA_OPENING,"",​80,​3000 ​ },   { PA_OPENING,"",​80,​3000 ​ },
 +  ​
   { PA_OPENING_CURSOR,"",​80,​3000 ​ },   { PA_OPENING_CURSOR,"",​80,​3000 ​ },
 +  ​
   { PA_CLOSING,"",​80,​3000 ​ },   { PA_CLOSING,"",​80,​3000 ​ },
 +  ​
   { PA_CLOSING_CURSOR,"",​80,​3000 ​ },   { PA_CLOSING_CURSOR,"",​80,​3000 ​ },
 +  ​
   { PA_SCROLL_UP_LEFT,"",​80,​3000 ​ },   { PA_SCROLL_UP_LEFT,"",​80,​3000 ​ },
 +  ​
   { PA_SCROLL_UP_RIGHT,"",​80,​3000 ​  },   { PA_SCROLL_UP_RIGHT,"",​80,​3000 ​  },
 +  ​
   { PA_SCROLL_DOWN_LEFT,"",​80,​3000 ​ },   { PA_SCROLL_DOWN_LEFT,"",​80,​3000 ​ },
 +  ​
   { PA_SCROLL_DOWN_RIGHT,"",​80,​3000 ​ },   { PA_SCROLL_DOWN_RIGHT,"",​80,​3000 ​ },
 +  ​
   { PA_GROW_UP,"",​80,​3000 ​ },   { PA_GROW_UP,"",​80,​3000 ​ },
 +  ​
   { PA_GROW_DOWN,"",​80,​3000 ​ },   { PA_GROW_DOWN,"",​80,​3000 ​ },
 +  ​
 }; };
    
Line 359: Line 405:
 ===== Results Obtained ===== ===== Results Obtained =====
  
 +After i built the Hardware components and wrote the Software (CODE): ​
  
-    ​ +*  The digital clock should display the current time in hours and minutes using the LED matrix. 
-What were the results obtained after the realization ​of your project.+ 
 +*  The clock should retrieve ​the time from the Tiny RTC module using the I2C interface. 
 + 
 +*  The clock should display the current day of the week, date, month, and year on the LED matrix. 
 + 
 +*  The clock should support different text effects and animations for displaying the time and date. 
 + 
 +*  The clock should have three push buttons for controlling the brightness of the LED matrix and activating/​deactivating the alarm. 
 + 
 +*  The clock should activate an alarm sound using the buzzer at a predefined alarm time (8:30 AM).
  
        
Line 367: Line 423:
 ===== Conclusions ===== ===== Conclusions =====
  
 +
 + the project demonstrates the ability to create a digital clock using an Arduino Uno, LED matrix, Tiny RTC module, push buttons, and a buzzer. The project combines both hardware and software components to deliver a functional and interactive digital clock.
 ===== Download ===== ===== Download =====
  
Line 388: Line 446:
  
  
-     + **Software Resources** ​ 
-List of documents, datasheets, Internet resources used, possibly grouped by **Software Resources** ​and **Hardware Resources**.+ 
 +https://​mytectutor.com/​ds1307-real-time-clock-with-arduino-including-digital-clock-using-max7219-led-matrix/​ 
 + 
 + 
 +https://​pastebin.com/​EkX8aJvc 
 + 
 + 
 +https://​lastminuteengineers.com/​ds1307-rtc-arduino-tutorial/​
  
  
pm/prj2023/tmiu/digitalclock.1685453903.txt.gz · Last modified: 2023/05/30 16:38 by sajjad.al
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0