basic

Example of the component leoribg/pulse_generator v1.0.1
# pulse_generator — basic example

Emits a finite train, waits for it, then runs an endless train and stops it.

## Build and run

- `idf.py set-target esp32` (or `esp32s3`, `esp32c6`, ...)
- `idf.py menuconfig` — optional, see `Component config -> Pulse Generator`
- `idf.py build flash monitor`

## Wiring

The example defaults to `EXAMPLE_PULSE_GPIO` = 25 in open-drain mode with the
line idling high, which assumes an external pull-up to 3.3 V.

- Change `EXAMPLE_DRIVE_MODE` to `PULSE_GEN_DRIVE_PUSH_PULL` and
  `EXAMPLE_IDLE_LEVEL` to `0` when driving an external NPN or N-channel MOSFET.
- Never connect the pad directly to a bus pulled above 3.3 V. See
  `docs/HARDWARE.md` in the repository.

## Expected output

- 10 pulses of 50 ms at 1 Hz, then a log line reporting completion.
- A 1 kHz 50 % train for 5 s, then the line returns to idle.

To create a project from this example, run:

idf.py create-project-from-example "leoribg/pulse_generator=1.0.1:basic"

or download archive (~2.73 KB)