Example Code for Arduino-Get Distance, Temperature, Address and Unit
Last revision 2026/01/15
Wiring Diagram
URM module and the control module is connected via supporting cable or DuPont cable. Any I2C interface can be used.


- In the cascade mode, the module cannot be the same address.
Sample Code
- Get distance: See sample URM_I2C_measure.
- Get temperature: See sample URM_I2C_measure.
- Set address: See sample URM_I2C_set. When multiple modules to be cascaded are same address or unknown, please first connect module by individual way and set the corresponding address. For the convenience of the late identification, proposal paste the address label on the module.
- Set unit of distance: See sample URM_I2C_set.
Example link:[ https://github.com/DFRobot/DFI2C DFRobot_I2C library and samples].
Was this article helpful?
