    ////////////////////////////////////////////////////////Tachometer 
    // Check if tach was triggered
    if (revolution_occured) {
-   revolution_count ++;
-   revolution_occured = !revolution_occured;
+     revolution_count ++;
+     revolution_occured = !revolution_occured;
    }   
  
- // Calculate RPM
- current_time = millis();
+   // Calculate RPM
+   current_time = millis();
    if (current_time - previous_time >= 1000) {
      rpm = (revolution_count / DURATION * 60);
      previous_time = current_time;



///////////////////////////////////////////////////////////////////////////////////////////////////////////// 
//                                                5. SOLENOID DRAIN VALVE


int solenoidValvePin = 5; //Pin controlling the valve



//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//                                                7. SERIAL MONITOR
unsigned int long PRINT_DELAY = 2000; //in milliseconds
unsigned int long last_print_time = 0;
String data; 



///////////////////////////////////////////////////////////////////////////////////////////////////////////// 

void setup()
{
  Serial.begin(9600);        //Enable serial at high speed 
  analogReference(EXTERNAL); //Important or we send 5V into the 3V3 pin!
  
  // Tachometer setup
  pinMode(solenoidValvePin,OUTPUT);
