A library for the RFD77402 ToF distance-sensor. It's a port form the sparkfun-arduino-library.

You are viewing an older revision! See the latest version

Homepage

RFD77402 ToF distance-sensor

I just ported the sourcecode provided by sparkfun (available on https://github.com/sparkfun/SparkFun_RFD77402_Arduino_Library) to the mbed-environment. So if you like it, please support them by e.g. buying a sparkfun-board, because in fact they did all the work :)

If you found any errors, please report them, I'm no professinal coder, so maybe there are some things I dindn't consider while porting the library.

The datasheet of the sensor is available at https://media.digikey.com/pdf/Data%20Sheets/RF%20Digital%20PDFs/RFD77402.pdf

The easiest way to use the sensor is e.g.:

RFD77402 MyDistance;                            //create an object-instance
MyDistance.begin(i2c);                          //initialize the sensor

MyDistance.takeMeasurement();                   //tell sensor to take a measurement

uint16_t distance = MyDistance.getDistance();   //get the last measurement result

All wikipages