-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
268 lines (226 loc) · 7.5 KB
/
index.html
File metadata and controls
268 lines (226 loc) · 7.5 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DASH-BRC</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background-color: #000000;
color: #00ff00;
font-family: 'Courier New', monospace;
overflow: hidden;
position: relative;
}
.matrix-bg {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
opacity: 0.3;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
z-index: 1;
position: relative;
}
.header {
text-align: center;
margin-bottom: 30px;
padding: 20px;
border: 2px solid #00ff00;
border-radius: 10px;
background: rgba(0, 255, 0, 0.1);
box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}
h1 {
font-size: 2.5em;
text-shadow: 0 0 10px #00ff00;
margin-bottom: 10px;
}
.status {
font-size: 1.2em;
margin: 10px 0;
}
.online {
color: #00ff00;
animation: pulse 2s infinite;
}
.offline {
color: #ff0000;
}
.wifi-status {
color: #ffff00;
}
@keyframes pulse {
0% { opacity: 1; }
50% { opacity: 0.5; }
100% { opacity: 1; }
}
.panel {
display: flex;
gap: 20px;
margin-bottom: 20px;
flex-wrap: wrap;
}
.serial-output, .serial-input {
flex: 1;
min-width: 300px;
border: 1px solid #00ff00;
border-radius: 5px;
padding: 15px;
background: rgba(0, 0, 0, 0.8);
}
.serial-output {
height: 400px;
overflow-y: auto;
font-size: 0.9em;
line-height: 1.4;
}
.serial-input textarea {
width: 100%;
height: 100px;
background: #000000;
color: #00ff00;
border: 1px solid #00ff00;
padding: 10px;
font-family: 'Courier New', monospace;
resize: vertical;
}
.controls {
display: flex;
gap: 10px;
margin-top: 10px;
}
button {
background: #000000;
color: #00ff00;
border: 1px solid #00ff00;
padding: 10px 20px;
cursor: pointer;
font-family: 'Courier New', monospace;
transition: all 0.3s;
}
button:hover {
background: #00ff00;
color: #000000;
box-shadow: 0 0 10px #00ff00;
}
.clear-btn {
background: #003300;
}
.send-btn {
background: #002200;
}
.connection-info {
text-align: center;
margin-top: 20px;
padding: 10px;
border-top: 1px solid #00ff00;
}
.ip-address {
font-size: 1.3em;
color: #00ffff;
margin: 10px 0;
text-shadow: 0 0 5px #00ffff;
}
/* Efeito de chuva Matrix */
.matrix-rain {
position: absolute;
top: -50px;
animation: fall linear infinite;
color: #00ff00;
text-shadow: 0 0 5px #00ff00;
font-size: 18px;
}
@keyframes fall {
to {
top: 100vh;
}
}
</style>
</head>
<body>
<div class="matrix-bg" id="matrixBg"></div>
<div class="container">
<div class="header">
<h1>KRLH QUE COISA LINDA</h1>
<div class="status">
WiFi: <span id="wifiStatus" class="wifi-status">CONECTANDO...</span>
</div>
<div class="ip-address" id="ipAddress">
IP: Conectando...
</div>
<div class="status">
Dados Recebidos: <span id="byteCount">0</span> bytes
</div>
</div>
<div class="panel">
<div class="serial-output">
<h3>DADOS RECEBIDOS DA SERIAL:</h3>
<div id="output" style="margin-top: 10px;"></div>
</div>
<div class="serial-input">
<h3>ENVIAR DADOS PARA SERIAL:</h3>
<textarea id="inputText" placeholder="Digite os dados para enviar..."></textarea>
<div class="controls">
<button class="send-btn" onclick="sendData()">ENVIAR</button>
<button class="clear-btn" onclick="clearOutput()">LIMPAR</button>
</div>
</div>
</div>
<div class="connection-info">
<p>Conectado via WebSocket - Taxa de atualização: <span id="fps">0</span> FPS</p>
<p>Serial: RX=GPIO33, TX=GPIO34, Baudrate=115200</p>
<p>Rede: <span id="wifiName">Carregando...</span></p>
</div>
</div>
<script>
let ws;
let byteCount = 0;
let frameCount = 0;
let lastFpsUpdate = 0;
let matrixChars = "01アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲン";
function clearOutput() {
document.getElementById('output').innerHTML = '';
byteCount = 0;
document.getElementById('byteCount').textContent = '0';
}
// Efeito Matrix background
function createMatrixRain() {
const bg = document.getElementById('matrixBg');
for (let i = 0; i < 50; i++) {
const drop = document.createElement('div');
drop.className = 'matrix-rain';
drop.textContent = matrixChars.charAt(Math.floor(Math.random() * matrixChars.length));
drop.style.left = Math.random() * 100 + 'vw';
drop.style.animationDuration = (Math.random() * 3 + 2) + 's';
drop.style.animationDelay = Math.random() * 5 + 's';
drop.style.opacity = Math.random() * 0.5 + 0.2;
bg.appendChild(drop);
}
}
// Enviar com Enter (Ctrl+Enter para nova linha)
document.getElementById('inputText').addEventListener('keydown', function(e) {
if (e.key === 'Enter' && !e.ctrlKey) {
e.preventDefault();
sendData();
}
});
// Atualizar informações periodicamente
// Inicializar
window.onload = function() {
createMatrixRain();
};
</script>
</body>
</html>