The Analog Clock: Each group must build an analog clock that tells the time (creativity is a must). The clock can be built from anything (cardboard, laser cut pieces, 3D printed, etc.) however, you must use at least one servo.
ME134_Homework2_BarrelClock.mp4
Watch on Youtube
Our CAD design is three “Barrels” one for hours, one for minutes and another for seconds.
We also had to design parts to holds the servo in the middle of the barrel with screwable clips.
- Servo HAT Allows for:
- External libraries which simplifies communication with multiple servo motors without leaning on PWM
- Simplifies control to i2c where we only need
- Flexible Power Supply (Battery or Wall)
- External libraries which simplifies communication with multiple servo motors without leaning on PWM
- Use of Smaller Servo Motors allows for more compact design
- time.time()
- Returns the number of seconds since EPOCH (1/1/1970)
- time.localtime(t)
- Takes an input in seconds
- Returns the Date and Time of that input as a struct containing hours, minutes, seconds, current month, year, and more
- Data converted to 12 hour clock format
- Time Multiplier:
- Subtract current time and initial time, multiply by facto
- Stores previous servo positions (prevent twitch)
- Holds Lookup Tables
- Sets servo positions based on processed system time
Adafruit-circuitpython-servokit
- Setups register-level configuration of servos
- i2c comms
- PWM communication for position control
- Easy API to access / control servos
Clone the project
git clone https://github.com/paccionesawyer/Analog-Clock.git
Go to the project directory
cd Analog-Clock
Run the program
python3 2Axis-LidarScanner.py