Chicken Wing Alarm Clock

Introduction: Chicken Wing Alarm Clock

Welcome to my project!

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: What Is It?

Good morning friends,

Are you late for today?

Are you still upset about not getting up on time every morning?

Are you still thinking about why you feel the alarm clock is not ringing every morning?

Congratulations, “your best partner ”—— the chicken wing clock is coming to you!

This is a clock which is named chicken wing clock. This is not an ordinary alarm clock. When the alarm is turned on, it can continually poke with the tip of the chicken wings to make you wake up. The alarm clock is turned off while the chicken wings are stopped.

It is funny but it is useful.

Step 2: Material

a Wood board (22* 34* 0.7 inches)

Fish wire (40inchs)

Hot glues

Wood glues

Insulation tape

an MG995R

an Arduino board DS1307 Real Time Clock (RTC): I2C board

LCD screen

two pushbuttons

registers (220 Ω)

a buzzer

Coin cell battery

an electret Microphone Amplifier – MAX9812a

USB wire

wires

soldering machine

CNC

Sandpapers (220)

Step 3: Design Circuit Diagram

Don't put in the wrong pin.

checking each pin

Step 4: Making the Chicken Wing and Clock Box

(8inchs* 5.5inchs*0.2inchs)

(8.5inchs*8inchs*3.5)

Step 5: Testing Code

  1. #include "RTClib.h"
  2. #if defined(ARDUINO_ARCH_SAMD)
  3. #define Serial SerialUSB
  4. #endif
  5. #include
  6. int pos = 0;
  7. RTC_DS1307 rtc;
  8. char daysOfTheWeek[7][12] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
  9. const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
  10. LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
  11. void setup() {
  12. #ifndef ESP8266 while (!Serial);
  13. #endif
  14. Serial.begin(57600);
  15. if (! rtc.begin()) { Serial.println("Couldn't find RTC");
  16. while (1); }
  17. if (! rtc.isrunning()) { Serial.println("RTC is NOT running!");
  18. rtc.adjust(DateTime(F(__DATE__), F(__TIME__))); }
  19. lcd.begin(16, 2);
  20. pinMode(A0, INPUT);
  21. pinMode(13, OUTPUT); }
  22. void loop() {
  23. DateTime now = rtc.now();
  24. lcd.print(now.year(), DEC);
  25. lcd.print('/');
  26. lcd.print(now.month(), DEC);
  27. lcd.print('/');
  28. lcd.print(now.day(), DEC);
  29. lcd.print(" (");
  30. lcd.print(daysOfTheWeek[now.dayOfTheWeek()]);
  31. lcd.print(") ");
  32. lcd.print(now.hour(), DEC); lcd.print(':');
  33. lcd.print(now.minute(), DEC);
  34. lcd.print(':');
  35. lcd.print(now.second(), DEC);
  36. lcd.println();
  37. lcd.print(" since midnight 1/1/1970 = ");
  38. lcd.print(now.unixtime());
  39. lcd.print("s = ");
  40. lcd.print(now.unixtime() / 86400L);
  41. lcd.println("d");
  42. DateTime future (now + TimeSpan(7, 12, 30, 6));
  43. lcd.print(" now + 7d + 30s: ");
  44. lcd.print(future.year(), DEC);
  45. lcd.print('/');
  46. lcd.print(future.month(), DEC);
  47. lcd.print('/');
  48. lcd.print(future.day(), DEC);
  49. lcd.print(' ');
  50. lcd.print(future.hour(), DEC);
  51. lcd.print(':');
  52. lcd.print(future.minute(), DEC);
  53. lcd.print(':');
  54. lcd.print(future.second(), DEC);
  55. lcd.println();
  56. lcd.println();
  57. delay(3000);
  58. lcd.setCursor(0, 1);
  59. lcd.print(millis() / 1000);
  60. if (digitalRead(A0) == HIGH) {
  61. tone(8, 440, 100); delay(10);
  62. }
  63. }

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#include
#include const int inputPin = A0;

const int inputWindow = 100;

unsigned int inputSample;

Servo myservo;

int pos = 0;

void setup() {

pinMode(inputPin, INPUT);

Serial.begin(9600);

myservo.attach(9);

}

void loop() {

unsigned int inputMax = 0;

unsigned int inputMin = 1024;

for (unsigned int i = 0; i < inputWindow; i++) {

inputSample = analogRead(inputPin);

inputMin = min(inputMin, inputSample);

inputMax = max(inputMax, inputSample);

}

Serial.print("Min: ");

Serial.print(inputMin);

Serial.print(" Max: ");

Serial.print(inputMax);

Serial.print(" Diff: ");

Serial.print(inputMax - inputMin);

Serial.println();

if (inputMax - inputMin >= 150) {

for (pos = 0; pos <= 90; pos += 1) {

myservo.write(pos);

delay(3);

}

for (pos = 90; pos >= 0; pos -= 1) {

myservo.write(pos);

delay(3);

} } else {

pos = 0; myservo.write(pos);

} }

Step 6: Finally

I am done!

Be the First to Share

    Recommendations

    • Backyard Contest

      Backyard Contest
    • Silly Hats Speed Challenge

      Silly Hats Speed Challenge
    • Finish It Already Speed Challenge

      Finish It Already Speed Challenge

    Discussions

    0
    bekathwia
    bekathwia

    1 year ago

    Very fun project, Leng! I recommend making an animated gif of the chicken wing poking you in the face, it would add a lot to the humor of it. You can try a free site like http://freegifmaker.me/youtube-to-gif/ to make a gif from part of your video.