-
1Setup the board and environment
There are lots of good tutorials on the web, but here are the concise steps.
Download the latest "uf2" file from MicroPython for raspberry pi pico w
Download the "nuke" uf2 file from Adafruit, because if something goes wrong, you load this uf2 to restore the pico w and wipe any weird state (I'm looking at you, watchdog timer...).
Connect your raspberry pi pico w to your computer while pressing the reset button.
Drag and drop this file on the drive on the pico, and wait for it to reset.
Install Thonny so you have an environment.
Run Thonny, then use Run->Configure Interpreter, select MicroPython (Raspberry Pi Pico), and then select the correct Port for your pico w.
Make sure you can see the local computer files, and the pico w files by going to View->Files.
Now, you can place your HTML, images files, etc., in the "/" directory of the pico w.
-
2Get the code from Github
Head on over to github and download serve_file.py
You can run this, or if you want it to run all the time, rename it main.py so it can run without Thonny.
You will need to create your own wifi_info.py which has two variables, ssid - a string for the ssid name, and wifi_password, your password.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.