Anvil asyncio and VSCode setup

Hi Alvin Community!
First a big shout out to the developers of Anvil :clap:
Secondly, if anyone is interested in programming the Anvil Pico (Pico flashed with Anvil firmware) with VSCode then read further after my question.

Used environment
-Intel PC running Ubuntu 22.04.4 LTS
-VSCode installed via Snap Store (look for “code”)
-MicroPico VSCode extension from Paul Ober
-Pico W flashed with Anvil Pico firmware

What I’m trying to do:
I am trying to make various asyncio functions work together with the Anvil callable_async function.

What I’ve tried and what’s not working:
I have a working connection with the Anvil Uplink server and the callable_async function pico_fn() is returning a print line to the terminal, each time when the button is pressed (although this takes quite some time, and I haven’t found out yet what causes this delay, but it works consistently).
See following screen shot for the print result:

Unfortunately the code is stuck in this callable_async function as it only executes this code and not the code from the LM35 function and/or the Main async program loop. Both LM35 function and Main program pushbutton and relay code have been tested separately on the Anvil Pico without the uplink connection (just a main.py program handling local functions).

Question:
What am I doing wrong here?
What would be the correct setup for handling multiple asyncio functions?
I used the sample code from the following link which explains about the full control over asyncio:

Code Sample:
Code samples can be found in the github link hereunder.
For obvious reasons the Secrets file is not available.

Clone link:
https://github.com/FreaktheBear/AnvilTest

VSCode setup
Installation of Ubuntu, VScode, and MicroPico will not be described.
With regards to the access of the Anvil Pico via VSCode on Linux, it will be important that you run the permissions script for MicroPico which is described under the MicroPico extension details description pane.
If you don’t want to run the script the following should also work:
-sudo usermod -a -G dialout $USER

For the Extension Settings (cog wheel symbol) use:
-Auto Connect" ticked (standard if am correct)
-Soft Reset After Upload" un-ticked (better to do the reset manual after you upload the project or separate files, I had issues with stopping/accessing the device)

VSCode MicroPico won’t connect when the Anvil Pico is flashed with the full firmware as it starts the boot.py and main.py directly after flashing.
Safe both files via the file manager on your PC for later use and remove both files from the device.
Then reconnect the device.
Now you should be able to connect to the Alvin Pico via the hot key menu ctrl+shift+p and search “MicroPico: Connect”.

If you flash your device with the firmware only file, you should be able to connect to the device directly via MicroPico.

Kind regards,
Freek

Code has been corrected and anvil function is now running concurrently with other functions.