From b3e4586e91f1d06d0da52be0b97e33c1773c5585 Mon Sep 17 00:00:00 2001 From: unlockable Date: Wed, 6 Sep 2023 15:35:36 +0800 Subject: [PATCH] Give default value to z. --- 8By8/8By8.ino | 3 +++ 1 file changed, 3 insertions(+) diff --git a/8By8/8By8.ino b/8By8/8By8.ino index bf584f7..7d3538f 100644 --- a/8By8/8By8.ino +++ b/8By8/8By8.ino @@ -476,6 +476,9 @@ void loop() { z = round(result); Cube::set_status(x, y, z, 3); } + else { + z = 0; + } Serial.print(x); Serial.print(" "); Serial.print(y);