Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions libraries/CurieIMU/examples/MotionDetect/MotionDetect.ino
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ void loop() {
static void eventCallback(void){
if (CurieIMU.getInterruptStatus(CURIE_IMU_MOTION)) {
if (CurieIMU.motionDetected(X_AXIS, POSITIVE))
Serial.println("Negative motion detected on X-axis");
Serial.println("Motion detected on positive X-axis");
if (CurieIMU.motionDetected(X_AXIS, NEGATIVE))
Serial.println("Positive motion detected on X-axis");
Serial.println("Motion detected on negative X-axis");
if (CurieIMU.motionDetected(Y_AXIS, POSITIVE))
Serial.println("Negative motion detected on Y-axis");
Serial.println("Motion detected on positive Y-axis");
if (CurieIMU.motionDetected(Y_AXIS, NEGATIVE))
Serial.println("Positive motion detected on Y-axis");
Serial.println("Motion detected on negative Y-axis");
if (CurieIMU.motionDetected(Z_AXIS, POSITIVE))
Serial.println("Negative motion detected on Z-axis");
Serial.println("Motion detected on positive Z-axis");
if (CurieIMU.motionDetected(Z_AXIS, NEGATIVE))
Serial.println("Positive motion detected on Z-axis");
Serial.println("Motion detected on negative Z-axis");
interruptsTime = millis();
}
}
Expand Down
12 changes: 6 additions & 6 deletions libraries/CurieIMU/examples/ShockDetect/ShockDetect.ino
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ static void eventCallback(void)
{
if (CurieIMU.getInterruptStatus(CURIE_IMU_SHOCK)) {
if (CurieIMU.shockDetected(X_AXIS, POSITIVE))
Serial.println("Negative shock detected on X-axis");
Serial.println("Shock detected on positive X-axis");
if (CurieIMU.shockDetected(X_AXIS, NEGATIVE))
Serial.println("Positive shock detected on X-axis");
Serial.println("Shock detected on negative X-axis");
if (CurieIMU.shockDetected(Y_AXIS, POSITIVE))
Serial.println("Negative shock detected on Y-axis");
Serial.println("Shock detected on positive Y-axis");
if (CurieIMU.shockDetected(Y_AXIS, NEGATIVE))
Serial.println("Positive shock detected on Y-axis");
Serial.println("Shock detected on negative Y-axis");
if (CurieIMU.shockDetected(Z_AXIS, POSITIVE))
Serial.println("Negative shock detected on Z-axis");
Serial.println("Shock detected on positive Z-axis");
if (CurieIMU.shockDetected(Z_AXIS, NEGATIVE))
Serial.println("Positive shock detected on Z-axis");
Serial.println("Shock detected on negative Z-axis");
}
}

Expand Down