 	} else if (status == MotionSensor::Idle) {
 		Serial.println(F("Sensor is in idle state."));
 		Serial.flush();
-		ledController.setState(LEDController::Green, LEDController::FlashVerySlow);
+		// If an alarm was played, let the LED flash red.
+		if (alarmPlayed) {
+			ledController.setState(LEDController::Red, LEDController::FlashVerySlow);
+		} else { 
+			ledController.setState(LEDController::Green, LEDController::FlashVerySlow);
+		}
 		logicState = IdleState; // Ready to observe.
 	} else if (status == MotionSensor::Alarm) {
 		Serial.println(F("Sensor alarm."));

		signalError();
		return;
	}
	
	Serial.println(F("Success!"));
	Serial.flush();
}


void loop() {
	// Get the current time for this loop iteration.
	const unsigned long currentTime = millis();

		// If the board goes into alarm state, play the sound.
		// This will block the loop, until the sound finishes.
		if (logicState == AlarmState) {
			// Get the filename for the next voice sample.
			const char *fileName = voiceSampleList[nextVoiceSampleIndex];
			// Play the sound.
			if (!audioPlayer.play(fileName)) {
				// On error go into error state.
				Serial.println(F("Error on play."));
				Serial.flush();
				signalError();
			} else {
				// Increase the next voice sample index
				++nextVoiceSampleIndex;
				if (nextVoiceSampleIndex >= voiceSampleCount) {
					nextVoiceSampleIndex = 0;
				}
				// Go back into idle state after the sound.
				// The sensor might stay in alarm state for a while.
				logicState = IdleState;
				// Remember an alarm was played, the LED will flash red.
				alarmPlayed = true;
			}
		}
	}
}


/// The motion callback which is called every time when the sensor state changes.
///
void onMotion(const unsigned long currentTime, MotionSensor::Status status)
{
	if (status == MotionSensor::WaitStablilize) {
