adafruit_tfmini

A CircuitPython/Python library for Benewake’s TF mini distance sensor

  • Author(s): ladyada

Implementation Notes

Hardware:

Software and Dependencies:

class adafruit_tfmini.TFmini(uart, *, timeout=1)

TF mini communication module, use with just RX or TX+RX for advanced command & control. :param uart: the pyseral or busio.uart compatible uart device :param timeout: how long we’ll wait for valid data or response, in seconds. Default is 1

distance

The most recent distance measurement in centimeters

mode

The measurement mode can be MODE_SHORT (2) or MODE_LONG (7)

strength

The signal validity, higher value means better measurement