Use the sample arduino code below (also included in the download) to quickly stream your rangefinder values back to the connected PC.




Sample Arduino Code
 
#define SerialSpeed 115200 //typical values are 9600 or 115200
#define SampFrequency 10 //sampling frequency in Hz (cycles per second)
#define AnalogPIN 0 //define your pin here

int mDelay;

void setup()
{
  Serial.begin(SerialSpeed);
  mDelay = 1000/SampFrequency; //calculate delay for proper sampling rate
}

void loop()
{
  delay(mDelay); //delay in milliseconds
  Serial.println( analogRead(AnalogPIN) ); //reads the analog port and prints value over serial
}