Forum >Question about URM04-Libraries
Question about URM04-Libraries

Hello,
i am using the URM04 Ultrasonic-ranger. Both libraries, Urm4parser and rxURM4, writing "U2" to the console when metering. Is it possible to avoid this? i just want to have the integer value to use it in "processing".
thanks
Peter
i am using the URM04 Ultrasonic-ranger. Both libraries, Urm4parser and rxURM4, writing "U2" to the console when metering. Is it possible to avoid this? i just want to have the integer value to use it in "processing".
thanks
Peter
2012-06-11 06:17:56 thanks,... i found something for custom protocols.
Thread can be closed.
arduinofish
Thread can be closed.

2012-06-11 06:17:56 thanks,... i found something for custom protocols.
Thread can be closed.
arduinofish
Thread can be closed.

2012-06-07 23:02:22 ;)
You could custom a serial communication protocol for your project with the header byte and the sum byte.
When processing received the header byte, start to read the distance value.
Lauren
You could custom a serial communication protocol for your project with the header byte and the sum byte.
When processing received the header byte, start to read the distance value.

2012-06-07 23:02:22 ;)
You could custom a serial communication protocol for your project with the header byte and the sum byte.
When processing received the header byte, start to read the distance value.
Lauren
You could custom a serial communication protocol for your project with the header byte and the sum byte.
When processing received the header byte, start to read the distance value.

2012-06-07 22:28:44 actually if i want to use the output at processing its not very useful. i will see how to ignore this stuff.
arduinofish

2012-06-07 22:28:44 actually if i want to use the output at processing its not very useful. i will see how to ignore this stuff.
arduinofish

2012-06-07 22:11:58 :)
You're right. If you ganna to drive the sensor, using IO expansion shield v5 and mega. You need to wiring the Serial0 on the mega to the io expansion shield v5.
But I think the console is just used to debug the software, so it shouldn't case a big problem that show "U2". Right?
Lauren
You're right. If you ganna to drive the sensor, using IO expansion shield v5 and mega. You need to wiring the Serial0 on the mega to the io expansion shield v5.
But I think the console is just used to debug the software, so it shouldn't case a big problem that show "U2". Right?

2012-06-07 22:11:58 :)
You're right. If you ganna to drive the sensor, using IO expansion shield v5 and mega. You need to wiring the Serial0 on the mega to the io expansion shield v5.
But I think the console is just used to debug the software, so it shouldn't case a big problem that show "U2". Right?
Lauren
You're right. If you ganna to drive the sensor, using IO expansion shield v5 and mega. You need to wiring the Serial0 on the mega to the io expansion shield v5.
But I think the console is just used to debug the software, so it shouldn't case a big problem that show "U2". Right?

2012-06-07 18:03:57 Hi, peter
The "U2" is the command to read sensor data from URM04 via the TTL interface.But the serial monitor is also using TTL interface.If you ganna to avoid it, you could use mega board to drive the URM via Serial1.Also change your code and hardware connection a little bit.
Regards
Lauren ;)
Lauren
The "U2" is the command to read sensor data from URM04 via the TTL interface.But the serial monitor is also using TTL interface.If you ganna to avoid it, you could use mega board to drive the URM via Serial1.Also change your code and hardware connection a little bit.
Regards
Lauren ;)

2012-06-07 18:03:57 Hi, peter
The "U2" is the command to read sensor data from URM04 via the TTL interface.But the serial monitor is also using TTL interface.If you ganna to avoid it, you could use mega board to drive the URM via Serial1.Also change your code and hardware connection a little bit.
Regards
Lauren ;)
Lauren
The "U2" is the command to read sensor data from URM04 via the TTL interface.But the serial monitor is also using TTL interface.If you ganna to avoid it, you could use mega board to drive the URM via Serial1.Also change your code and hardware connection a little bit.
Regards
Lauren ;)

2012-06-06 00:05:32 its printed everytime there is a request to the sensor
in the Urm4praser its printByte(cmdst[j]); in this function.
[code]
void transmitCommands(){ // Send protocol via RS485 interface
cmdst[5]=cmdst[0]+cmdst[1]+cmdst[2]+cmdst[3]+cmdst[4];
delay(1);
for(int j = 0; j < 6; j++){
printByte(cmdst[j]);
// delayMicroseconds(10);
}
delay(2);
}
[/code]
There is something compareable in the rxURM4.h.
arduinofish
in the Urm4praser its printByte(cmdst[j]); in this function.
[code]
void transmitCommands(){ // Send protocol via RS485 interface
cmdst[5]=cmdst[0]+cmdst[1]+cmdst[2]+cmdst[3]+cmdst[4];
delay(1);
for(int j = 0; j < 6; j++){
printByte(cmdst[j]);
// delayMicroseconds(10);
}
delay(2);
}
[/code]
There is something compareable in the rxURM4.h.

2012-06-06 00:05:32 its printed everytime there is a request to the sensor
in the Urm4praser its printByte(cmdst[j]); in this function.
[code]
void transmitCommands(){ // Send protocol via RS485 interface
cmdst[5]=cmdst[0]+cmdst[1]+cmdst[2]+cmdst[3]+cmdst[4];
delay(1);
for(int j = 0; j < 6; j++){
printByte(cmdst[j]);
// delayMicroseconds(10);
}
delay(2);
}
[/code]
There is something compareable in the rxURM4.h.
arduinofish
in the Urm4praser its printByte(cmdst[j]); in this function.
[code]
void transmitCommands(){ // Send protocol via RS485 interface
cmdst[5]=cmdst[0]+cmdst[1]+cmdst[2]+cmdst[3]+cmdst[4];
delay(1);
for(int j = 0; j < 6; j++){
printByte(cmdst[j]);
// delayMicroseconds(10);
}
delay(2);
}
[/code]
There is something compareable in the rxURM4.h.

2012-06-05 20:01:30 Hi Peter,
I haven't used these libraries. Do you get the U2 in the console every time a value is returned or only for the first time?
You could write a function in processing to look for "U2" as a header for the sensor value, or just write a function which ignores the U2 value.
Hector
I haven't used these libraries. Do you get the U2 in the console every time a value is returned or only for the first time?
You could write a function in processing to look for "U2" as a header for the sensor value, or just write a function which ignores the U2 value.

2012-06-05 20:01:30 Hi Peter,
I haven't used these libraries. Do you get the U2 in the console every time a value is returned or only for the first time?
You could write a function in processing to look for "U2" as a header for the sensor value, or just write a function which ignores the U2 value.
Hector
I haven't used these libraries. Do you get the U2 in the console every time a value is returned or only for the first time?
You could write a function in processing to look for "U2" as a header for the sensor value, or just write a function which ignores the U2 value.

2012-06-05 11:04:24 Hello,
i am using the URM04 Ultrasonic-ranger. Both libraries, Urm4parser and rxURM4, writing "U2" to the console when metering. Is it possible to avoid this? i just want to have the integer value to use it in "processing".
thanks
Peter
arduinofish
i am using the URM04 Ultrasonic-ranger. Both libraries, Urm4parser and rxURM4, writing "U2" to the console when metering. Is it possible to avoid this? i just want to have the integer value to use it in "processing".
thanks
Peter
