microbit-foundation / dev-docs

The content of the tech.microbit.org site
https://tech.microbit.org
Other
56 stars 70 forks source link

Document how to stream audio from the micro:bit #169

Open microbit-mark opened 4 years ago

microbit-mark commented 4 years ago

For the micro:bit device:

Build codal with the 'mems_mic_test()' function as the only thing in main() https://github.com/microbit-foundation/codal/blob/4ba584f78b61ce9789e548389a77ff542fe5a9f8/source/MicrophoneTest.cpp#L51

(or use the hex attached to this issue)

Copy the resulting hex to the micro:bit

On the host machine

Configure CoolTerm with the following settings:

image

Choose "Connection"-->"capture to text/binary file"-->"start recording"

Save to a file called "data.raw" Make some noise Choose "connection"-->"Capture to text/binary file"-->"stop"

In Audacity, choose File-->Import--> Raw Data

Select data.raw

Choose settings as follows

image

(Signed 8-bit, little endian, Mono, 11kHz)

That should be your audio

Known issues:

Right now (23rd Sept 2020) there's a DAL bug which means you get lopsided audio as follows image

MICROBIT-SIGNED8BIT-STREAMER-BIAS_NETWORK.HEX.zip