Tab5 - Speaker init after crash (using Arduino IDE)
-
If my sketch crashes for any reason, I lose the ability to hear anything from the speaker. to rectify, I need to
a) Turn Tab 5 off (power button)
b) Connect headset to jack and turn on Tab 5
c) I can now hear sounds on the headset;
d) Disconnect the headset
e) Sounds on the external speaker now playsThis is quite cumbersome and being able to do this programmatically would be a big win. ChatGPT is not able to figure this out.
I notice @felume has a "SetSpeakerEnable" in his repo but I cannot get this to work either https://github.com/felmue/M5Tab5/blob/main/src/M5Tab5.cpp#L101
Just wondering if anyone has observed this behavior and have any software workarounds.
thanks!
-
Hello @aleekwen
I am testing with the speaker sample code in M5Unified and then force a crash. And yes, after the automatic reboot the speaker is silent. However a short press on the power/reset button brings the speaker back.
The only thing I noticed, is, that when the battery is attached I sometimes need to reset M5Tab5 twice before the speaker comes back.
BTW: after a reboot the call to
M5.begin()
automatically enables the speaker; there is no need to callM5Tab5.SetSpeakerEnable(true)
.Thanks
Felix