NJR Microwave Distance Measurement Sensor Module

Actually, i am new user Micro Controller ARDUINO. I have NJR Distance Sensor with build code but need to read different distance value which can create when obstacle at the front of my Sensor. So, for get output distances value me connect this sensor to ARDUINO UNO with the help of RX and TX communication UART based. But the output value are not correct sensor give me 5 different distance value i need just distance_1 value. The Sensor send 36bytes data how i read this data anyone guide me. Thanks
int incomingByte = 0; // for incoming serial data

void setup() {
Serial.begin(9600); // opens serial port, sets data rate to 9600 bps
}

void loop() {
// send data only when you receive data:
if (Serial.available() > 0) {
// read the incoming byte:
incomingByte = Serial.read();

// say what you got:
Serial.print("I received: ");
Serial.println(incomingByte, DEC);
delay (2000);

}
}

You're going to need to take a look at the data sheet I think. It looks a bit complicated.

Processing: NJR4234BW_Datasheet_Rev02e.pdf...

Do you see 204 (0xCC) in your serial output from the header? Also, do you have the right baud rate - the default appears to be 115200.

Yes, I received 0XCC in header and right baud rate 115200

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.