         delay(1);
     }
 }
+
+/**
+ * Wake up
+ */
+void wake() {
+  
+}

 * Main loop
 */
void loop() {
  digitalWrite(OBSTACLE_BATTERY, 255);
  digitalWrite(BUZZER_BATTERY, 255);
  int obstacleValue = digitalRead(OBSTACLE_SENSOR);
  
  if (lastObstacleValue == HIGH && obstacleValue == LOW) {
      int randNumber = random(RANDOM_ERROR_COUNT);
      if (randNumber == 0) {
          soundError();
      } else {
          soundOk();
      }
  }
  lastObstacleValue = obstacleValue;

  sleep();
}

/**

#include "LowPower.h"

const int OBSTACLE_SENSOR = 2;
const int OBSTACLE_BATTERY = 3;
const int LED = 5;
const int BUZZER = 9;
const int BUZZER_BATTERY = 6;
const int SOUND_DURATION = 40;
const int RANDOM_ERROR_COUNT = 20;
const int COUNT_BEFORE_SLEEP = 30;
int lastObstacleValue;

/**
 * Setup
 */
void setup() {
  pinMode(LED, OUTPUT);
  pinMode(BUZZER, OUTPUT);
  pinMode(BUZZER_BATTERY, OUTPUT);
  pinMode(OBSTACLE_SENSOR, INPUT);
