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

music.play(pin=None) causes typeError, expecting a pin #713

Closed
martinwork opened this issue Mar 22, 2021 · 2 comments
Closed

music.play(pin=None) causes typeError, expecting a pin #713

martinwork opened this issue Mar 22, 2021 · 2 comments
Milestone

Comments

@martinwork
Copy link

martinwork commented Mar 22, 2021

Testing with https://python.microbit.org/v/beta
Editor Version: 2.2.0-beta.5;
MicroPython Version: 1.0.1/2.0.0-beta.5

An error occurs if music.play specifies pin=None, either directly or through a variable.

import microbit
from microbit import *
import music

myPin=pin0

while True:
    music.play(music.JUMP_UP)
    sleep(1000)
    
    music.play(music.JUMP_UP,pin=myPin)
    sleep(1000)

    myPin=None
@microbit-carlos microbit-carlos added this to the Version 1.1 milestone Sep 2, 2022
@microbit-carlos
Copy link
Collaborator

Good catch, thanks Martin!
For compatibility with V2 we should to accept None as a pin value in V1 as well.

@dpgeorge
Copy link
Member

dpgeorge commented Sep 9, 2022

Fixed by 1252f88

@dpgeorge dpgeorge closed this as completed Sep 9, 2022
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

3 participants