FLASH Aaaaa
Adding some fun to nRF53 development, or how to add sound effects to your VS Code Tasks
I’m currently working on developing a Bluetooth device using nRF Connect SDK and it gets tedious sometimes so I decided to bring some levity, some flare to my Flashing procedure to amuse and as this is done a gazillion times a day, annoy my coworkers.
To do so I added an additional task to the Flashing task in nRF Connect for VS Code.
In the .vscode folder under my project folder, a new file is created called tasks.json where the nrf-connect-flash task was modified:
{
"tasks": [
{
"label": "play-wav",
"type": "shell",
"command": "C:\\mpg123\\mpg123.exe <PATH-TO-FILE>\\flashgordontheme.mp3",
"problemMatcher": [],
"options": {
"shell": {
"executable": "powershell.exe",
"args": [
"-Command"
]
}
}
},
{
"type": "nrf-connect-flash",
"config": "<PATH-TO-PROJECT>\\build",
"erase": false,
"recover": false,
"softreset": false,
"problemMatcher": [],
"label": "AAaaaa",
"dependsOn": ["play-wav", "nRF Connect: Build: st_ble_sensor/build (active)"]
//"dependsOn": "nRF Connect: Build: st_ble_sensor/build (active)"
}
]
}This uses mpg123 to play an mp3 file of the Flash Gordon theme. Now, each time you are flashing a new firmware onto your device you and the people around you get to enjoy Queens Masterpiece.
If it gets too much you can always comment it out and remove comments from the line below to resume the normal, non-fun procedure. You will probably need to relaunch the VS Code for it to take effect.


