Skip to content

tone() used with delay() #110

Open
Open
@cds333

Description

@cds333

If the delay is less than the duration no tone will play. Using delay() after tone() only works if the delay is longer than the tone's duration, and then only for the time that is equal to (duration - delay)

For example, looping the following plays nothing:

tone(piezoPin, 2000, 500);
delay(500);

While looping the following plays 500ms tones followed by 50ms of silences

tone(piezoPin, 2000, 500);
delay(550);

Using official build 1.8.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions