![]() The firmware we flashed onto our Pico W earlier has this library included, so we can go ahead an use it. In our case we’re going to make use of the GET Request functionality that urequests offers to simplify our code. Urequests is a Network Request module and wraps up a heap of useful network functionality. We can simplify the code above by using a Python library called urequests. We can see the result of the program in the Shell area at the bottom of the Thonny window Raspberry Pi Pico Reading Google Home Page Reading the Google Home Page using the Raspberry Pi Pico W and urequests Prints the result of the GET Request in the Shell.Connects to the returned IP address using a Socket connection.Gets the IP Address of the Google homepage,.This code performs the following functions You’ll need to enter your Wi-Fi SSID and Password, then go ahead and save this file to the Pico W with the filename of “Internet”. # Create a socket and make a HTTP request Raise RuntimeError('network connection failed')Īi = socket.getaddrinfo("", 80) If we now enter the following at the REPL prompt, we should see the Raspberry Pi Pico W MicroPython Interperter return us the result ![]() Once you select the Raspberry Pi Pico W from the Interpreter list, you’ll see the Shell area update informing us that it’s connecting successfully Thonny connected to Raspberry Pi Pico W We can interact with the MicroPython on the Raspberry Pi Pico W by selecting it from the Interpreter list in the bottom right hand corner of the Thonny Window Select Raspberry Pi Pico W in Thonny IDE The REPL allows us to directly interact with Python, where we can enter and run commands and have Python evaluate these commands and return a response. The top portion of the window is the editor are for our code, the bottom are is the shell and gives us access to the REPL, or “Read Evaluate Print Loop”. You’ll be shown the main Thonny IDE Thonny IDE With Thonny installed, go ahead and launch it. Once you’ve downloaded Thonny, go ahead and install it Testing MicroPython on the Raspberry Pi Pico W We can do this via Thonny, which is an IDE for Python. The Pico is now running MicroPython and ready for us to start developing on Downloading and installing ThonnyĪt this point we need a way to interact with MicroPython on the Pico W. We can now drag the Firmware file we downloaded onto the Raspberry Pi Pico W Drive to flash the MicroPython firmware Flash Raspberry Pi Pico W FirmwareĪt this point you’ll see and likely hear the Pico disconnect from the PC and dissapear from the drive list. If you open File Explorer now, you should see your Raspberry Pi Pico W appearing as a Drive Raspberry Pi Pico W Drive To do this we need to hold the “BOOTSEL” button down while connecting the Pico W to our machine Raspberry Pi Pico W “BOOTSEL” button Next we need to flash the MicroPython Firmware onto the Raspberry Pi Pico W.įor this process, we’ll need to put the Pico in Bootloader mode. uf2 Flash the MicroPython Firmware onto the Raspberry Pi Pico W Choose the latest file Raspberry Pi Pico W MicroPython Firmwareįor this blog post I used v1.19.1-102-g07cae9178 (). There will be a list of available firmware files available, all with a. The first thing to do is download the latest MicroPython firmware for Raspberry Pi Pico W from the MicroPython site here ĭownload Raspberry Pi Pico W MicroPython Firmware. The following retailers supply the Raspberry Pi Pico W ĭownload the MicroPython Firmware for the Raspberry Pi Pico Wīefore we can start using our Raspberry Pi Pico W, we’ll need to flash the correct Firmware onto the device. ![]() However, this stock initial shortage will likely ease in the coming weeks. As of the time of writing, everywhere is out of stock sadly. ![]() With only a £2 price hike, the new Raspberry Pi Pico W is a highly affordable IoT device at only £6.įor the UK Market, there are a few licensed retailers for the Pico W. In this blog post, I’ll take you through everything you need to get started with the Raspberry Pi Pico W and get a simple web server up and running.įor this post I’ll be using Windows 11, however for the most part, the guide will be the same on other operating systems. The new Raspberry Pi Pico W board now has onboard Wi-Fi enabling online connectivity for the diminutive board. The Places view has been reinstated and is no longer a separate switchable view but now a small panel at the top of the directory browser.On 30th June 2022, Raspberry Pi released a new version of their in house designed Microcontroller Board, the Raspberry Pi Pico.
0 Comments
Leave a Reply. |