Skip to content

MakeCode ring tone 0 Hz creates non-zero signal on P0 #492

@martinwork

Description

@martinwork

Arising from: microsoft/pxt-microbit#3820

When a MakeCode program uses ring tone 0 Hz, P0 outputs a 45.5KHz signal at around 512 with an amplitude of 100.
https://makecode.microbit.org/_WaxWvD9xg6oq

This may be related to the fact that for 0 Hz, MakeCode only sets the value (i.e. volume).
https://github.com/microsoft/pxt-microbit/blob/master/libs/core/pins.cpp#L373

There seems to be an initialisation problem, with workaround like this.
https://makecode.microbit.org/_WdedFDE2R6R3

The pause is required. Then the signal measured with another micro:bit looks like the V1 output (mostly 0).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions