Skip to main content

MicroPython Library for Ultrasonic Sensor, created by DIYables

Project description

MicroPython Ultrasonic Sensor Library - DIYables_MicroPython_Ultrasonic_Sensor

This MicroPython library is designed for any hardware plaform that supports MicroPython such as Raspberry Pi Pico, ESP32, Micro:bit... to make it easy to use with ultrasonic sensor. It is easy to use for not only beginners but also experienced users...

It is created by DIYables to work with DIYables Ultrasonic Sensor, but also work with products from other brands. Please consider purchasing products from DIYables Store on Amazon to support our work.

Features

  • Works with any hardware plaform that supports MicroPython such as Raspberry Pi Pico, ESP32, Micro:bit...
  • Supports the noise filter (filtering noise from enviroment, ultrasonic interference...)
  • Supports detection threshold. If distance > threshold, the library will not consider any object detected.

Available Functions

  • __init__(trig_pin, echo_pin)
  • set_detection_threshold(distance)
  • enable_filter(num_samples=20)
  • disable_filter()
  • loop()
  • get_distance()

Available Examples

  • main.py

Tutorials

References

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

File details

Details for the file diyables_micropython_ultrasonic_sensor-0.1.0.tar.gz.

File metadata

File hashes

Hashes for diyables_micropython_ultrasonic_sensor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 576242e6f2b4999db5d20dd911ff40f82426ecdf4a587a9434a61a6a4ab87ad3
MD5 236f40f53efab45788560b34ab97cebf
BLAKE2b-256 72f257dd77320e0d59122b8706f57356a2183d7c2aac053000c296b2f7d10d14

See more details on using hashes here.

File details

Details for the file DIYables_MicroPython_Ultrasonic_Sensor-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for DIYables_MicroPython_Ultrasonic_Sensor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 44ff4d575f8b67ba60bebbd344a26069a4fb1fa489526e6c3fb78bf105541a56
MD5 e2a2cf4c25bb45bedb33af8ef2d0c9ca
BLAKE2b-256 e7e806b9e1449c37727599e5a822fef025025cdd2880cfb9d8eb85f6d007f2e5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page