You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The music module can only handle playing music on one pin at a time, it's not supported to mix different pins in calls to play/pitch/stop/etc.
For the test script attached above, what happens is that the PWM is started on pin2 and then music.stop() stops the music subsystem and cancels the PWM on pin0. But pin2 continues to have PWM output on it and will never be turned off (unless it's used again) because the music subsystem is now idle.
I don't think anything really needs to be fixed here. Rather the docs could be updated to mention this, that you must use the same pin for all subsequent calls to the music module.
Why isn't the 12 millisecond time not expiring on ubit.pin2?
Because when music.stop() is called it stops everything related to music, including the timeout for pin2. So there is never any event which stops PWM on pin2.
I have this program which plays 440Hz on
pin2
. I stoppin0
withmisic.stop()
. The short note playing onpin2
latches.latch03.py.txt
The text was updated successfully, but these errors were encountered: