Skip to content

Commit 79b0139

Browse files
author
brentru
committed
add idle state print
1 parent c8b0c50 commit 79b0139

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

examples/adafruitio_24_zapier/adafruitio_24_zapier.ino

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,22 +174,23 @@ void loop()
174174
lis.getEvent(&event);
175175

176176
// Detect cube face orientation
177-
if (event.acceleration.x > 9 && event.acceleration.x < 10) // left-side up
177+
if (event.acceleration.x > 9 && event.acceleration.x < 10)
178178
{
179179
//Serial.println("Cube TILTED: Left");
180180
cubeState = 1;
181181
}
182-
else if (event.acceleration.x < -9) // right-side up
182+
else if (event.acceleration.x < -9)
183183
{
184184
//Serial.println("Cube TILTED: Right");
185185
cubeState = 2;
186186
}
187-
else if(event.acceleration.y < 0 && event.acceleration.y > -1) // top-side up
187+
else if(event.acceleration.y < 0 && event.acceleration.y > -1)
188188
{
189189
cubeState = 3;
190190
}
191191
else
192192
{ // orientation not specified
193+
Serial.println("Cube Idle...");
193194
}
194195

195196
// return if the orientation hasn't changed

0 commit comments

Comments
 (0)