File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
examples/adafruitio_24_zapier Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -174,22 +174,23 @@ void loop()
174
174
lis.getEvent (&event);
175
175
176
176
// 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 )
178
178
{
179
179
// Serial.println("Cube TILTED: Left");
180
180
cubeState = 1 ;
181
181
}
182
- else if (event.acceleration .x < -9 ) // right-side up
182
+ else if (event.acceleration .x < -9 )
183
183
{
184
184
// Serial.println("Cube TILTED: Right");
185
185
cubeState = 2 ;
186
186
}
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 )
188
188
{
189
189
cubeState = 3 ;
190
190
}
191
191
else
192
192
{ // orientation not specified
193
+ Serial.println (" Cube Idle..." );
193
194
}
194
195
195
196
// return if the orientation hasn't changed
You can’t perform that action at this time.
0 commit comments