Help with "wifi = presto.connect()" on presto

I’ve got simple apps running using Mu on my presto (after I read I should act like it’s a pico), for instance, vector_full_clock.py is running with no issues.

Now I’m trying to get more complicated, and trying out the word_clock.py example and getting this:

malloc self
set fb pointers
m_new_class(ST7701...
launch core1
launched core1
core1 returned
Traceback (most recent call last):
  File "<stdin>", line 54, in <module>
  File "presto.py", line 59, in connect
  File "asyncio/core.py", line 1, in run_until_complete
  File "asyncio/core.py", line 1, in run_until_complete
  File "asyncio/core.py", line 1, in run_until_complete
  File "ezwifi.py", line 65, in connect
  File "ezwifi.py", line 108, in _secrets
ValueError: secrets.py: WIFI_SSID is empty!
>
MicroPython feature/presto-wireless, presto v0.0.6 on 2025-01-08; Presto with RP2350
Type "help()" for more information.

I’ve played around with circuit python in the past on adafruit boards, and had access to the devices in my filesystem on macos to add a file like secrets.py, but do not see access to the presto board unless I am flashing.

I’ve added “from secrets import WIFI_SSID, WIFI_PASSWORD” to the code, and changed the secrets.py on the local drive where all the code is (but that is not on the device so does not surprise me that it is not working) and still get:

ValueError: secrets.py: WIFI_SSID is empty!

I’m clearly missing something basic but can’t google my way out of it currently. I see examples of people getting other ways of wifi working, and those fail too for me.

Any pointers anyone?

OS: macos
Editor: Mu
presto: beta
firmware: presto-v0.0.6-micropython-with-filesystem.uf2

…is there actually a file “secrets.py” in the Pico’s file system, providing the properly set variables “WIFI_…”?
Usually they are just called “SSID” and “Password”…

You can name it whatever you want, but it needs to be consistent…

Just saw the error reads there is no PW set in the file!
ValueError: secrets.py: WIFI_SSID is empty!
Open the file secrets.py and add the PW there…don’t forget to save properly again to the Pico…

In Thonny, once you have edited your secrets.py, click file save as, and save it to the Pico.
Also, in Thonny, click view and select files. That will show you what files are stored on the Pico.

Ok, I switched to using Thonny, and I can see all files on the device as opposed to locally. I changed the secrets, and we are off to the races. Thanks for the pointer to use Thonny, although maybe Mu can do this? Either way, I am all set now. Cheers!

I use Thonny for ages - so swift and lightweight…all you need.

For better visuals, I use the dracula theme [1], which brings it more close to Visual Studio Code.
Can be also downloaded and applied right from within Thonny…

Cheers

[1] Thonny • Dracula Theme