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.1.tar.gz.

File metadata

File hashes

Hashes for diyables_micropython_ultrasonic_sensor-0.1.1.tar.gz
Algorithm Hash digest
SHA256 963f6812fb943b9f0e315ea5dc8ffe3ca1057dd68ab7aa4f45534acb1b962a59
MD5 a50ca0c339a93b5487a4892d473aa0b8
BLAKE2b-256 9aaeac2ed7dca0afbb561ecf0ffe81053005fa7ac3f026e26d11ee827e5bc303

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DIYables_MicroPython_Ultrasonic_Sensor-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c4948d6a7a5d5c0e0c3ee4f342e6e2cf292a35a6cce2a08d4d81b6586f7e9a28
MD5 718c675954d707e2b5a1ceaab0539eb0
BLAKE2b-256 b26000169f3a966f279c4a7f1cd230e7bb2e603f44624ea614386b6e1223fd6b

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