Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mic LED does not turn off when in low power state #8

Open
microbit-mark opened this issue Sep 10, 2021 · 1 comment
Open

Mic LED does not turn off when in low power state #8

microbit-mark opened this issue Sep 10, 2021 · 1 comment

Comments

@microbit-mark
Copy link
Contributor

microbit-mark commented Sep 10, 2021

In this program, the micro:bit enters a sleep state, but the mic LED remains lit.

image

https://makecode.microbit.org/_KbWfyw3zh3PT

I expect that changing this is blocked by lancaster-university/codal-microbit-v2#97, but this seems like a counterintuitive experience for people using the extension. Are we really saving power if the LED is always lit?

cc @jaustin @martinwork

@martinwork
Copy link
Collaborator

Thanks @microbit-mark. I didn't think about that. I think you're right that it comes under the same heading as lancaster-university/codal-microbit-v2#97.

CODAL will be shutting down other components, including the ADC and LEDs, which will save power. Moving the "show icon" block out into "on start" shows that.

I'd feel safer knowing that the light would be on all the time, if micro:bit was going to power up every so often and record me.

I wonder whether the sound values recorded are different depending on whether micro:bit has been in low power mode.

My understanding is that the microphone light is turned on by MakeCode, rather than CODAL.
https://github.com/microsoft/pxt-common-packages/blob/master/libs/microphone/microphonehw.cpp#L41

The macros are defined here:
https://github.com/lancaster-university/codal-microbit-v2/blob/master/model/MicroBit.h#L323

CODAL might turn it off here, maybe (except I think DEEP_SLEEP_GPIO_OUTPUTS is not enabled):
https://github.com/lancaster-university/codal-microbit-v2/blob/master/model/MicroBitIO.cpp#L284

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants