A library for the RFD77402 ToF distance-sensor. It's a port form the sparkfun-arduino-library.
RFD77402 ToF-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
ReadMe.md
- Committer:
- glx
- Date:
- 2017-11-21
- Revision:
- 0:661414c07859
File content as of revision 0:661414c07859:
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, becauce 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://cdn.sparkfun.com/assets/parts/1/2/3/1/9/RFD77402_Brochure.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