privateuserh commited on
Commit
b333ccc
·
verified ·
1 Parent(s): beb69c4

Add 2 files

Browse files
Files changed (2) hide show
  1. index.html +337 -41
  2. prompts.txt +2 -1
index.html CHANGED
@@ -3,7 +3,7 @@
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>EV Charging Station with Solar</title>
7
  <script src="https://cdn.tailwindcss.com"></script>
8
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
  <style>
@@ -44,7 +44,27 @@
44
  background-color: #374151;
45
  color: #9ca3af;
46
  }
47
- .solar-tooltip {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  position: absolute;
49
  right: 70px;
50
  top: 50%;
@@ -59,7 +79,8 @@
59
  transition: all 0.3s ease;
60
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
61
  }
62
- .solar-btn:hover .solar-tooltip {
 
63
  opacity: 1;
64
  right: 80px;
65
  }
@@ -68,19 +89,67 @@
68
  50% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.8); }
69
  100% { box-shadow: 0 0 10px rgba(245, 158, 11, 0.5); }
70
  }
 
 
 
 
 
71
  .solar-glow {
72
  animation: solar-glow 2s infinite;
73
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  </style>
75
  </head>
76
  <body class="bg-gray-900 text-white min-h-screen flex items-center justify-center p-4">
77
  <div class="max-w-md w-full bg-gray-800 rounded-3xl overflow-hidden shadow-2xl relative">
78
- <!-- Solar Indicator -->
79
- <div class="absolute top-4 right-4 flex items-center">
80
  <div class="relative">
81
  <div id="solar-indicator" class="w-3 h-3 rounded-full bg-gray-500 mr-2"></div>
82
  <span class="text-xs text-gray-400">SOLAR</span>
83
  </div>
 
 
 
 
84
  </div>
85
 
86
  <!-- Display Screen -->
@@ -104,7 +173,7 @@
104
  <div class="w-full bg-gray-700 h-4 rounded-full mb-4">
105
  <div id="charge-progress" class="progress-bar bg-green-500 h-4 rounded-full" style="width: 0%"></div>
106
  </div>
107
- <div class="grid grid-cols-2 gap-4 w-full">
108
  <div class="bg-gray-800 p-3 rounded-lg">
109
  <div class="text-xs text-gray-400">VOLTAGE</div>
110
  <div class="text-xl font-mono" id="voltage-display">230V</div>
@@ -113,6 +182,10 @@
113
  <div class="text-xs text-gray-400">POWER</div>
114
  <div class="text-xl font-mono" id="power-display">3.68kW</div>
115
  </div>
 
 
 
 
116
  </div>
117
  </div>
118
  </div>
@@ -162,12 +235,20 @@
162
  <i class="fas fa-battery-three-quarters mr-1"></i>
163
  <span id="battery-percent">0%</span>
164
  </div>
 
 
 
 
165
  </div>
166
  <div id="cost-display" class="text-gray-300">Cost: $0.00</div>
167
  <div id="solar-usage" class="text-yellow-400 mt-1 hidden">
168
  <i class="fas fa-solar-panel mr-1"></i>
169
  <span>Using Solar: <span id="solar-percentage">0</span>%</span>
170
  </div>
 
 
 
 
171
  </div>
172
  </div>
173
  </div>
@@ -175,13 +256,63 @@
175
  <!-- Floating Solar Button -->
176
  <button id="solar-btn" class="solar-btn inactive w-16 h-16 rounded-full flex items-center justify-center text-2xl">
177
  <i class="fas fa-solar-panel"></i>
178
- <div class="solar-tooltip text-sm">
179
  <div class="font-bold mb-1">Solar Bank</div>
180
  <div id="solar-capacity">Current capacity: 0%</div>
181
  <div>Automatically activates when solar is available</div>
182
  </div>
183
  </button>
184
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
185
  <script>
186
  // Update time
187
  function updateTime() {
@@ -192,6 +323,9 @@
192
 
193
  // Simulate solar capacity based on time of day
194
  updateSolarCapacity(hours);
 
 
 
195
  }
196
  setInterval(updateTime, 60000);
197
  updateTime();
@@ -206,55 +340,104 @@
206
  const solarPercentage = document.getElementById('solar-percentage');
207
  const solarCapacityDisplay = document.getElementById('solar-capacity');
208
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  function updateSolarCapacity(hour) {
210
- // Simulate solar capacity curve throughout the day
211
  const hourNum = parseInt(hour);
212
 
213
  if (hourNum >= 5 && hourNum < 7) {
214
- // Sunrise
215
  solarCapacity = 20 + (hourNum - 5) * 15;
216
  } else if (hourNum >= 7 && hourNum < 12) {
217
- // Morning
218
  solarCapacity = 50 + (hourNum - 7) * 10;
219
  } else if (hourNum >= 12 && hourNum < 15) {
220
- // Midday peak
221
  solarCapacity = 90 + (hourNum - 12) * 3;
222
  } else if (hourNum >= 15 && hourNum < 19) {
223
- // Afternoon decline
224
  solarCapacity = 90 - (hourNum - 15) * 15;
225
  } else if (hourNum >= 19 && hourNum < 21) {
226
- // Sunset
227
  solarCapacity = 30 - (hourNum - 19) * 15;
228
  } else {
229
- // Night
230
  solarCapacity = 0;
231
  }
232
 
233
- // Ensure capacity is within bounds
234
  solarCapacity = Math.max(0, Math.min(100, solarCapacity));
235
-
236
- // Update display
237
  solarCapacityDisplay.textContent = `Current capacity: ${Math.round(solarCapacity)}%`;
238
 
239
- // Automatically toggle solar based on capacity
240
  if (solarCapacity >= 30 && !solarAvailable) {
241
  enableSolar();
242
  } else if (solarCapacity < 30 && solarAvailable) {
243
  disableSolar();
244
  }
245
 
246
- // If solar is active, update the usage percentage
247
  if (usingSolar) {
248
  const solarUsagePercent = Math.min(100, Math.floor(solarCapacity / 2));
249
  solarPercentage.textContent = solarUsagePercent;
250
 
251
- // If solar drops too low, switch back to grid
252
  if (solarUsagePercent < 10) {
253
  disableSolarUsage();
 
 
 
 
254
  }
255
  }
256
  }
257
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
258
  function enableSolar() {
259
  solarAvailable = true;
260
  solarBtn.classList.remove('inactive');
@@ -277,26 +460,87 @@
277
 
278
  usingSolar = true;
279
  solarUsageDisplay.classList.remove('hidden');
280
-
281
- // Reduce cost when using solar
282
- costPerKwh = 0.07; // Reduced cost when using solar
283
-
284
- // Visual feedback
285
  solarBtn.classList.add('animate-pulse');
286
  }
287
 
288
  function disableSolarUsage() {
289
  usingSolar = false;
290
  solarUsageDisplay.classList.add('hidden');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
291
 
292
  // Restore normal cost
293
- costPerKwh = 0.15;
 
 
 
 
 
 
 
 
 
 
294
 
295
- // Visual feedback
296
- solarBtn.classList.remove('animate-pulse');
 
 
 
 
 
 
 
 
297
  }
298
 
299
- // Toggle solar usage when button is clicked
 
 
 
 
 
 
 
 
 
 
300
  solarBtn.addEventListener('click', () => {
301
  if (!solarAvailable) return;
302
 
@@ -304,8 +548,54 @@
304
  disableSolarUsage();
305
  } else {
306
  enableSolarUsage();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
307
  }
308
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
309
 
310
  // Amperage control
311
  const ampRange = document.getElementById('amp-range');
@@ -320,8 +610,7 @@
320
  selectedAmp.textContent = `${ampValue}A`;
321
  currentAmp.textContent = `${ampValue}A`;
322
 
323
- // Calculate power (P = V * I)
324
- const voltage = 230; // Standard voltage
325
  const power = (voltage * ampValue / 1000).toFixed(2);
326
  powerDisplay.textContent = `${power}kW`;
327
  }
@@ -350,8 +639,8 @@
350
  let chargingInterval;
351
  let currentCharge = 0;
352
  let isCharging = false;
353
- const batteryCapacity = 75; // kWh (typical EV battery)
354
- let costPerKwh = 0.15; // $ per kWh (default to grid power)
355
 
356
  function startCharging() {
357
  if (isCharging) return;
@@ -361,14 +650,16 @@
361
  chargeStatus.classList.add('text-green-500', 'charging-pulse');
362
  chargeStatus.classList.remove('text-gray-400');
363
 
364
- // Auto-enable solar if available and not already using it
365
  if (solarAvailable && !usingSolar && solarCapacity >= 50) {
366
  enableSolarUsage();
 
 
367
  }
368
 
369
  const ampValue = parseInt(ampRange.value);
370
- const power = 230 * ampValue / 1000; // kW
371
- const chargeRate = power / batteryCapacity * 100; // % per second (simplified)
372
 
373
  let cost = 0;
374
  let secondsCharged = 0;
@@ -378,17 +669,21 @@
378
  chargeProgress.style.width = `${currentCharge}%`;
379
  batteryPercent.textContent = `${Math.floor(currentCharge)}%`;
380
 
381
- // Calculate time remaining
382
  secondsCharged++;
383
  const remainingSeconds = Math.floor((100 - currentCharge) / chargeRate * 60);
384
  const hours = Math.floor(remainingSeconds / 3600);
385
  const minutes = Math.floor((remainingSeconds % 3600) / 60);
386
  timeRemaining.textContent = `${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}`;
387
 
388
- // Calculate cost
389
  cost += power * costPerKwh / 3600;
390
  costDisplay.textContent = `Cost: $${cost.toFixed(2)}`;
391
 
 
 
 
 
 
 
392
  if (currentCharge >= 100) {
393
  stopCharging();
394
  chargeStatus.textContent = "CHARGE COMPLETE";
@@ -407,11 +702,12 @@
407
  startBtn.addEventListener('click', startCharging);
408
  stopBtn.addEventListener('click', stopCharging);
409
 
410
- // Initialize display
411
  updateAmperage();
412
-
413
- // Initial solar update
414
  updateSolarCapacity(new Date().getHours());
 
415
  </script>
416
  <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=privateuserh/privevdev-betav1-00" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
417
  </html>
 
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>EV Charging Station with Solar & Frequency Control</title>
7
  <script src="https://cdn.tailwindcss.com"></script>
8
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
  <style>
 
44
  background-color: #374151;
45
  color: #9ca3af;
46
  }
47
+ .frequency-btn {
48
+ position: fixed;
49
+ bottom: 110px;
50
+ right: 30px;
51
+ z-index: 50;
52
+ transition: all 0.3s ease;
53
+ box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
54
+ }
55
+ .frequency-btn:hover {
56
+ transform: translateY(-3px);
57
+ box-shadow: 0 15px 30px rgba(59, 130, 246, 0.4);
58
+ }
59
+ .frequency-btn.active {
60
+ background-color: #3b82f6;
61
+ color: white;
62
+ }
63
+ .frequency-btn.inactive {
64
+ background-color: #374151;
65
+ color: #9ca3af;
66
+ }
67
+ .tooltip {
68
  position: absolute;
69
  right: 70px;
70
  top: 50%;
 
79
  transition: all 0.3s ease;
80
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
81
  }
82
+ .solar-btn:hover .tooltip,
83
+ .frequency-btn:hover .tooltip {
84
  opacity: 1;
85
  right: 80px;
86
  }
 
89
  50% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.8); }
90
  100% { box-shadow: 0 0 10px rgba(245, 158, 11, 0.5); }
91
  }
92
+ @keyframes frequency-glow {
93
+ 0% { box-shadow: 0 0 10px rgba(59, 130, 246, 0.5); }
94
+ 50% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.8); }
95
+ 100% { box-shadow: 0 0 10px rgba(59, 130, 246, 0.5); }
96
+ }
97
  .solar-glow {
98
  animation: solar-glow 2s infinite;
99
  }
100
+ .frequency-glow {
101
+ animation: frequency-glow 2s infinite;
102
+ }
103
+ .frequency-indicator {
104
+ position: absolute;
105
+ top: -10px;
106
+ right: -10px;
107
+ background-color: #3b82f6;
108
+ color: white;
109
+ border-radius: 50%;
110
+ width: 24px;
111
+ height: 24px;
112
+ display: flex;
113
+ align-items: center;
114
+ justify-content: center;
115
+ font-size: 12px;
116
+ font-weight: bold;
117
+ }
118
+ .frequency-popup {
119
+ position: fixed;
120
+ bottom: 190px;
121
+ right: 30px;
122
+ width: 250px;
123
+ background: rgba(31, 41, 55, 0.95);
124
+ backdrop-filter: blur(10px);
125
+ border-radius: 15px;
126
+ padding: 15px;
127
+ box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
128
+ z-index: 60;
129
+ transform: scale(0.9);
130
+ opacity: 0;
131
+ pointer-events: none;
132
+ transition: all 0.3s ease;
133
+ }
134
+ .frequency-popup.active {
135
+ transform: scale(1);
136
+ opacity: 1;
137
+ pointer-events: all;
138
+ }
139
  </style>
140
  </head>
141
  <body class="bg-gray-900 text-white min-h-screen flex items-center justify-center p-4">
142
  <div class="max-w-md w-full bg-gray-800 rounded-3xl overflow-hidden shadow-2xl relative">
143
+ <!-- Solar/Frequency Indicator -->
144
+ <div class="absolute top-4 right-4 flex items-center space-x-3">
145
  <div class="relative">
146
  <div id="solar-indicator" class="w-3 h-3 rounded-full bg-gray-500 mr-2"></div>
147
  <span class="text-xs text-gray-400">SOLAR</span>
148
  </div>
149
+ <div class="relative">
150
+ <div id="frequency-indicator" class="w-3 h-3 rounded-full bg-gray-500 mr-2"></div>
151
+ <span class="text-xs text-gray-400">RF</span>
152
+ </div>
153
  </div>
154
 
155
  <!-- Display Screen -->
 
173
  <div class="w-full bg-gray-700 h-4 rounded-full mb-4">
174
  <div id="charge-progress" class="progress-bar bg-green-500 h-4 rounded-full" style="width: 0%"></div>
175
  </div>
176
+ <div class="grid grid-cols-3 gap-4 w-full">
177
  <div class="bg-gray-800 p-3 rounded-lg">
178
  <div class="text-xs text-gray-400">VOLTAGE</div>
179
  <div class="text-xl font-mono" id="voltage-display">230V</div>
 
182
  <div class="text-xs text-gray-400">POWER</div>
183
  <div class="text-xl font-mono" id="power-display">3.68kW</div>
184
  </div>
185
+ <div class="bg-gray-800 p-3 rounded-lg">
186
+ <div class="text-xs text-gray-400">FREQUENCY</div>
187
+ <div class="text-xl font-mono" id="frequency-display">-- GHz</div>
188
+ </div>
189
  </div>
190
  </div>
191
  </div>
 
235
  <i class="fas fa-battery-three-quarters mr-1"></i>
236
  <span id="battery-percent">0%</span>
237
  </div>
238
+ <div>
239
+ <i class="fas fa-wave-square mr-1"></i>
240
+ <span id="rf-efficiency">0%</span>
241
+ </div>
242
  </div>
243
  <div id="cost-display" class="text-gray-300">Cost: $0.00</div>
244
  <div id="solar-usage" class="text-yellow-400 mt-1 hidden">
245
  <i class="fas fa-solar-panel mr-1"></i>
246
  <span>Using Solar: <span id="solar-percentage">0</span>%</span>
247
  </div>
248
+ <div id="rf-usage" class="text-blue-400 mt-1 hidden">
249
+ <i class="fas fa-satellite-dish mr-1"></i>
250
+ <span>Using RF: <span id="rf-percentage">0</span>%</span>
251
+ </div>
252
  </div>
253
  </div>
254
  </div>
 
256
  <!-- Floating Solar Button -->
257
  <button id="solar-btn" class="solar-btn inactive w-16 h-16 rounded-full flex items-center justify-center text-2xl">
258
  <i class="fas fa-solar-panel"></i>
259
+ <div class="tooltip text-sm">
260
  <div class="font-bold mb-1">Solar Bank</div>
261
  <div id="solar-capacity">Current capacity: 0%</div>
262
  <div>Automatically activates when solar is available</div>
263
  </div>
264
  </button>
265
 
266
+ <!-- Floating Frequency Button -->
267
+ <button id="frequency-btn" class="frequency-btn inactive w-16 h-16 rounded-full flex items-center justify-center text-2xl relative">
268
+ <i class="fas fa-satellite-dish"></i>
269
+ <div class="frequency-indicator" id="frequency-value">0</div>
270
+ <div class="tooltip text-sm">
271
+ <div class="font-bold mb-1">RF Harvester</div>
272
+ <div id="frequency-status">Status: Inactive</div>
273
+ <div>300MHz - 300GHz range</div>
274
+ </div>
275
+ </button>
276
+
277
+ <!-- Frequency Control Popup -->
278
+ <div id="frequency-popup" class="frequency-popup">
279
+ <div class="flex justify-between items-center mb-3">
280
+ <h3 class="font-bold text-lg">RF Frequency Control</h3>
281
+ <button id="close-frequency" class="text-gray-400 hover:text-white">
282
+ <i class="fas fa-times"></i>
283
+ </button>
284
+ </div>
285
+ <div class="mb-4">
286
+ <div class="flex justify-between items-center mb-2">
287
+ <span class="text-gray-300">Frequency</span>
288
+ <span class="font-mono text-lg" id="selected-frequency">2.4 GHz</span>
289
+ </div>
290
+ <div class="flex items-center">
291
+ <button id="decrease-freq" class="knob bg-gray-700 hover:bg-gray-600 w-10 h-10 rounded-full flex items-center justify-center mr-2">
292
+ <i class="fas fa-minus"></i>
293
+ </button>
294
+ <input type="range" id="freq-range" min="300" max="300000" value="2400" step="100" class="flex-1 h-2 bg-gray-700 rounded-lg appearance-none cursor-pointer">
295
+ <button id="increase-freq" class="knob bg-gray-700 hover:bg-gray-600 w-10 h-10 rounded-full flex items-center justify-center ml-2">
296
+ <i class="fas fa-plus"></i>
297
+ </button>
298
+ </div>
299
+ <div class="flex justify-between text-xs text-gray-400 mt-1">
300
+ <span>300 MHz</span>
301
+ <span>300 GHz</span>
302
+ </div>
303
+ </div>
304
+ <div class="mb-4">
305
+ <div class="flex justify-between items-center mb-2">
306
+ <span class="text-gray-300">Power Level</span>
307
+ <span class="font-mono text-lg" id="selected-power">50%</span>
308
+ </div>
309
+ <input type="range" id="power-range" min="0" max="100" value="50" step="5" class="w-full h-2 bg-gray-700 rounded-lg appearance-none cursor-pointer">
310
+ </div>
311
+ <button id="toggle-frequency" class="w-full bg-blue-600 hover:bg-blue-700 py-2 px-4 rounded-lg font-bold flex items-center justify-center">
312
+ <i class="fas fa-power-off mr-2"></i> ACTIVATE RF
313
+ </button>
314
+ </div>
315
+
316
  <script>
317
  // Update time
318
  function updateTime() {
 
323
 
324
  // Simulate solar capacity based on time of day
325
  updateSolarCapacity(hours);
326
+
327
+ // Simulate RF availability
328
+ updateRFAvailability();
329
  }
330
  setInterval(updateTime, 60000);
331
  updateTime();
 
340
  const solarPercentage = document.getElementById('solar-percentage');
341
  const solarCapacityDisplay = document.getElementById('solar-capacity');
342
 
343
+ // RF Frequency simulation
344
+ let rfAvailable = false;
345
+ let rfActive = false;
346
+ let rfEfficiency = 0;
347
+ let usingRF = false;
348
+ const frequencyBtn = document.getElementById('frequency-btn');
349
+ const frequencyIndicator = document.getElementById('frequency-indicator');
350
+ const frequencyValue = document.getElementById('frequency-value');
351
+ const frequencyStatus = document.getElementById('frequency-status');
352
+ const frequencyDisplay = document.getElementById('frequency-display');
353
+ const rfUsageDisplay = document.getElementById('rf-usage');
354
+ const rfPercentage = document.getElementById('rf-percentage');
355
+ const rfEfficiencyDisplay = document.getElementById('rf-efficiency');
356
+ const frequencyPopup = document.getElementById('frequency-popup');
357
+
358
+ // Frequency control variables
359
+ let currentFrequency = 2400; // MHz
360
+ let currentPowerLevel = 50; // %
361
+ const freqRange = document.getElementById('freq-range');
362
+ const powerRange = document.getElementById('power-range');
363
+ const selectedFrequency = document.getElementById('selected-frequency');
364
+ const selectedPower = document.getElementById('selected-power');
365
+ const toggleFrequencyBtn = document.getElementById('toggle-frequency');
366
+
367
  function updateSolarCapacity(hour) {
 
368
  const hourNum = parseInt(hour);
369
 
370
  if (hourNum >= 5 && hourNum < 7) {
 
371
  solarCapacity = 20 + (hourNum - 5) * 15;
372
  } else if (hourNum >= 7 && hourNum < 12) {
 
373
  solarCapacity = 50 + (hourNum - 7) * 10;
374
  } else if (hourNum >= 12 && hourNum < 15) {
 
375
  solarCapacity = 90 + (hourNum - 12) * 3;
376
  } else if (hourNum >= 15 && hourNum < 19) {
 
377
  solarCapacity = 90 - (hourNum - 15) * 15;
378
  } else if (hourNum >= 19 && hourNum < 21) {
 
379
  solarCapacity = 30 - (hourNum - 19) * 15;
380
  } else {
 
381
  solarCapacity = 0;
382
  }
383
 
 
384
  solarCapacity = Math.max(0, Math.min(100, solarCapacity));
 
 
385
  solarCapacityDisplay.textContent = `Current capacity: ${Math.round(solarCapacity)}%`;
386
 
 
387
  if (solarCapacity >= 30 && !solarAvailable) {
388
  enableSolar();
389
  } else if (solarCapacity < 30 && solarAvailable) {
390
  disableSolar();
391
  }
392
 
 
393
  if (usingSolar) {
394
  const solarUsagePercent = Math.min(100, Math.floor(solarCapacity / 2));
395
  solarPercentage.textContent = solarUsagePercent;
396
 
 
397
  if (solarUsagePercent < 10) {
398
  disableSolarUsage();
399
+ // If solar is depleted, try to activate RF if available
400
+ if (rfAvailable && !rfActive) {
401
+ activateRF();
402
+ }
403
  }
404
  }
405
  }
406
 
407
+ function updateRFAvailability() {
408
+ // Simulate RF availability (random for demo purposes)
409
+ rfAvailable = Math.random() > 0.3; // 70% chance of availability
410
+
411
+ if (rfAvailable) {
412
+ // Calculate efficiency based on frequency and power level
413
+ rfEfficiency = Math.min(100, Math.floor(
414
+ (currentPowerLevel / 100) *
415
+ (Math.min(1, currentFrequency / 10000)) * // Higher frequencies have better efficiency
416
+ 80 // Max efficiency
417
+ ));
418
+
419
+ if (!rfActive) {
420
+ frequencyBtn.classList.remove('inactive');
421
+ frequencyBtn.classList.add('active');
422
+ frequencyIndicator.classList.remove('bg-gray-500');
423
+ frequencyIndicator.classList.add('bg-blue-400');
424
+ frequencyStatus.textContent = "Status: Available";
425
+ }
426
+ } else {
427
+ rfEfficiency = 0;
428
+ if (rfActive) {
429
+ deactivateRF();
430
+ }
431
+ frequencyBtn.classList.remove('active', 'frequency-glow');
432
+ frequencyBtn.classList.add('inactive');
433
+ frequencyIndicator.classList.remove('bg-blue-400');
434
+ frequencyIndicator.classList.add('bg-gray-500');
435
+ frequencyStatus.textContent = "Status: Unavailable";
436
+ }
437
+
438
+ rfEfficiencyDisplay.textContent = `${rfEfficiency}%`;
439
+ }
440
+
441
  function enableSolar() {
442
  solarAvailable = true;
443
  solarBtn.classList.remove('inactive');
 
460
 
461
  usingSolar = true;
462
  solarUsageDisplay.classList.remove('hidden');
463
+ costPerKwh = 0.07;
 
 
 
 
464
  solarBtn.classList.add('animate-pulse');
465
  }
466
 
467
  function disableSolarUsage() {
468
  usingSolar = false;
469
  solarUsageDisplay.classList.add('hidden');
470
+ costPerKwh = 0.15;
471
+ solarBtn.classList.remove('animate-pulse');
472
+ }
473
+
474
+ function activateRF() {
475
+ if (!rfAvailable) return;
476
+
477
+ rfActive = true;
478
+ usingRF = true;
479
+ rfUsageDisplay.classList.remove('hidden');
480
+ rfPercentage.textContent = rfEfficiency;
481
+ frequencyBtn.classList.add('frequency-glow');
482
+ toggleFrequencyBtn.innerHTML = '<i class="fas fa-power-off mr-2"></i> DEACTIVATE RF';
483
+ frequencyStatus.textContent = "Status: Active";
484
+
485
+ // Update main display
486
+ const displayFreq = currentFrequency >= 1000 ?
487
+ `${(currentFrequency/1000).toFixed(1)} GHz` :
488
+ `${currentFrequency} MHz`;
489
+ frequencyDisplay.textContent = displayFreq;
490
+ frequencyValue.textContent = Math.floor(currentFrequency/1000);
491
+
492
+ // If we're charging, reduce cost when using RF
493
+ if (isCharging) {
494
+ costPerKwh = 0.10; // Reduced cost when using RF
495
+ }
496
+ }
497
+
498
+ function deactivateRF() {
499
+ rfActive = false;
500
+ usingRF = false;
501
+ rfUsageDisplay.classList.add('hidden');
502
+ frequencyBtn.classList.remove('frequency-glow');
503
+ toggleFrequencyBtn.innerHTML = '<i class="fas fa-power-off mr-2"></i> ACTIVATE RF';
504
+ frequencyStatus.textContent = "Status: Available";
505
+ frequencyDisplay.textContent = "-- GHz";
506
+ frequencyValue.textContent = "0";
507
 
508
  // Restore normal cost
509
+ if (isCharging) {
510
+ costPerKwh = usingSolar ? 0.07 : 0.15;
511
+ }
512
+ }
513
+
514
+ // Frequency control functions
515
+ function updateFrequencyDisplay() {
516
+ const displayFreq = currentFrequency >= 1000 ?
517
+ `${(currentFrequency/1000).toFixed(1)} GHz` :
518
+ `${currentFrequency} MHz`;
519
+ selectedFrequency.textContent = displayFreq;
520
 
521
+ if (rfActive) {
522
+ frequencyDisplay.textContent = displayFreq;
523
+ frequencyValue.textContent = Math.floor(currentFrequency/1000);
524
+ }
525
+
526
+ // Update efficiency when frequency changes
527
+ updateRFAvailability();
528
+ if (rfActive) {
529
+ rfPercentage.textContent = rfEfficiency;
530
+ }
531
  }
532
 
533
+ function updatePowerDisplay() {
534
+ selectedPower.textContent = `${currentPowerLevel}%`;
535
+
536
+ // Update efficiency when power changes
537
+ updateRFAvailability();
538
+ if (rfActive) {
539
+ rfPercentage.textContent = rfEfficiency;
540
+ }
541
+ }
542
+
543
+ // Event listeners
544
  solarBtn.addEventListener('click', () => {
545
  if (!solarAvailable) return;
546
 
 
548
  disableSolarUsage();
549
  } else {
550
  enableSolarUsage();
551
+ // If RF was active, deactivate it
552
+ if (usingRF) {
553
+ deactivateRF();
554
+ }
555
+ }
556
+ });
557
+
558
+ frequencyBtn.addEventListener('click', () => {
559
+ frequencyPopup.classList.toggle('active');
560
+ });
561
+
562
+ document.getElementById('close-frequency').addEventListener('click', () => {
563
+ frequencyPopup.classList.remove('active');
564
+ });
565
+
566
+ toggleFrequencyBtn.addEventListener('click', () => {
567
+ if (rfActive) {
568
+ deactivateRF();
569
+ } else {
570
+ activateRF();
571
+ // If solar was active, deactivate it
572
+ if (usingSolar) {
573
+ disableSolarUsage();
574
+ }
575
  }
576
  });
577
+
578
+ freqRange.addEventListener('input', () => {
579
+ currentFrequency = parseInt(freqRange.value);
580
+ updateFrequencyDisplay();
581
+ });
582
+
583
+ powerRange.addEventListener('input', () => {
584
+ currentPowerLevel = parseInt(powerRange.value);
585
+ updatePowerDisplay();
586
+ });
587
+
588
+ document.getElementById('decrease-freq').addEventListener('click', () => {
589
+ freqRange.value = Math.max(300, parseInt(freqRange.value) - 100);
590
+ currentFrequency = parseInt(freqRange.value);
591
+ updateFrequencyDisplay();
592
+ });
593
+
594
+ document.getElementById('increase-freq').addEventListener('click', () => {
595
+ freqRange.value = Math.min(300000, parseInt(freqRange.value) + 100);
596
+ currentFrequency = parseInt(freqRange.value);
597
+ updateFrequencyDisplay();
598
+ });
599
 
600
  // Amperage control
601
  const ampRange = document.getElementById('amp-range');
 
610
  selectedAmp.textContent = `${ampValue}A`;
611
  currentAmp.textContent = `${ampValue}A`;
612
 
613
+ const voltage = 230;
 
614
  const power = (voltage * ampValue / 1000).toFixed(2);
615
  powerDisplay.textContent = `${power}kW`;
616
  }
 
639
  let chargingInterval;
640
  let currentCharge = 0;
641
  let isCharging = false;
642
+ const batteryCapacity = 75;
643
+ let costPerKwh = 0.15;
644
 
645
  function startCharging() {
646
  if (isCharging) return;
 
650
  chargeStatus.classList.add('text-green-500', 'charging-pulse');
651
  chargeStatus.classList.remove('text-gray-400');
652
 
653
+ // Auto-enable best available power source
654
  if (solarAvailable && !usingSolar && solarCapacity >= 50) {
655
  enableSolarUsage();
656
+ } else if (rfAvailable && !rfActive && solarCapacity < 30) {
657
+ activateRF();
658
  }
659
 
660
  const ampValue = parseInt(ampRange.value);
661
+ const power = 230 * ampValue / 1000;
662
+ const chargeRate = power / batteryCapacity * 100;
663
 
664
  let cost = 0;
665
  let secondsCharged = 0;
 
669
  chargeProgress.style.width = `${currentCharge}%`;
670
  batteryPercent.textContent = `${Math.floor(currentCharge)}%`;
671
 
 
672
  secondsCharged++;
673
  const remainingSeconds = Math.floor((100 - currentCharge) / chargeRate * 60);
674
  const hours = Math.floor(remainingSeconds / 3600);
675
  const minutes = Math.floor((remainingSeconds % 3600) / 60);
676
  timeRemaining.textContent = `${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}`;
677
 
 
678
  cost += power * costPerKwh / 3600;
679
  costDisplay.textContent = `Cost: $${cost.toFixed(2)}`;
680
 
681
+ // If solar is depleted during charging, try to switch to RF
682
+ if (usingSolar && solarCapacity < 10 && rfAvailable && !rfActive) {
683
+ disableSolarUsage();
684
+ activateRF();
685
+ }
686
+
687
  if (currentCharge >= 100) {
688
  stopCharging();
689
  chargeStatus.textContent = "CHARGE COMPLETE";
 
702
  startBtn.addEventListener('click', startCharging);
703
  stopBtn.addEventListener('click', stopCharging);
704
 
705
+ // Initialize displays
706
  updateAmperage();
707
+ updateFrequencyDisplay();
708
+ updatePowerDisplay();
709
  updateSolarCapacity(new Date().getHours());
710
+ updateRFAvailability();
711
  </script>
712
  <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=privateuserh/privevdev-betav1-00" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
713
  </html>
prompts.txt CHANGED
@@ -1 +1,2 @@
1
- Add a floating button for a solar bank it should automatically turn on and off based on capacity
 
 
1
+ Add a floating button for a solar bank it should automatically turn on and off based on capacity
2
+ Add a floating button corresponding to frequencies between 300 MHz and 300 GHzthats interoperable with turning on and off and initiates the solar bank when depleted and can be ready by the main panel to show charging status