Introduction: Arduino Clock
Ahmed Mohamed made an alarm clock that was mistaken for a bomb. Police officers did not believe him when he told them that it was not a bomb, but an alarm clock. In my class, we felt that assumption was unjust and to show our support we created clocks using Arduinos. I hope you find this Instructable interesting, I sure think it's "DA BOMB!"
Step 1: Gather Your Materials
You will need the following materials
- Box to house the materials(doesn't need to be that big)
- at least 20 wires(8 with connectors on both sides, 16 with connectors on one side)
- 2 resistors
- 2 buttons
- 1 breadboard
- 1 USB Cable (to flash the code)
- 7 segment display
- 1 portable charger
Step 2: Plugging in Your Wires
What you will be doing is plugging all the wires that connect the sevseg (seven segment) display to the Arduino.
Step 1: Take your sevseg display and punch the pins through the top of your box so that they are poking through the back. I found that using a paperclip to first poke through the holes was helpful.
Step 2: Connect the pins and the wires.
Step 3: Plug the wires into the Arduino using the information below. The first number is the pin on the sevseg display, and the second number is the port on the Arduino
#define d1 13
#define d2 12
#define d3 11
#define d4 10
#define a A0
#define b A1
#define c A2
#define d A3
#define e A4
#define f 7
#define g 6
#define dp 9
Step 3: Making the Minute and Hour Button
To accomplish this you will need the resistors, 6 wires, 2 buttons, and the breadboard.
Follow the Fritzing diagram in the photo to complete the circuit. In the photo of the circuit that I made you will notice that I did not include the LED. I didn't see a real need for it, but if you like it you can keep it. The diagram tells you to plug into the 5V but I personally recommend 3.3V.
Also, note that the button that you connect to port 2 is the hour button and the button that you connect to port 3 is the minute button.
Step 4: Flashing the Code
Use the link above to access the code that you will flash onto your Arduino using a USB cord.
Step 5: Assembly
Now you will have to try to fit all the wires, the Arduino, and the breadboard into the container that you have chosen. I chose to use tape to secure the Arduino and breadboard, but it's up to you. If you are having trouble fitting all of it into one box than you may have to find another.
Step 6: Power Source
Using the USB cord from the previous step, plug the portable charger into the Arduino. This will serve as the power source, so of course, you should probably make sure that the portable charger is charged.
Step 7: Setting the Time
After you plug the Arduino into the portable charger, it will turn on. Now you will use the hour and minute button to set the time. It might take a while to get the minute correct seeing as it only increases by one, but I promise you, after you finish the fact that you made a working clock will make it all worth it.
Step 8: Congratulations and Recognition
Congrats! If you followed all the steps correctly, you have a working clock! That is truly something to be proud of, but before you go show it off to your friends, remember why you made it. Ahmed Mohamed was an innocent kid who was treated unfairly. If we as a society don't recognize that, then we are doomed to repeat our mistakes.
Participated in the