 
 
 // time & timestamps
-int DELAY_FAST = 250;
-unsigned long time_slow;
+int delay_acs = 250;
+unsigned long time_env;
+unsigned long time_acs;
 unsigned long time_leds;
 unsigned long delta;
 
 // default inputs
-int status_water_fwd = HIGH;
-int status_water_aft = HIGH;
-int status_sw_motor = LOW;
-int status_led_green = LOW;
-int status_led_yellow = LOW;
-int status_led_red = LOW;
+int status_water_fwd = 0;
+int status_water_aft = 0;
+int status_sw_motor = 0;
+
+boolean status_led_green = false;
+boolean status_led_yellow = false;
+boolean status_led_red = false;
 
 
 // the setup routine runs once when you press reset

    digitalWrite(LED_PIN, HIGH);
}

// the loop routine runs over and over again forever:
void loop() {

    // detect inputs
    status_water_fwd = digitalRead(WATER_FWD);
    status_water_aft = digitalRead(WATER_AFT);
    status_sw_motor = digitalRead(SW_MOTOR);

    if(status_sw_motor == LOW) {
        status_led_green = 0x01;
    } else {
        status_led_green = 0x00;
    }

    if(true) {
       status_led_yellow = 0x01; 
    } else {
       status_led_yellow = 0x00; 
    }

    if(status_water_fwd == HIGH && status_water_aft == HIGH) {
        status_led_red = 0x01;    
    } else {
        status_led_red = 0x00;
    }

    // led slow-loop delta
    delta = millis() - time_leds;

    if(delta >= DELAY_LEDS) {
        // led indications
        digitalWrite(LED_GREEN, status_led_green);
        digitalWrite(LED_YELLOW, status_led_yellow);
        digitalWrite(LED_RED, status_led_red);

        // update timestamp
        time_leds = millis();

        // send indicators report
        report_indicators();
    }


    // serial control
    if(Serial.available() > 0) {

#define SW_MOTOR 9
#define WATER_FWD 10
#define WATER_AFT 11
#define BAT_LOW 26.5f


// Reference voltages (fine tuned):
