Toll-Free Customer Support 24/7

Serial Ultrasonic Distance Measure

/*
* Project name:
Serial Ultrasonic Distance Measure
* Copyright
(c) Researchdesignlab.com
* Description:

* Test configuration:
MCU: ATMEGA328
Dev.Board: Arduino uno
Oscillator: 16 MHz
Software: Arduino

*/
/*

/*
#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX

void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}



Serial.println("Serial Ultrasonic Distance Measure");
Serial.println(" Distance Measure in cm");
// set the data rate for the SoftwareSerial port
mySerial.begin(9600);

}

void loop() // run over and over
{
if (mySerial.available())
Serial.write(mySerial.read());

}

Back to top