Data Sheet
Sensor Networking
Upto 32 URM04 sensors are able to join a network. Simply serially connect the sensors uses twisted
pair cables. A diagram is illustrated:
URM04 Networking
Arduino sketch for driving one URM04 sensor
The sketch code:
/*
# The Sample code for driving single URM04 measuring distance function
# Editor : Lauren
# Date : 2012.2.8
# Ver : 0.3
# Product: URM04 Ultrasonic sensor
# Specification
* Detecting range: 4cm-500cm
* Resolution : 1cm
* Interface : RS485
* Units: Range reported in cm
* Temperature sensor: 12 bits reading from serial port
# Description:
# finish driving single URM function
# if use the IO expansion shield to drive the urm sensors, the measuring rate may be 20Hz or slower[if
you want].
# The sample code is compatible with the Arduino IDE 1.0 and also the earlier version.
*/
#include "Urm4parser.h"
void setup(){
urmInit(); // Init the URM04 sensor
}
void loop(){