-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathRunningTest.py
More file actions
119 lines (74 loc) · 4.38 KB
/
RunningTest.py
File metadata and controls
119 lines (74 loc) · 4.38 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
'''
TO DO:
'''
import os
os.system('cls||clear')
import sys
import LEDarcade as LED
from rgbmatrix import graphics
from rgbmatrix import RGBMatrix, RGBMatrixOptions
import random
from configparser import SafeConfigParser
import traceback
import pprint
import copy
import time
from datetime import datetime, timezone
#---------------------------------------
#Variable declaration section
#---------------------------------------
ScrollSleep = 0.015
TerminalTypeSpeed = 0.02 #pause in seconds between characters
TerminalScrollSpeed = 0.02 #pause in seconds between new lines
CursorRGB = (0,255,0)
CursorDarkRGB = (0,50,0)
HatHeight = 32
HatWidth = 64
StreamBrightness = 20
GifBrightness = 25
MaxBrightness = 80
#Sprite display locations
LED.ClockH, LED.ClockV, LED.ClockRGB = 0,0, (0,150,0)
LED.DayOfWeekH, LED.DayOfWeekV, LED.DayOfWeekRGB = 8,20, (125,20,20)
LED.MonthH, LED.MonthV, LED.MonthRGB = 28,20, (125,30,0)
LED.DayOfMonthH, LED.DayOfMonthV, LED.DayOfMonthRGB = 47,20, (115,40,10)
#Colors
TerminalRGB = (0,200,0)
CursorRGB = (0,75,0)
LED.ShowTitleScreen(
BigText = "ALERT!",
BigTextRGB = LED.MedPurple,
BigTextShadowRGB = LED.ShadowPurple,
LittleText = "by datagod",
LittleTextRGB = LED.MedRed,
LittleTextShadowRGB = LED.ShadowRed,
ScrollText = "intruders will be interregated, tortured, then released. maybe.",
ScrollTextRGB = LED.MedYellow,
ScrollSleep = ScrollSleep *2 , # 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 = 5, # 0=Random / 1=shrink / 2=zoom out / 3=bounce / 4=fade /5=fallingsand
LittleTextZoom = 1
)
print ("--Start--")
#Fake boot sequence
LED.ClearBigLED()
LED.ClearBuffers()
CursorH = 0
CursorV = 0
LED.ScreenArray,CursorH,CursorV = LED.TerminalScroll(LED.ScreenArray,"METROPOLIS DREAMWARE SYSTEM COMPUTER BOOTING",CursorH=CursorH,CursorV=CursorV,MessageRGB=(0,100,0),CursorRGB=(0,255,0),CursorDarkRGB=(0,50,0),StartingLineFeed=1,TypeSpeed=TerminalTypeSpeed,ScrollSpeed=TerminalTypeSpeed)
LED.ScreenArray,CursorH,CursorV = LED.TerminalScroll(LED.ScreenArray,".........................",CursorH=CursorH,CursorV=CursorV,MessageRGB=(0,100,0),CursorRGB=(0,255,0),CursorDarkRGB=(0,50,0),StartingLineFeed=1,TypeSpeed=0.025,ScrollSpeed=ScrollSleep)
LED.ScreenArray,CursorH,CursorV = LED.TerminalScroll(LED.ScreenArray,"ACTIVATING SENTINEL PROGRAMS",CursorH=CursorH,CursorV=CursorV,MessageRGB=(0,100,0),CursorRGB=(0,255,0),CursorDarkRGB=(0,50,0),StartingLineFeed=1,TypeSpeed=TerminalTypeSpeed,ScrollSpeed=TerminalTypeSpeed)
LED.ScreenArray,CursorH,CursorV = LED.TerminalScroll(LED.ScreenArray,".........................",CursorH=CursorH,CursorV=CursorV,MessageRGB=(0,100,0),CursorRGB=(0,255,0),CursorDarkRGB=(0,50,0),StartingLineFeed=1,TypeSpeed=TerminalTypeSpeed,ScrollSpeed=ScrollSleep)
LED.ScreenArray,CursorH,CursorV = LED.TerminalScroll(LED.ScreenArray,"SENTINEL ACTIVE AND AWAITING FURTHER INSTRUCTIONS",CursorH=CursorH,CursorV=CursorV,MessageRGB=(0,100,0),CursorRGB=(0,255,0),CursorDarkRGB=(0,50,0),StartingLineFeed=1,TypeSpeed=0.005,ScrollSpeed=ScrollSleep)
LED.ScreenArray,CursorH,CursorV = LED.TerminalScroll(LED.ScreenArray,".........................",CursorH=CursorH,CursorV=CursorV,MessageRGB=(0,100,0),CursorRGB=(0,255,0),CursorDarkRGB=(0,50,0),StartingLineFeed=1,TypeSpeed=0.025,ScrollSpeed=ScrollSleep)
LED.ScreenArray,CursorH,CursorV = LED.TerminalScroll(LED.ScreenArray,"YOU ARE BEING WATCHED",CursorH=CursorH,CursorV=CursorV,MessageRGB=(200,000,0),CursorRGB=(0,255,0),CursorDarkRGB=(0,50,0),StartingLineFeed=1,TypeSpeed=0.005,ScrollSpeed=ScrollSleep)
LED.ScreenArray,CursorH,CursorV = LED.TerminalScroll(LED.ScreenArray,".........................",CursorH=CursorH,CursorV=CursorV,MessageRGB=(0,100,0),CursorRGB=(0,255,0),CursorDarkRGB=(0,50,0),StartingLineFeed=1,TypeSpeed=0.025,ScrollSpeed=ScrollSleep)
LED.BlinkCursor(CursorH= CursorH,CursorV=CursorV,CursorRGB=CursorRGB,CursorDarkRGB=CursorDarkRGB,BlinkSpeed=0.5,BlinkCount=2)
#IPAddress = LED.ShowIPAddress(Wait=5)
while (1==1):
LED.StarryNightDisplayText(
Text1 = "METROPOLIS DREAMWARE",
Text2 = "RESEARCH AND DEVELOPMENT DEPARTMENT",
Text3 = "THIS IS A CLASSIFIED RESEARCH FACILITY. ACCESS DENIED!",
RunSeconds = 60
)