CP Bluefruit no sound after reset

Play with it! Please tell us which board you're using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
lukagra
 
Posts: 3
Joined: Sat Jan 27, 2018 6:44 pm

CP Bluefruit no sound after reset

Post by lukagra »

Hello,
My daughter got her Circuit Playground Bluefruit. She’s playing with it with MakeCode Maker editor. I know support is still in beta but just wanted to let you know what we see. She’s all very exited but there is some issue with sound output. It plays ok only right after putting the code on the device. After a reset (or power cycle) the speaker just makes a silent buzz. You can see and hear it on the clip I’ve made
https://share.icloud.com/photos/049uMKD ... uU1Po2lLcg
Any ideas why this happens? Can we fix it with upgrade or something?
The code generated it like this

Code: Select all

 def on_button_b_long_click():
    music.set_volume(125)
    music.power_up.play_until_done()
    if input.button_b.was_pressed():
        pause(1000)
        light.set_brightness(25)
        light.set_all(0x007fff)
        pause(1000)
        light.set_all(0x7f00ff)
        pause(1000)
        light.set_all(0xff00ff)
        pause(1000)
        light.set_all(0xff9da5)
        pause(1000)
        light.set_brightness(0)
input.button_b.on_event(ButtonEvent.LONG_CLICK, on_button_b_long_click)
 
def on_button_a_click():
    light.set_brightness(20)
    light.default_strip().set_gradient(0xff0000, 0xffff00)
    music.set_volume(125)
    music.play_melody("B A G A A B G B ", 450)
    music.play_melody("F E D E E F D F ", 450)
    light.set_brightness(0)
    
input.button_a.on_event(ButtonEvent.CLICK, on_button_a_click)

def on_gesture_shake():
    music.set_volume(125)
    light.set_brightness(20)

    def on_run_in_parallel():
        music.play_melody("G A A G A B B A ", 240)
        light.default_strip().set_pixel_color(0, 0xff0000)
        pause(100)
        light.default_strip().set_pixel_color(1, 0xff8000)
        pause(100)
        light.default_strip().set_pixel_color(2, 0xffff00)
        pause(100)
        light.default_strip().set_pixel_color(3, 0xff9da5)
        pause(100)
        light.default_strip().set_pixel_color(4, 0xb09eff)
        pause(100)
        light.default_strip().set_pixel_color(5, 0x7f00ff)
        pause(100)
        light.default_strip().set_pixel_color(6, 0xff00ff)
        pause(100)
        light.default_strip().set_pixel_color(7, 0xff0080)
        pause(100)
        light.default_strip().set_pixel_color(8, 0xff8000)
        pause(100)
        light.default_strip().set_pixel_color(9, 0xff0000)
        pause(2000)
        light.set_brightness(0)
    control.run_in_parallel(on_run_in_parallel)

input.on_gesture(Gesture.SHAKE, on_gesture_shake)

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: CP Bluefruit no sound after reset

Post by mikeysklar »

Does it make a difference if the USB is disconnected and run off the battery?

Ditto for vice-versa. USB connected and battery disconnected?

User avatar
lukagra
 
Posts: 3
Joined: Sat Jan 27, 2018 6:44 pm

Re: CP Bluefruit no sound after reset

Post by lukagra »

No, it's the same regardless of connections. The only way to make it work is to connect baterry and USB, put new code file, turn on battery and disconnect usb. But this lasts till turn off.

User avatar
lukagra
 
Posts: 3
Joined: Sat Jan 27, 2018 6:44 pm

Re: CP Bluefruit no sound after reset

Post by lukagra »

I’ve checked that using original code file from here
https://cdn-learn.adafruit.com/assets/a ... 1620059549
does work ok! Speaker works ok after multiple reset or turning off. So it’s a problem with Maker code, right?

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: CP Bluefruit no sound after reset

Post by mikeysklar »

Yes, the test comparing stock code to your modified MakeCode is a great one. Something about the customized code is causing the sound not to come back.

Locked
Please be positive and constructive with your questions and comments.

Return to “Circuit Playground Classic, Circuit Playground Express, Circuit Playground Bluefruit”