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: UART, *, timeout: float = 1)

TF mini communication module, use with just RX or TX+RX for advanced command & control.

Parameters:
  • uart – the pyseral or busio.uart compatible uart device

  • timeout – how long we’ll wait for valid data or response, in seconds. Default is 1

property distance: int

The most recent distance measurement in centimeters

property mode: Literal[2, 7]

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

property strength: int

The signal validity, higher value means better measurement