-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathclock.py
More file actions
94 lines (63 loc) · 2.33 KB
/
clock.py
File metadata and controls
94 lines (63 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# %%
import LEDarcade as LED
from rgbmatrix import graphics
from rgbmatrix import RGBMatrix, RGBMatrixOptions
import time
import random
#Variable declaration section
ScrollSleep = 0.025
HatHeight = 32
HatWidth = 64
print ("---------------------------------------------------------------")
print ("WELCOME TO THE LED ARCADE ")
print ("")
print ("BY DATAGOD")
print ("")
print ("This program will demonstrate several LED functions that have")
print ("been developed as part of the Arcade Retro Clock RGB project.")
print ("---------------------------------------------------------------")
print ("")
print ("")
#--------------------------------------
# SHOW TITLE SCREEN --
#--------------------------------------
'''
LED.ShowTitleScreen(
BigText = 'CLOCK',
BigTextRGB = LED.MedPurple,
BigTextShadowRGB = LED.ShadowPurple,
LittleText = 'BY LEDARCADE',
LittleTextRGB = LED.MedRed,
LittleTextShadowRGB = LED.ShadowRed,
ScrollText = 'ITS ABOUT TIME',
ScrollTextRGB = LED.MedYellow,
ScrollSleep = ScrollSleep, # time in seconds to control the scrolling (0.005 is fast, 0.1 is kinda slow)
DisplayTime = 1, # time in seconds to wait before exiting
ExitEffect = 0 # 0=Random / 1=shrink / 2=zoom out / 3=bounce / 4=fade /5=fallingsand
)
'''
#--------------------------------------
# SHOW CLOCKS --
#--------------------------------------
while 1==1:
#This allows you to create a title screen with different size text
#some scrolling text, an animation and even a nice fade to black
#Starry Night Clock
if(LED.HatWidth > 64):
ZoomFactor = 3
else:
ZoomFactor = 2
LED.DisplayDigitalClock(ClockStyle=3,CenterHoriz=True,v=1, hh=24, ZoomFactor = ZoomFactor, AnimationDelay=10, RunMinutes = 5, ScrollSleep = 0.01 )
LED.DisplayDigitalClock(
ClockStyle = 1,
CenterHoriz = True,
v = 1,
hh = 24,
RGB = LED.LowGreen,
ShadowRGB = LED.ShadowGreen,
ZoomFactor = 3,
AnimationDelay= 10,
RunMinutes = 5,
ScrollSleep = 0.05)
LED.DisplayDigitalClock(ClockStyle=2,CenterHoriz=True,v=1, hh=24, ZoomFactor = 1, AnimationDelay=10, RunMinutes = 1,ScrollSleep = 0.05 )
# %%