Skip to content

Fix modelling of microbit module's audio, compass etc? #6

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

Open
microbit-matt-hillsdon opened this issue Sep 17, 2021 · 1 comment
Open

Comments

@microbit-matt-hillsdon
Copy link
Contributor

microbit-matt-hillsdon commented Sep 17, 2021

This in microbit/__init__.pyi needs reconsidering:

from . import accelerometer as accelerometer
from . import compass as compass
from . import display as display
from . import i2c as i2c
from . import microphone as microphone
from . import speaker as speaker
from . import spi as spi
from . import uart as uart

None of these are modules at runtime in MicroPython, though they were documented using the directives for modules in the docs. They are actually e.g. MicroBitCompass objects.

audio is actually a module, but for unclear reasons cannot be imported as microbit.audio (via import or from microbit.audio import ...).

@microbit-matt-hillsdon
Copy link
Contributor Author

If we do this we need to carefully consider the impact on the V3 Editor UI. I think it's unlikely we'll make this change without a significant rethink of how we present this information there.

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

1 participant