master
louisa 2 years ago
commit da4b575ef9

@ -0,0 +1,55 @@
#include <SPI.h>
#include <LoRa.h>
#define LORA_SS_PIN 10
#define LORA_RST_PIN 9
#define LORA_DI0_PIN 2
void setup() {
Serial.begin(9600);
while (!Serial);
pinMode(LED_BUILTIN, OUTPUT);
// Initialize LoRa module
LoRa.setPins(LORA_SS_PIN, LORA_RST_PIN, LORA_DI0_PIN);
if (!LoRa.begin(433E6)) {
Serial.println("LoRa initialization failed. Check your wiring!");
while (true);
}
// Connect to WiFi or Ethernet here
// Connect to Socket.IO server
// Replace <SERVER_ADDRESS> with the actual server address
// e.g., http://localhost:3000
// Replace <TOKEN> with an authentication token if required
// e.g., "?token=abcd1234"
//socketIO.connect("<SERVER_ADDRESS><TOKEN>");
}
void loop() {
// Handle Socket.IO events or other tasks here
// Check for incoming LoRa messages
int packetSize = LoRa.parsePacket();
if (packetSize) {
while (LoRa.available()) {
String message = LoRa.readString();
Serial.println("Received message: " + message);
// Process the received message and control the LED
if (message == "led_on") {
digitalWrite(LED_BUILTIN, HIGH); // Turn on the LED
LoRa.beginPacket();
LoRa.print("ack");
LoRa.endPacket();
} else if (message == "led_off") {
digitalWrite(LED_BUILTIN, LOW); // Turn off the LED
LoRa.beginPacket();
LoRa.print("ack");
LoRa.endPacket();
}
}
}
}

@ -1,405 +0,0 @@
<!doctype html>
<html>
<head>
<title>868mhz.net</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="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.4.0/socket.io.js"></script>
<script>
const socket = io();
// Listen for custom events from the server
socket.on('node-data', function(data) {
console.log(data); // Log the received data to the browser's console
});
</script>
<script src='socket.io/socket.io.js'></script>
<meta property="og:title" content="868 MHz" />
<meta property="og:description" content="868 MHz is a hybrid reality game running on the same standardized frequency as the LoRa gateways of The Things Network. Chase the electric currents of the asphalt to locate gateways and encounter a being which has nested itself beneath the city streets, all the way down the power lines woven amidst its whirring epicenter." />
<meta property="og:image" content="/img/868.png" />
</head>
<body>
<div class="wrapper">
<div class="flex-container">
<div class="flex-left">
<div class="section">
<!-- <progress id="file" max="100" value="70"> 70% </progress> -->
<p>>>> PORT:</p>
<span><form id="form" action="">
<input id="input" autocomplete="off" onkeyup="this.value = this.value.toUpperCase();"/><button>>>></button>
</form></span>
</div>
<div class="section" id="dreammap">
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
viewBox="0 0 585.85067 538.28672"
version="1.1"
id="svg55"
sodipodi:docname="map-markers.svg"
inkscape:version="1.2 (dc2aedaf03, 2022-05-15)"
inkscape:export-filename="map-markers.svg"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
width="585.85065"
height="538.28674"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview57"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
showgrid="true"
inkscape:zoom="1.4936741"
inkscape:cx="196.16059"
inkscape:cy="265.45282"
inkscape:window-width="1920"
inkscape:window-height="991"
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="svg55">
<inkscape:grid
type="xygrid"
id="grid216" />
</sodipodi:namedview>
<defs
id="defs4">
<style
id="style2">.d,.e,.f{stroke:#ff2400;}.d,.e,.f,.g{stroke-miterlimit:10;}.d,.e,.g{fill:none;}.d,.f,.g{stroke-width:3px;}.h{stroke:black; stroke-width:3px; fill:rgb(129, 135, 121)}.g{stroke:#ff4000;}</style>
</defs>
<g
id="a"
transform="translate(0.0115319,-0.00253224)">
<polyline
class="g"
points="87.82 122.2 63.34 203.7 72.28 223.48 163.97 248.25 164.15 258.87 76.93 338.79 66.46 358.91 70.18 417.99"
id="polyline6" />
<polyline
class="g"
points="86.77 449.18 151.91 457.36 171.85 457.36 251.82 398.43 266.28 404.53 335.26 463.55 355.2 463.55 450.2 427.05 475.46 410.96 493.05 306.2 480.97 286.48 313.51 314.95 300.78 305.03 262.6 249.18 251.24 217.97 297.72 142.3 311.01 132.28 404.28 78.99 424.15 75.18 491.06 94.43"
id="polyline8" />
</g>
<path
class="d"
d="m 521.26153,269.02747 c -58.11,-51.71 -149.9,-14 -185.55,8.6 4.25,-51.57 -43.58,-56.38 -43.58,-56.38 0,0 23.46,-41.23 58.73,-68.42 20.53,-16.2 87.75,-57.600002 115.02,-30.99 41.36,40.35 -57.4,82.16 -57.4,82.16 99.81,-21.61 170.76,40.21 170.76,40.21 0,0 -28.25,-45.22 -26.98,-88.35 0.96,-32.71 21.74,-73.600002 -1.31,-99.220002 -24.96,-27.72 -119.68,-4.67 -164.22,-52.1000002 0,0 9.18,60.7000002 -55.3,86.1800002 0,0 -19.51,-44.11 -68.16,-46.94 -56.49,-3.29 -90.53,15.44 -128.22,19.57 -42.749998,4.69 -90.319998,-16.11 -90.319998,-16.11 0,0 21.23,40.32 5.66,78.120002 -15.57,37.81 -41.7200001,76.79 -27.69,109.53 18.03,44.83 87.689998,35.2 87.689998,35.2 0,0 -4.63,16.05 -33.389998,35.89 -25.85,17.83 -73.4300001,4.53 -73.4300001,4.53 0,0 19.5100001,28.45 19.9900001,55.83 0.48,27.38 0.43,72.32 15.66,94.07 9.34,13.34 30.6,37.33 93.119998,45.98 48.43,6.7 62.75,23.94 62.75,23.94 0,0 -11.54,-30.07 -0.88,-51.72 15.24,-30.94 45.02,-34.04 45.02,-34.04 0,0 14.86,46.93 47.48,56.5 32.63,9.57 59.23,4.69 120.55,-19.09 43.24,-16.77 101.59,8.36 101.59,8.36 0,0 -4.2,-42.11 14.07,-76.15 15.19,-28.29 48.93,-100.12 -1.67,-145.15 z m -314.91,116.09 c -59.62,49.27 -95.06,37 -104.5,27.4 -9.439998,-9.59 -9.609998,-42.25 30.38,-83.41 52.3,-53.84 100.6,-49.29 110.45,-39.67 10,9.77 22.78,40.09 -36.34,95.68 z m -11.3,-193.9 c -69.52,39.8 -94.13,15.56 -98.049998,8.87 -3.91,-6.69 -11.36,-39.09 47.689998,-71.27 59.05,-32.180002 92.83,-27.82 100.25,-16.88 7.27,10.71 21.34,38.5 -49.89,79.28 z m 215.1,215.44 c -69.52,39.8 -94.13,15.56 -98.05,8.87 -3.91,-6.69 -8.66,-34.57 47.69,-71.27 59.22,-38.57 97.12,-30.89 102.84,-22.38 5.73,8.51 18.75,44 -52.49,84.78 z"
id="path11" />
<rect
class="f"
x="79.928421"
y="88.535973"
width="39.418907"
height="39.418907"
transform="rotate(-1)"
id="rect13"
onclick="objective1()" />
<rect
class="f"
x="484.86615"
y="84.10247"
width="39.418907"
height="39.418907"
transform="rotate(-1)"
id="rect15"
onclick="objective5(), R1()"/>
<rect
class="f"
x="220.85062"
y="217.64967"
width="39.418907"
height="39.418907"
transform="rotate(-1)"
id="rect17"
onclick="objective4()" />
<rect
class="f"
x="437.80362"
y="414.99902"
width="39.418907"
height="39.418907"
transform="rotate(-1)"
id="rect19"
onclick="objective3()" />
<rect
class="f"
x="42.805691"
y="416.09134"
width="39.418907"
height="39.418907"
transform="rotate(-1)"
id="rect21"
onclick="objective2()" />
<rect
class="h crumbs"
x="48.299683"
y="204.54538"
width="25.757486"
height="25.757486"
transform="rotate(-1)"
id="rect23"
onclick="breadCrumb1()"
style="stroke-width:1.2924" />
<path
class="e"
d="m 102.59255,109.70798 c 0.01,0.32 0.03,0.58 0.05,0.78 0.02,0.2 0.07,0.38 0.13,0.54 0.07,0.15 0.14,0.27 0.21,0.35 0.07,0.08 0.19,0.14 0.35,0.19 0.16,0.05 0.33,0.08 0.48,0.1 0.16,0.01 0.38,0.02 0.68,0.02 0.06,0.06 0.1,0.14 0.1,0.23 0,0.09 -0.03,0.17 -0.1,0.23 h -5.39 c -0.06,-0.06 -0.1,-0.14 -0.1,-0.23 0,-0.09 0.03,-0.17 0.1,-0.23 0.29,0 0.52,0 0.68,-0.02 0.16,-0.01 0.32,-0.05 0.48,-0.1 0.16,-0.05 0.28,-0.11 0.35,-0.19 0.07,-0.08 0.14,-0.2 0.21,-0.35 0.07,-0.15 0.11,-0.33 0.13,-0.54 0.02,-0.2 0.04,-0.46 0.05,-0.78 0.02,-0.65 0.03,-1.9 0.03,-3.75 0,-1.85 -0.01,-3.21 -0.03,-3.87 -0.01,-0.44 -0.05,-0.76 -0.11,-0.97 -0.06,-0.21 -0.17,-0.31 -0.33,-0.31 -0.39,0 -1.02,0.19 -1.909998,0.56 -0.2,-0.13 -0.31,-0.29 -0.33,-0.48 1.889998,-0.88 3.309998,-1.610002 4.249998,-2.200002 0.09,0 0.13,0.04 0.13,0.11 -0.03,0.28 -0.07,1.260002 -0.13,2.950002 -0.02,0.65 -0.03,1.98 -0.03,3.99 0,2.01 0.01,3.34 0.03,3.99 z"
id="path25"
style="fill:#ff0000" />
<path
class="e"
d="m 66.471532,430.17747 c 0,-0.34 0.08,-0.69 0.25,-1.05 0.16,-0.36 0.4,-0.69 0.7,-1 0.3,-0.31 0.7,-0.57 1.19,-0.77 0.49,-0.2 1.03,-0.3 1.61,-0.3 0.47,0 0.92,0.06 1.38,0.19 0.46,0.13 0.87,0.32 1.26,0.58 0.39,0.26 0.71,0.61 0.95,1.05 0.24,0.44 0.36,0.95 0.36,1.51 0,0.4 -0.05,0.77 -0.15,1.11 -0.1,0.34 -0.27,0.67 -0.5,1 -0.23,0.33 -0.45,0.61 -0.66,0.83 -0.21,0.22 -0.5,0.52 -0.89,0.9 l -2.22,2.14 c -0.1,0.1 -0.26,0.29 -0.48,0.56 -0.22,0.27 -0.47,0.65 -0.74,1.13 -0.27,0.48 -0.41,0.88 -0.41,1.19 h 4.15 c 0.38,0 0.68,-0.18 0.9,-0.54 0.22,-0.36 0.43,-0.96 0.63,-1.79 0.15,-0.03 0.29,0.01 0.42,0.12 -0.01,0.36 -0.07,0.89 -0.17,1.59 -0.1,0.7 -0.22,1.32 -0.35,1.86 h -7.18 c 0,-0.71 0.16,-1.38 0.49,-2.03 0.33,-0.65 1,-1.49 2.01,-2.51 l 1.63,-1.6 c 0.61,-0.62 1.02,-1.23 1.25,-1.83 0.22,-0.6 0.33,-1.28 0.33,-2.04 0,-0.5 -0.07,-0.95 -0.21,-1.33 -0.14,-0.39 -0.33,-0.69 -0.55,-0.9 -0.22,-0.21 -0.46,-0.37 -0.69,-0.48 -0.23,-0.11 -0.46,-0.16 -0.67,-0.16 -0.38,0 -0.71,0.05 -1,0.16 -0.29,0.11 -0.5,0.25 -0.65,0.41 -0.15,0.17 -0.25,0.34 -0.32,0.5 -0.07,0.17 -0.1,0.33 -0.1,0.48 0,0.06 0.03,0.16 0.09,0.3 0.06,0.13 0.09,0.21 0.1,0.23 0.06,0.2 0.09,0.35 0.09,0.44 0,0.2 -0.1,0.38 -0.31,0.53 -0.21,0.15 -0.41,0.23 -0.61,0.23 -0.24,0 -0.45,-0.06 -0.62,-0.18 -0.17,-0.12 -0.26,-0.29 -0.26,-0.52 z"
id="path27"
style="fill:#ff0000" />
<path
class="e"
d="m 465.58153,419.35747 c -0.12,0 -0.27,0.02 -0.43,0.06 -0.17,0.04 -0.35,0.11 -0.55,0.2 -0.2,0.1 -0.38,0.21 -0.54,0.35 -0.16,0.14 -0.3,0.32 -0.41,0.54 -0.11,0.23 -0.17,0.47 -0.17,0.74 0,0.27 -0.07,0.52 -0.21,0.77 -0.14,0.25 -0.36,0.38 -0.64,0.38 -0.24,0 -0.43,-0.08 -0.56,-0.24 -0.13,-0.16 -0.19,-0.33 -0.19,-0.52 0,-0.16 0.04,-0.36 0.12,-0.57 0.08,-0.21 0.22,-0.46 0.42,-0.74 0.2,-0.27 0.46,-0.52 0.76,-0.74 0.3,-0.22 0.7,-0.41 1.2,-0.56 0.5,-0.15 1.06,-0.23 1.67,-0.23 0.53,0 1,0.08 1.42,0.23 0.42,0.15 0.74,0.35 0.97,0.59 0.23,0.24 0.4,0.49 0.52,0.75 0.12,0.26 0.17,0.51 0.17,0.76 0,0.24 -0.02,0.45 -0.06,0.63 -0.04,0.18 -0.12,0.41 -0.25,0.68 -0.13,0.27 -0.35,0.56 -0.67,0.85 -0.32,0.3 -0.73,0.6 -1.22,0.92 l 0.02,0.04 c 0.36,0.06 0.7,0.16 1.03,0.31 0.33,0.15 0.64,0.36 0.95,0.62 0.31,0.26 0.55,0.62 0.74,1.06 0.19,0.44 0.28,0.95 0.28,1.52 0,0.94 -0.23,1.77 -0.69,2.49 -0.46,0.72 -1.07,1.27 -1.82,1.64 -0.75,0.37 -1.56,0.56 -2.44,0.56 -0.45,0 -0.92,-0.06 -1.4,-0.18 -0.48,-0.12 -0.9,-0.3 -1.25,-0.53 -0.35,-0.23 -0.52,-0.49 -0.52,-0.77 0,-0.18 0.1,-0.35 0.29,-0.52 0.19,-0.16 0.4,-0.25 0.63,-0.25 0.37,0 0.68,0.19 0.95,0.57 l 0.15,0.27 c 0.08,0.14 0.15,0.24 0.21,0.31 0.06,0.07 0.15,0.15 0.26,0.25 0.11,0.1 0.25,0.17 0.41,0.22 0.16,0.05 0.35,0.07 0.56,0.07 0.17,0 0.37,-0.04 0.6,-0.11 0.23,-0.07 0.47,-0.21 0.74,-0.4 0.27,-0.19 0.51,-0.42 0.74,-0.7 0.23,-0.28 0.41,-0.64 0.56,-1.1 0.15,-0.46 0.23,-0.96 0.23,-1.51 0,-1.92 -0.97,-2.88 -2.9,-2.88 -0.38,0 -0.69,0.01 -0.95,0.04 l -0.12,-0.48 c 0.62,-0.1 1.2,-0.35 1.74,-0.75 0.54,-0.4 0.95,-0.83 1.23,-1.29 0.28,-0.46 0.42,-0.88 0.42,-1.26 0,-0.64 -0.2,-1.16 -0.6,-1.54 -0.4,-0.38 -0.86,-0.58 -1.38,-0.58 z"
id="path29"
style="fill:#ff0000" />
<path
class="e"
d="m 248.30102,234.52645 c 0.22,0 0.33,0.12 0.33,0.35 0,0.13 -0.06,0.24 -0.19,0.33 -0.13,0.09 -0.28,0.13 -0.44,0.13 h -1.55 c 0,1.08 0,1.84 0.02,2.25 0,0.15 0.02,0.28 0.05,0.39 0.02,0.11 0.05,0.2 0.08,0.27 0.03,0.08 0.08,0.14 0.17,0.19 0.08,0.05 0.15,0.1 0.2,0.12 0.05,0.03 0.15,0.05 0.29,0.08 0.14,0.02 0.25,0.04 0.33,0.05 0.08,0.01 0.22,0.02 0.43,0.02 0.06,0.06 0.1,0.14 0.1,0.23 0,0.09 -0.03,0.17 -0.1,0.23 h -4.84 c -0.06,-0.06 -0.1,-0.15 -0.1,-0.25 0,-0.1 0.03,-0.19 0.1,-0.25 0.2,-0.01 0.35,-0.03 0.46,-0.04 0.11,-0.01 0.24,-0.03 0.4,-0.06 0.16,-0.03 0.28,-0.07 0.37,-0.12 0.09,-0.05 0.18,-0.11 0.27,-0.19 0.09,-0.08 0.16,-0.18 0.2,-0.3 0.04,-0.12 0.07,-0.26 0.08,-0.42 0.01,-0.41 0.02,-1.15 0.02,-2.21 h -4.51 c -0.45,0 -0.74,-0.31 -0.86,-0.92 0.98,-1.54 2.04,-3.12 3.19,-4.74 1.14,-1.62 2.07,-2.86 2.78,-3.74 0.14,-0.16 0.26,-0.24 0.35,-0.24 h 0.55 l 0.04,0.04 c 0,0.05 -0.01,0.17 -0.02,0.36 0,0.19 0,0.45 0,0.79 0,0.34 0,0.66 -0.02,0.98 -0.04,0.8 -0.05,3.02 -0.03,6.65 h 1.86 z m -3.31,0 c 0.01,-3.67 0,-5.91 -0.03,-6.71 -1.75,2.4 -3.28,4.64 -4.58,6.71 z"
id="path31"
style="fill:#ff0000" />
<path
class="e"
d="m 509.06153,96.867468 c 0,-1.14 -0.26,-2.02 -0.77,-2.64 -0.52,-0.62 -1.15,-0.93 -1.91,-0.93 -0.93,0 -1.86,0.18 -2.79,0.53 l 0.74,-6.11 c 0.86,0.07 1.65,0.11 2.37,0.11 0.87,0 2.08,-0.08 3.61,-0.24 l 0.16,0.09 -0.35,1.28 c -0.9,0.09 -1.67,0.13 -2.31,0.13 -0.64,0 -1.57,-0.06 -2.79,-0.19 l -0.44,3.89 c 0.23,-0.09 0.57,-0.17 1.03,-0.24 0.46,-0.08 0.91,-0.11 1.34,-0.11 0.79,0 1.5,0.19 2.11,0.57 0.61,0.38 1.07,0.87 1.38,1.48 0.31,0.61 0.46,1.27 0.46,2 0,1.39 -0.44,2.54 -1.32,3.44 -0.88,0.910002 -2,1.360002 -3.36,1.360002 -0.42,0 -0.87,-0.07 -1.35,-0.22 -0.48,-0.15 -0.89,-0.35 -1.24,-0.61 -0.35,-0.26 -0.52,-0.540002 -0.52,-0.820002 0,-0.21 0.08,-0.37 0.25,-0.5 0.16,-0.12 0.36,-0.19 0.58,-0.19 0.39,0 0.76,0.24 1.13,0.71 0.03,0.04 0.09,0.13 0.19,0.27 0.1,0.140002 0.17,0.250002 0.23,0.310002 0.06,0.06 0.14,0.14 0.25,0.24 0.11,0.1 0.23,0.17 0.35,0.2 0.13,0.04 0.27,0.06 0.43,0.06 0.67,0 1.26,-0.38 1.78,-1.140002 0.52,-0.76 0.78,-1.66 0.78,-2.7 z"
id="path33"
style="fill:#ff0000" />
<rect
class="h crumbs"
x="145.88861"
y="246.20175"
width="25.757486"
height="25.757486"
transform="rotate(-1)"
id="rect35"
onclick="breadCrumb2()"
style="stroke-width:1.2924" />
<rect
class="h crumbs"
x="50.484272"
y="334.53384"
width="25.757486"
height="25.757486"
transform="rotate(-1)"
id="rect37"
onclick="breadCrumb3()"
style="stroke-width:1.2924" />
<rect
class="h crumbs"
x="146.8737"
y="446.49927"
width="25.757486"
height="25.757486"
transform="rotate(-1)"
id="rect39"
onclick="breadCrumb4()"
style="stroke-width:1.2924" />
<rect
class="h crumbs"
x="233.34877"
y="392.82779"
width="25.757486"
height="25.757486"
transform="rotate(-1)"
id="rect41"
onclick="breadCrumb5()"
style="stroke-width:1.2924" />
<rect
class="h crumbs"
x="326.81818"
y="454.86319"
width="25.757486"
height="25.757486"
transform="rotate(-1)"
id="rect43"
onclick="breadCrumb6()"
style="stroke-width:1.2924" />
<rect
class="h crumbs"
x="466.02078"
y="290.49597"
width="25.757486"
height="25.757486"
transform="rotate(-1)"
id="rect45"
onclick="breadCrumb7()"
style="stroke-width:1.2924" />
<rect
class="h crumbs"
x="291.60892"
y="304.90247"
width="25.757486"
height="25.757486"
transform="rotate(-1)"
id="rect47"
onclick="breadCrumb8()"
style="stroke-width:1.2924" />
<rect
class="h crumbs"
x="281.4234"
y="129.52808"
width="25.757486"
height="25.757486"
transform="rotate(-1)"
id="rect49"
onclick="breadCrumb9()"
style="stroke-width:1.2924" />
<rect
class="h crumbs"
x="400.62808"
y="67.091034"
width="25.757486"
height="25.757486"
transform="rotate(-1)"
id="rect51"
onclick="breadCrumb10()"
style="stroke-width:1.2924" />
</svg>
</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="objective">
<p>OBJECTIVE:<br>Enter S/ash Gallery to step into the game and unlock gateway 1. Tap the different markers on the map in order to navigate and receive objectives. When set to the right digit, the modules in the locations will reveal a port number. Enter it above to collect dream logs. Follow the blue markers on the pavement to make your way through the landmarks.</p>
</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 class="section2">
<div class="button-base">
<p onclick="showHelp()">HELP</p>
</div>
<div class="button-base">
<p onclick="showAbout()">ABOUT</p>
</div>
</div> -->
</div>
<div class="flex-right">
<!-- <div class="section">
<p onclick="showLog()">LOG</p>
</div> -->
<!-- <input id="icon" width="20%" class="on-location-track" type="image" src="img/868.png" onclick="playMusic()" style="visibility: hidden; z-index: 2"/>
<input id="icon" width="22%" class="nav-track" type="image" src="img/868.png" onclick="playMusic1()" style="visibility: visible;"/> -->
</div>
</div>
</div>
<!-- <video class="fullscreen-video" id="myVideo" autoplay="autoplay" muted loop>
<source src="img/bg.m4v">
</video> -->
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="js/level.js"></script>
<script type="text/javascript" src="js/input.js"></script>
<script>
window.onload = checkLevel();
function checkLevel(){
console.log(localStorage.getItem('gateway'));
if (localStorage.getItem("gateway")!==null){
if(localStorage.getItem("gateway") == "1") {
levelTwo();
}
if(localStorage.getItem("gateway") == "2") {
levelThree();
}
if(localStorage.getItem("gateway") == "3") {
levelFour();
}
if(localStorage.getItem("gateway") == "4") {
levelFive();
}
if(localStorage.getItem("gateway") == "5") {
levelFive();
}
if(localStorage.getItem("gateway") == "6") {
levelSix();
}
}else {levelOne()};
};
</script>
</body>
</html>

@ -18,9 +18,11 @@
// Split the data into separate parts
const [node, value] = data.split(' ');
if (node === 'node3' && value === '15'){
document.body.style.backgroundColor = 'red';}
else {
if (node === 'node3' && value === '15') {
// Change the background color to red
document.body.style.backgroundColor = 'red';
} else {
// Restore the default background color
document.body.style.backgroundColor = 'white';
}

Loading…
Cancel
Save