     }
   }
   Serial.print("]");
-}+}

#include "Maxbotix.h"

Maxbotix rangeSensorPW(8, Maxbotix::PW, Maxbotix::LV, Maxbotix::BEST);
Maxbotix rangeSensorTX(6, Maxbotix::TX, Maxbotix::LV, Maxbotix::MEDIAN);
Maxbotix rangeSensorAD(A0, Maxbotix::AN, Maxbotix::LV, Maxbotix::BEST, 9);

void setup()

  Serial.print(rangeSensorPW.getSampleBest());
  Serial.println();
  
  #ifdef MAXBOTIX_WITH_SOFTWARE_SERIAL
    // TX
    start = millis();
    Serial.print("TX (MEDIAN): ");
    Serial.print(rangeSensorTX.getRange());
    Serial.print("cm - ");
    Serial.print(millis() - start);
    Serial.print("ms - ");
    printArray(rangeSensorTX.getSample(), rangeSensorTX.getSampleSize());
    Serial.print(" - Highest Mode: ");
    Serial.print(rangeSensorTX.getSampleMode(true));
    Serial.print(" - Lowest Mode: ");
    Serial.print(rangeSensorTX.getSampleMode(false));
    Serial.print(" - Median: ");
    Serial.print(rangeSensorTX.getSampleMedian());
    Serial.print(" - Best: ");
    Serial.print(rangeSensorTX.getSampleBest());
    Serial.println();
  #endif
  
  // AD
  start = millis();
