I’ve seen lots of python and cpp codes for ardwino but I need and I’m looking for the code of the grove ultrasonic ranger to use with zolertia2 remote (on contiki OS).
We do not have the zolertia2 modules. you can base on below arduino code to write your own code. The distance equals duration/58. Duration is the ultrasonic trig to echo time travel slot and unit is uS. The distance unit is cm. thanks.
duration = pulseIn(_pin,HIGH);
RangeInCentimeters = duration/29/2;