Modified test file to represent real in-game code

This commit is contained in:
2025-11-25 18:45:54 -07:00
parent 40c6b0f3e7
commit 97b462eac8
2 changed files with 9 additions and 7 deletions

View File

@@ -0,0 +1,9 @@
device airConditioner = "d0";
device gasSensor = "d1";
loop {
yield();
let indoorTemp = loadFromDevice(gasSensor, "Temperature");
let shouldSet = indoorTemp > 30c;
setOnDevice(airConditioner, "On", shouldSet);
}

View File

@@ -1,7 +0,0 @@
fn addTemperatures(temp1, temp2) {
return temp1 + temp2;
};
let newTemp1 = addTemperatures(15c, 120c);
let newTemp2 = addTemperatures(50c, 20c);