I am trying to do the snowglobe project on a Playground BLE with Makecode
Found the beta version that supports BLE and did a simple copy/paste of the javascript from the adafruit version to the BLE version.
I can create the UF2 file, and download and copy it to my Playground.
If I shake the Playground, the code runs, and plays the tunes as expected...
But it only does this once. If I shake it again, the LEDs flash as before, but there is no sound.
If I unplug and plug it back in, there is still NO sound (but the LEDs flash as expected).
So, it seems that something is getting reset when I copy the UF2 over, because if I copy it over again, it will work.. once.
Any ideas what I'm missing? what might be going on? (I tried updating the boot loader.. but that lead to another problem).
Thanks.
Playground BLE and Makecode and Sound
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- vrtisworks
- Posts: 14
- Joined: Sat Mar 05, 2016 11:02 am
Re: Playground BLE and Makecode and Sound
Some additional information.
In the sample code for the SnowGlobe, there is a block "StopAllSounds", at the end of the "play music" function.
Apparently with the BLE code, this toggles the pin to enable/disable the onboard speaker. If I remove the StopAllSounds block, then the tones play each time I shake the BLE.
I can't find a function to start (enable?) sounds.
There is some documentation that says the SPEAKER_ENABLE (which is defined under board in python) is pin 11.. but I don't see any pins labeled that in the Makecode.
In the sample code for the SnowGlobe, there is a block "StopAllSounds", at the end of the "play music" function.
Apparently with the BLE code, this toggles the pin to enable/disable the onboard speaker. If I remove the StopAllSounds block, then the tones play each time I shake the BLE.
I can't find a function to start (enable?) sounds.
There is some documentation that says the SPEAKER_ENABLE (which is defined under board in python) is pin 11.. but I don't see any pins labeled that in the Makecode.
Please be positive and constructive with your questions and comments.