default

Example of the component esp-idf-lib/ultrasonic v1.0.5
# Example for `ultrasonic` component

## What it does

It measures and shows distance to an obstacle in loop.
This example is compatible with any ultrasonic module with `TRIGGER` and `ECHO` pins.

## Wiring

| Name | Description | Defaults |
|------|-------------|----------|
| `CONFIG_EXAMPLE_TRIGGER_GPIO` | GPIO number connected to `TRIGGER` pin | "4" for `esp8266` and `esp32c3`, "17" for `esp32`, `esp32s2`, and `esp32s3` |
| `CONFIG_EXAMPLE_ECHO_GPIO` | GPIO number connected to `ECHO` pin | "5" for `esp8266` and `esp32c3`, "16" for `esp32`, `esp32s2`, and `esp32s3` |

To create a project from this example, run:

idf.py create-project-from-example "esp-idf-lib/ultrasonic=1.0.5:default"

or download archive (~2.72 KB)