I like the small beep at the end of bootup in OpenCat32 but I am growing very tired of hearing the melody that plays at the beginning of bootup. How can I silence (but not delete) that boot up melody?
I tend to think of documentation (whether embedded or in separate files) as keeping code working. It allows other people (and you, when you've forgotten) to maintain and extend the code and functionality, or fix bugs. With the documentation you don't have to make all the changes yourself - others can pick up some of the load and add velocity.
It's about assuring the future of the code and the work you've invested in it.
You can use the 'b' command (mute). You can send it using the serial monitor in Arduino. Note that it turns off all sound, so you won't get the tone for each command you give it. When you send the sommand the response should indicate the mute ("Muted", "Unmute". It should persist over reboots as well., i.e, it updates the EEPROM.
but instead of hearing no bootup melody, I now hear a completely different (and fractionally more annoying) melody. It's the AutoInit melody, triggered by the fact that I also updated my git fork with the "240422" code! That is what I get for making two changes!
Here is what the serial monitors said:
k
Flush the serial buffer...
* Start *
Bittle
Software version: B02_240422
Buzzer volume: 5/10
Scanning I2C network...
- I2C device found at address 0x54 !
- I2C device found at address 0x68 !
- done
Set up the new board...
Unmute and set volume to 5/10
- Name the new robot as: BittleDF
- Reset the joints' calibration offsets? (Y/n):
I said "n"!
I am surprised that this renamed the Bluetooth name of the Bittle!
I then rebooted again and this time I did not hear the bootup melody. Success!
The source Change Log (here: https://github.com/PetoiCamp/OpenCatEsp32/blob/main/ChangeLog.md) says "Add a token 'S' to toggle on/off the boot-up melody" And there's this commit: https://github.com/PetoiCamp/OpenCatEsp32/commit/e2a793e7a7ded66abc014da8cbe25f96065a8dce has the comment "improve gyro token; use S to mute" And here's the commit with the code "bootup sound; damper motion" https://github.com/PetoiCamp/OpenCatEsp32/commit/80c16a63deedcc193b3ef5973592b4f4aa5edd8c
If you're looking for a programmatic solution you want to look at initRobot and i2cEepromSetup.
You can use the 'b' command (mute). You can send it using the serial monitor in Arduino. Note that it turns off all sound, so you won't get the tone for each command you give it. When you send the sommand the response should indicate the mute ("Muted", "Unmute". It should persist over reboots as well., i.e, it updates the EEPROM.