Code example for using an RCWL-1601 sonic sensor via I2C. Make sure to add jumper/zero-ohm resistor on RCWL-1601 device to enable I2C mode.
Also, remember to add pullups to SDA and SCL lines (I used 5.1K)
Code was written and tested using a Particle Boron.
Use all code at your own risk. T. Nilsen