Introduction: Arduino Clock (With LCD and Stepper Motor)
This instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida (www.makecourse.com)
This instructable will provide information on:
1. Clock housing / Other parts
2. Description of the circuit
3. Commented code (For Arduino)
Step 1: The Housing / Parts
The housing for the clock for printed using a Makerbot 3D printer.The files are
The cover has six slots for where the buttons will go. There is a compartment underneath the cover where a breadboard can be slid into (This is how the buttons stay up).The compartment on the top is used if you only have jumper wires that stick up from the breadboard.
The box has a rectangle slot for the LCD, a circular slot for the shaft of the motor, and a smaller rectangular hole in the back, this is where the USB/power supply goes.
The Clock Hand:
A basic clock hand design which should slide onto the motor shaft.
Here are the additional parts (LCD, motor, and buttons) used in making the project:
Other parts like wires, breadboard, etc., Are not listed
Step 2: Circuit
Included is a Fritzing diagram. (I wasn't able to find the exact relay I used for the motor so I used a different one, wiring might be a little off with this one, but the general idea is the same)
The code does a good job commenting which pins go where. Along with the fritzing diagram, there shouldn't be any issues with wiring.
Step 3: Code
Attached is the code required for the project to run. If the wiring is the same, simply run the script and the clock will work.
The code is commented and clears up any confusion that might arise, inside the code, each new idea or variable is commented. The code takes advantage of the "wire.h" that comes with the Arduino. Other classes that might need to be used are attached along with comments inside the scripts, simply put the .h and .cpp files into a folder with the same name as the files, and insert it into the Libraries folder in your Arduino directory.