Skip to main content

MicroPython Library for Ultrasonic Sensor, created by DIYables

Project description

MicroPython Ultrasonic Sensor Library - DIYables_MicroPython_Ultrasonic_Sensor

This MicroPython Ultrasonic Sensor library is designed for any hardware platform 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 platform 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.2.tar.gz.

File metadata

File hashes

Hashes for diyables_micropython_ultrasonic_sensor-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e653f3522a99524c0f9eab3086cd4a487ce51f24720e467b42b1efdd7c2762f3
MD5 d16976b9da807160ad8e01c9dba30a14
BLAKE2b-256 9c3ad05754d31c24e2418aaff80e0d5393251c6a8f2cedd595878dc0d43144d4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DIYables_MicroPython_Ultrasonic_Sensor-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6b08ce0f2f7d11244f456321f344812fadbea876c24e45f7d4e86ab564775b58
MD5 735e32c19deb2d9e9afbfb0500541685
BLAKE2b-256 c4e19eec40cb852f3b67fea4410acd3885bddcdf51ed99d28ee388a073d78b88

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