Pico Desktop Clock
A fun project using a Raspberry Pi Pico microcontroller. Out of my comfort zone of web development where I have virtually limitless RAM and a 1000 screen sizes to deal with. Here I have around 100kb of RAM and a round screen at 240 x 240 pixels.
Considering the display at 8 bit will consume another 50kb of RAM, there isn't much left
Raspberry Pi Pico Desktop Clock with Round LCD
A little desktop clock with round display for Raspberry Pi Pico, or could be coded to do and be anything you want.
Features
- Acquires current time from NTP
- Customisable alarms with snooze feature
- Buzzer to play musical alarms
- Designed in Fusion360
- Printed on Ender 3 v2 Neo
- Assembled on my desk
Back to basics code
def drawHand(value, distance, intervals = 60):
"""Draw a hand on the clock face
value: The hand position
distance: The distance from the centre
intervals: The number of intervals"""
display.set_pen(GREEN)
# Calculate the position of the hand
angle = math.pi * 2 * (value / intervals) - math.pi / 2
x = int(MIDX + math.cos(angle) * distance)
y = int(MIDY + math.sin(angle) * distance)
# Draw the hand
display.line(MIDX, MIDY, x, y)
Last activity
1 year ago
Created
Sep 09, 2023
Updated
Oct 04, 2023
construction Skills used
sync
Loading data from Github...
Project Development
- star 0 stars
- visibility 0 watchers
- Created:
- Updated:
- Pushed: