Skip to content

Upgrade MicroPython to 2.1.0-beta.3 #964

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

Merged
merged 4 commits into from
Sep 16, 2022
Merged

Conversation

microbit-robert
Copy link
Collaborator

No description provided.

@github-actions
Copy link

@microbit-robert
Copy link
Collaborator Author

microbit-robert commented Sep 15, 2022

The following code works with the update (i.e., the use of waveform). However, the micro:bit constantly generates noise after the sound effect has played and cannot be stopped.

from microbit import *

a = audio.SoundEffect()
a.waveform = audio.SoundEffect.WAVEFORM_SINE
while True:
    if button_a.was_pressed():
        audio.play(a)
    if button_b.was_pressed():
        audio.stop()
    sleep(500)

@microbit-carlos
Copy link
Contributor

Looks like playing any Sound Expression triggers this, same problem with audio.play(Sound.HAPPY):

@microbit-carlos
Copy link
Contributor

This is likely something introduced by CODAL, I think I'll retract beta.2, and release beta.3 with an older CODAL.

@microbit-robert microbit-robert marked this pull request as draft September 15, 2022 16:01
@JohnVidler
Copy link

This should now have been fixed in CODAL v0.2.43 ( https://github.com/lancaster-university/codal-microbit-v2/releases/tag/v0.2.43 ) which removes a single timing line in the emoji synth that seems to selectively affect higher-level languages.

@microbit-robert microbit-robert marked this pull request as ready for review September 16, 2022 13:30
@microbit-robert microbit-robert changed the title Upgrade MicroPython to 2.1.0-beta.2 Upgrade MicroPython to 2.1.0-beta.3 Sep 16, 2022
Copy link
Collaborator

@microbit-matt-hillsdon microbit-matt-hillsdon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now. I've added the type stubs and we've updated the simulator on microbit-foundation/micropython-microbit-v2-simulator#65

@microbit-matt-hillsdon microbit-matt-hillsdon merged commit c7409c4 into main Sep 16, 2022
@microbit-matt-hillsdon microbit-matt-hillsdon deleted the micropython-update branch September 16, 2022 14:05
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

Successfully merging this pull request may close these issues.

4 participants