Meilily Li
Published

A Bunny Clock that Remembers Birthdays

Please meet The Clock that Remembers Birthdays, a clock that rigger a birthday reminder at a certain moment.

BeginnerFull instructions provided6 hours772
A Bunny Clock that Remembers Birthdays

Things used in this project

Hardware components

Seeeduino Lite
Seeed Studio Seeeduino Lite
×1
Base Shield V2
Seeed Studio Base Shield V2
×1
Seeed Studio Seeed Grove 16x2 LCD (White on Blue)
×1
Mono Enclosed Speaker - 2W 6 Ohm
×1
JQ8400 Mp3 Player Module
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Laser cutter (generic)
Laser cutter (generic)

Story

Read more

Custom parts and enclosures

The Clock Remembers Laser-cutting File

dxf file for the casing
File missing, please reupload.

The Clock Remembers Laser-cutting File

dxf file for the casing

The Clock Remembers Laser-cutting File

Code

The clock remembers.ino

Arduino
#include <DS1307.h>
DS1307 clock;//define a object of DS1307 class

#include <Wire.h>
#include "rgb_lcd.h"
rgb_lcd lcd;

#include "DS1307.h"

#include <SoftwareSerial.h>
SoftwareSerial mp3(8, 9); // RX, TX

unsigned char mp3Hex_play1[6] {0xAA, 0x07, 0x02, 0x00, 0x01, 0xB4};
unsigned char mp3Hex_play2[6] {0xAA, 0x07, 0x02, 0x00, 0x02, 0xB5};
unsigned char mp3Hex_play3[6] {0xAA, 0x07, 0x02, 0x00, 0x03, 0xB6};
unsigned char mp3Hex_play4[6] {0xAA, 0x07, 0x02, 0x00, 0x04, 0xB7};
unsigned char mp3Hex_play5[6] {0xAA, 0x07, 0x02, 0x00, 0x05, 0xB8};
unsigned char mp3Hex_play6[6] {0xAA, 0x07, 0x02, 0x00, 0x06, 0xB9};
unsigned char mp3Hex_play7[6] {0xAA, 0x07, 0x02, 0x00, 0x07, 0xBA};
unsigned char mp3Hex_play8[6] {0xAA, 0x07, 0x02, 0x00, 0x08, 0xBB};
unsigned char mp3Hex_play9[6] {0xAA, 0x07, 0x02, 0x00, 0x09, 0xBC};
unsigned char mp3Hex_play10[6] {0xAA, 0x07, 0x02, 0x00, 0x0A, 0xBD};
unsigned char mp3Hex_play11[6] {0xAA, 0x07, 0x02, 0x00, 0x0B, 0xBE};
unsigned char mp3Hex_play12[6] {0xAA, 0x07, 0x02, 0x00, 0x0C, 0xBF};
unsigned char mp3Hex_play13[6] {0xAA, 0x07, 0x02, 0x00, 0x0D, 0xC0};
unsigned char mp3Hex_play14[6] {0xAA, 0x07, 0x02, 0x00, 0x0E, 0xC1};
//unsigned char mp3Hex_play15[6] {0xAA, 0x07, 0x02, 0x00, 0x0F, 0xC2};
unsigned char mp3Hex_VOLUME[5] {0xAA, 0x13, 0x01, 0x16, 0xD4};

int readItBefore = 0;

void setup() {
  Serial.begin(115200);
    // set up the LCD's number of columns and rows:
    lcd.begin(16, 2);
        // Print a message to the LCD.
    lcd.setCursor(1,0);
    lcd.print("How to remember");
    delay(1000);
    lcd.setCursor(1,1);
    lcd.print("Birthdays?");
    delay(2000);
    lcd.clear();
    lcd.setCursor(1,0);
    lcd.print("Birthday Clock");
    //define a DS1307 class
    Serial.println("done1");
    clock.begin();
    clock.fillByYMD(2019,9,24);//September 19,2019
    clock.fillByHMS(20,7,55);//14:59 30"
    clock.fillDayOfWeek(THU);//Thursday
    clock.setTime();//write time to the RTC chip
    //setup for mp3 player
    mp3.begin(9600);
    mp3.write(mp3Hex_VOLUME, 5);
    //mp3.write(mp3Hex_play1, 6); //
    Serial.println("done2");
}


void loop()
{
  printTime();
}
/*Function: Display time on the serial monitor*/
void printTime()
{
  clock.getTime();
  
  lcd.setCursor(1,1);
  if(clock.hour<9)
  {
    lcd.print("0");
    lcd.print(clock.hour, DEC);
  }else
  {
    lcd.print(clock.hour, DEC); 
  }
  lcd.print(":");
  if(clock.minute<9)
  {
    lcd.print("0");
    lcd.print(clock.minute, DEC);
  }else
  {
    lcd.print(clock.minute, DEC); 
  }
  lcd.print(":");
  if(clock.second<9)
  {
    lcd.print("0");
    lcd.print(clock.second, DEC);
  }else
  {
    lcd.print(clock.second, DEC); 
  }
  
    if(clock.hour==1 && clock.minute==22)
    {
      lcd.setCursor(1,0);
      lcd.print("Alice's      ");
      if(readItBefore == 0)
      {
        mp3.write(mp3Hex_play1, 6);
        readItBefore = 1;
      }
    }
    else if(clock.hour==2 && clock.minute==6)
    {
       lcd.setCursor(1,0);
       lcd.print("Alison's      ");  
       if(readItBefore == 0)
       {
          mp3.write(mp3Hex_play2, 6);
          readItBefore = 1;
       }
    }
    else if (clock.hour==3 && clock.minute==25)
    {
       lcd.setCursor(1,0);
       lcd.print("Eman's      ");
       if(readItBefore == 0)
       {
          mp3.write(mp3Hex_play3, 6);
          readItBefore = 1;
       }
    }
     else if (clock.hour==4 && clock.minute==1)
    {
       lcd.setCursor(1,0);
       lcd.print("Anby's      ");
       if(readItBefore == 0)
       {
          mp3.write(mp3Hex_play4, 6);
          readItBefore = 1;
       }
    }
    else if (clock.hour==6 && clock.minute==18)
    {
       lcd.setCursor(1,0);
       lcd.print("Eric's      ");
       if(readItBefore == 0)
       {
          mp3.write(mp3Hex_play5, 6);
          readItBefore = 1;
       }
    }
    else if (clock.hour==7 && clock.minute==7)
    {
       lcd.setCursor(1,0);
       lcd.print("Samantha's      ");
       if(readItBefore == 0)
       {
          mp3.write(mp3Hex_play6, 6);
          readItBefore = 1;
       }
    }
    else if (clock.hour==8 && clock.minute==28)
    {
       lcd.setCursor(1,0);
       lcd.print("Rain's      ");
       if(readItBefore == 0)
       {
          mp3.write(mp3Hex_play7, 6);
          readItBefore = 1;
       }
    }
    else if (clock.hour==9 && clock.minute==5)
    {
       lcd.setCursor(1,0);
       lcd.print("Kawi's      ");
       if(readItBefore == 0)
       {
          mp3.write(mp3Hex_play8, 6);
          readItBefore = 1;
       }
    }
    else if (clock.hour==11 && clock.minute==5)
    {
       lcd.setCursor(1,0);
       lcd.print("Tony's      ");
       if(readItBefore == 0)
       {
          mp3.write(mp3Hex_play9, 6);
          readItBefore = 1;
       }
    }
    else if (clock.hour==14 && clock.minute==21)
    {
       lcd.setCursor(1,0);
       lcd.print("Joker's      ");
       if(readItBefore == 0)
       {
          mp3.write(mp3Hex_play10, 6);
          readItBefore = 1;
       }
    }
    else if (clock.hour==15 && clock.minute==18)
    {
       lcd.setCursor(1,0);
       lcd.print("Violet's      ");
       if(readItBefore == 0)
       {
          mp3.write(mp3Hex_play11, 6);
          readItBefore = 1;
       }
    }
    else if (clock.hour==16 && clock.minute==9)
    {
       lcd.setCursor(1,0);
       lcd.print("Meilily's      ");
       if(readItBefore == 0)
       {
          mp3.write(mp3Hex_play12, 6);
          readItBefore = 1;
       }
    }
    else if (clock.hour==20 && clock.minute==8)
    {
       lcd.setCursor(1,0);
       lcd.print("Duobao's      ");
       if(readItBefore == 0)
       {
          mp3.write(mp3Hex_play13, 6);
          readItBefore = 1;
       }
    }
    else if (clock.hour==21 && clock.minute==9)
    {
       lcd.setCursor(1,0);
       lcd.print("CY's      ");
       if(readItBefore == 0)
       {
          mp3.write(mp3Hex_play14, 6);
          readItBefore = 1;
       }
    }
    else
    {
      lcd.setCursor(1,0);
      lcd.print("Birthday Clock");
      readItBefore = 0;
    }
}

Credits

Meilily Li

Meilily Li

3 projects • 16 followers
Love all things related to creativeness.
Thanks to Tony Lin.

Comments