Closed
Description
Running this programme with the latest CI build and the max value it prints is around 7:
from microbit import *
while True:
print(microphone.sound_level())
sleep(10)
Likely from 4f369bb, although I haven't tested the parent commit to confirm if that's the cause.
For reference, the microphone min and max values used by MakeCode for scaling are bit a different:
- https://github.com/microsoft/pxt-microbit/blob/d80514bda223f729d452c1e51047f3272a2317fb/libs/microphone/microphone.cpp
- https://github.com/lancaster-university/codal-microbit-v2/blob/864e7b87d2968c91c84e8eb204836b67accabda4/model/MicroBit.h#L323-L325
@dpgeorge could you have a look at this one once you get a chance? I've added it to the 2.1 milestone as well.