 void checkRFIDSensors() {
     int countOk = 0;
     for (int i = 0; i < N_OF_QUESTIONS; i++) {
-        if (sensors[i].selfCheck()) countOk++;
+        bool ok = sensors[i].selfCheck();
+        if (ok) countOk++;
+        #ifdef APP_DEBUG
+        Serial << "Checking Sensor " << i << ": " << (ok ? "OK" : "FAILED") << endl;
+        #endif
     }
     if (countOk != N_OF_QUESTIONS) {
         while(1) {

    Serial << "Copyright (c) 2016 BlueMasters Fribourg" << endl;
    SPI.begin();
    app.statusLed.begin(2,3,4);
    for (int i = 0; i < N_OF_QUESTIONS; i++) {
        leds[i].begin();
        solenoids[i].begin();
        sensors[i].begin();
    }
    app.statusLed.selfCheck();
    checkSolenoids();
    checkRFIDSensors();
}

void loop() {
    static long heartbeat = 0;
    for (int i = 0; i < N_OF_QUESTIONS; i++) {
        solenoids[i].tick();
    }
    heartbeat++;
    if (heartbeat > HEARTBEAT_COUNTER) {
        app.statusLed.off();
        heartbeat = 0;
    } else if (heartbeat > HEARTBEAT_COUNTER - HEARTBEAT_WIDTH){
        app.statusLed.setColor(COLOR_BLUE);
    }
}

#include "RGBLED.h"
#include "RFIDSensor.h"
#include "Solenoid.h"
#include "RemoteControl.h"

#define VERSION "0.0.1"

