NestGen2.Piezo (nest_gen2 v0.6.6)

Copy Markdown View Source

The piezo buzzer (pwm-beeper on /dev/input/event0).

click/0 plays Nest's own dial click: 2000 Hz for 3 ms, from the stock product.config.

Summary

Functions

Returns a specification to start this module under a supervisor.

Plays Nest's dial click. Clicks closer than 15 ms together are dropped.

Whether the dial clicks on every step (see NestGen2.Dial.set_step/1).

Plays a tone; returns immediately.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

click()

@spec click() :: :ok

Plays Nest's dial click. Clicks closer than 15 ms together are dropped.

set_click_on_step(on?)

@spec set_click_on_step(boolean()) :: :ok

Whether the dial clicks on every step (see NestGen2.Dial.set_step/1).

start_link(_)

tone(hz, duration_ms)

@spec tone(pos_integer(), pos_integer()) :: :ok

Plays a tone; returns immediately.