testing expo arduinos

master
louisafriederike 1 year ago
parent d717d11419
commit 1f93bb80f6

@ -15,58 +15,56 @@
<meta property="og:description" content="EIXOGEN" /> <meta property="og:description" content="EIXOGEN" />
<meta property="og:image" content="" /> <meta property="og:image" content="" />
</head> </head>
<body> <!-- <img id="logo" src="img/logo.png"> <div class="profile"> <p id="title">Welcome to Eixogen, Sane! Take a deep breath.</p> <body>
<!-- <img id="logo" src="img/logo.png">-->
<div class="profile"> <p id="title">Welcome to Eixogen, "player name".</p>
<button >profile</button> <button >profile</button>
</div> --> <button >sign up</button>
<button >log in</button>
<div class="wrapper"> <div class="wrapper">
<div class="flex-container" > <div class="flex-container" >
<div class="flex-left">
<div>
<div class="flex-left"> <embed class ="embed" src="https://wttr.in/Rotterdam?T0">
<!-- <progress id="file" max="100" value="70"> 70% </progress> --> </div>
<div class="section" id="objective"><br><br><br><br>
<div> <p>~* *..* active trails ~~</p>
<embed class ="embed" src="https://wttr.in/Rotterdam?T0"> <button onclick="window.location.href='riddles.html';">~* *..* mechanical fireflies<br> ~~ by user [xx[[</button>
</div> <p>~* *..* eixogen phase 1: 15.09 ~ 01.10 ~~</p><!-- </div>
<div class="section" > <div class="section" id="chat-window">
<p>sleepwalker.mod = active</p> <p>~* *..* live chat ~~</p>
</div> <ul id="messages"></ul>
<div class="section-main"> <span><form id="form" action="">
<progress id="file" max="100" value="70"> 70% </progress> <input id="input" autocomplete="off"/><button onclick="sendMessage()">>>></button>
</form></span>
<p>sane__xx: 61100</p> </div>
<p>non-zero/: 56900</p> <div class="section" >
<p>wire3e3e3e: 54000</p> <p>users online: </p>
</div> <ul id="user-log"></ul>
<div class="section" id="chat-window"> </div>
<ul id="messages"></ul> <div class="section-main">
<span><form id="form" action=""> <p>~* *..* eixogen phase 1: 15.09 ~ 01.10 ~~</p>
<input id="input" autocomplete="off"/><button onclick="sendMessage()">>>></button> <progress id="file" max="100" value="10"> </progress>
</form></span> <p>~* *..* highscore ~~</p>
</div> <div class="section" > <p>sane__xxx: wallet: 61100 ETH * completed trails: 904</p>
<p>users online: </p> <p>non-zero/: wallet: 56900 ETH * completed trails: 633</p>
<ul id="user-log"></ul> <p>wire3e3ee: wallet: 54000 ETH * completed trails: 523</p>
</div> </div>
<div class="section-main"> <div class="section-main">
<progress id="file" max="100" value="70"> 70% </progress>-->
<!--highscore cheat code input--> <!--highscore cheat code input moved to riddles.html-->
<!--
<p>>>> CACHE CODE:<br><br></p> <!-- <p>>>> CACHE CODE:<br><br></p>
<span><form id="form" action=""> <span><form id="form" action="">
<input id="input" autocomplete="off" onkeyup="this.value = this.value.toUpperCase();"/><button onclick="sendMessage()">>>></button> <input id="input" autocomplete="off" onkeyup="this.value = this.value.toUpperCase();"/><button onclick="sendMessage()">>>></button>
</form><br><br></span> </form><br><br></span>
-->
<div class="section" id="objective"><br><br><br><br>
<p>OBJECTIVE:<br>You have lost your memory and wake up in a strange garage.</p>
</div>
</div>--> </div>
<!-- unused below --> <!-- unused below -->

@ -0,0 +1,216 @@
<!doctype html>
<html>
<head>
<title>eixogen</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="icon" href="img/favicon.ico" type="image/x-icon" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="style.css" rel="stylesheet">
<!-- <script src="js/p5.js"></script>
<script src="js/p5.geolocation.js"></script> -->
<script src='socket.io/socket.io.js'></script>
<meta property="og:title" content="EIXOGEN" />
<meta property="og:description" content="EIXOGEN" />
<meta property="og:image" content="" />
</head>
<body> <!-- <img id="logo" src="img/logo.png"> <div class="profile"> <p id="title">Welcome to Eixogen, Sane! Take a deep breath.</p>
<button >profile</button>
</div> --> <div class="profile"> <button onclick="window.location.href='index.html';">back to home<br></button></div>
<div class="wrapper">
<div class="flex-container" >
<div class="flex-left">
<!-- <progress id="file" max="100" value="70"> 70% </progress> -->
<div>
</div>
<div class="section-main">
<div class="section" id="objective"><br><br><br><br>
<p>mechanical fireflies</p>
<p>15.09 ~ 12.11</p>
<p>51.915909, 4.4778599</p>
</div>
<p>>>> CACHE CODE:<br><br></p>
<span><form id="form" action="">
<input id="input" autocomplete="off" onkeyup="this.value = this.value.toUpperCase();"/><button onclick="sendMessage()">>>></button>
</form><br><br></span>
</div>
<div class="section">
<p>description</p>
</div>
<!-- unused below -->
<div class="section" id="location-log">
<p id="log-text"></p>
</div>
<!-- <div class="section" id="nav-console">
<p>DISTANCE: <span id="distance">0</span> km</p>
<div id="tripmeter">
<p>Gateway 1:<br/>
<span id="startLat">???</span>&deg; <br><span id="startLon">???</span>&deg;
</p>
<p>Gateway 2:<br/>
<span id="startLat2">???</span>&deg; <br><span id="startLon2">???</span>&deg;
</p>
<p>
Status:<br/>
<span id="message2">detecting....</span>
</p>
<p>
Current Location:<br/>
<span id="currentLat">locating...</span>&deg; <br><span id="currentLon">locating...</span>&deg;
</p>
<p>
STATUS:
<span id="message">detecting....</span>
</p>
</div>
</div> -->
<div class="section" id="dreamlog">
<p></p>
</div>
<div class="section" id="back2" onclick="backAgain2()">
↪ log
</div>
<div class="section" id="log1">
<p onclick="log1Open()">LOG 1 03:02:00 02-04-22 PORT: 9.1.13.<br></p>
</div>
<div class="section" id="log2">
<p onclick="log2Open()">LOG 2 02:42:00 13-04-22 PORT: 16.18.15.<br></p>
</div>
<div class="section" id="log3">
<p onclick="log3Open()">LOG 3 03:36:00 25-04-22 PORT: 20.5.3.<br></p>
</div>
<div class="section" id="log4">
<p onclick="log4Open()">LOG 4 03:86:00 07-05-22 PORT: 20.15.18<br></p>
</div>
<div class="section" id="log5">
<p onclick="log5Open()">LOG 5 06:86:00 17-05-22 PORT: 868<br></p>
</div>
<div class="section" id="log">
<p id="info"></p>
</div>
<div class="section" id="back" onclick="backAgain()">
</div>
</div>
<div class="flex-right">
</div>
</div>
</div>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
</body>
<script>
const socket = io();
const activeUsers = [];
updateActiveUsers(); // Call it here to show active users on page load
socket.on('node-data', function(data) {
console.log(data);
// Split the data into separate parts
const [node, value] = data.split(' ');
document.getElementById('log-text').textContent = `user ${value} entered zone ${node}`;
if (node === '3' && value === '15') {
// Change the background color to red
document.body.style.backgroundColor = 'red';
document.getElementById('location-log').style.display = 'block';
} else if (node === 'node4' && value === '21') {
// Change the background color to blue
document.body.style.backgroundColor = 'blue';
} else {
// Restore the default background color
document.body.style.backgroundColor = rgb(26, 26, 26);
}
});
//testing socket message from textinput field to arduino
var messages = document.getElementById('messages');
var chatHistory = localStorage.getItem('chatHistory');
if (chatHistory) {
messages.innerHTML = chatHistory;
}
function sendMessage() {
const inputField = document.getElementById('input');
const message = inputField.value;
var item = document.createElement('li');
item.textContent = message;
item.className = 'me';
messages.appendChild(item);
inputField.value = '';
socket.emit('chat message', message);
messages.scrollTop = messages.scrollHeight;
localStorage.setItem('chatHistory', messages.innerHTML);
}
socket.on('chat message', function(msg) {
var item = document.createElement('li');
item.textContent = msg;
item.className = 'others';
messages.appendChild(item);
messages.scrollTop = messages.scrollHeight - messages.clientHeight;
});
socket.on('connect', function() {
// Add the current socket ID to the activeUsers array
activeUsers.push(socket.id);
updateActiveUsers();
});
socket.on('disconnect', function() {
// Remove the disconnected socket ID from the activeUsers array
const index = activeUsers.indexOf(socket.id);
if (index !== -1) {
activeUsers.splice(index, 1);
updateActiveUsers();
}
});
function updateActiveUsers() {
const userLog = document.getElementById('user-log');
userLog.textContent = activeUsers.join(', ');
}
</script>
<script type="text/javascript" src="js/input.js"></script>
</html>

@ -19,7 +19,7 @@ body {
font: 1.0em/1.6 'Inconsolata', monospace; font: 1.0em/1.6 'Inconsolata', monospace;
color: #c9cdc0; color: #c9cdc0;
font-weight: 400; font-weight: 400;
background-color: #000; background-color: #736c9f;
text-shadow: #FF4800; text-shadow: #FF4800;
/* overflow-y: hidden; /* overflow-y: hidden;
overflow-x: hidden; */ overflow-x: hidden; */
@ -150,7 +150,7 @@ body {
} }
button{ button{
background-color: #b8bfb7; background-color: #bd3e00;
font: 1.2em/1.6 'Inconsolata', monospace; font: 1.2em/1.6 'Inconsolata', monospace;
color:black; color:black;
border-radius: 5px; border-radius: 5px;
@ -321,7 +321,7 @@ button:active{
padding: 5px; padding: 5px;
margin-bottom:6px; margin-bottom:6px;
color: rgb(37, 37, 37); color: rgb(37, 37, 37);
background-color: #e1e631ed; background-color: #a5bad5ed;
} }
.flex-container2 { .flex-container2 {

Loading…
Cancel
Save