Skip to content

Turn buzzer on and off #42

@jedie

Description

@jedie

On ODROID-GO the buzzer makes noises when it is on and nothing is being played. Don't know if this is common on ESP32 devices?

It seems there is already a turn on/off functionality: In RTTTLStream I found:

# Ensure buzzer is off
self.buzzer.duty_u16(0)

It's called after play.

In ODROID-GO the buzzer can be turn on off in a different way, e.g.:

buzzer = PWM(Pin(BUZZER_PIN, Pin.OUT, value=1), duty=5)
dac_pin = Pin(BUZZER_DAC_PIN, Pin.OUT, value=1)
dac_pin.value(1)  # Unmute
dac_pin.value(0)  # Mute

See also: #40

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions