File tree Expand file tree Collapse file tree
examples/adafruitio_24_zapier Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments