Raspberry Pi

Raspberry Pi Pico W: first connection 

 September 8, 2022

By  Peter

I got a brand-new Raspberry Pi Pico W, courtesy of Sunfounder, and took a day to play with it. In the video (above) and the article in this page I have documented my experimentation with this powerful new microcontroller board.

List of hardware, software, resources

In this experiment, I used this hardware:

I also used this software:

Other useful resources that I mention in the video:


For the experiment, the wiring is very simple. As I have not decided what I want to do with my Raspberry Pi W, I decided not to solder the headers. I still wanted to use an external LED for the blink example.

So, I wrapped the LED and resistor pins together (no soldering needed). Here is how to do this:

  1. Find the cathode of the LED (the shorter of the two pins). If both pins have the same length, use the diode function of your multimeter to determine the cathode.
  2. Take one pin of the resistor, and wrap it around the cathode pin of the LED.
  3. Take the free pin of the resistor, pass it through the GND pad of the Raspberry Pi Pico. There are several GND pins on the Raspberry Pi Pico; you should use the one that is next to the GP2 pad, close to the USB connector. Gently bend the resistor pin in a loop and wrap it around it self to minimize movement.
  4. Take the free pin of the LED (the anode) and pass it through the GP2 pad of the Raspberry Pi Pico. Gently bend the LED pin in a loop and wrap it around it self to minimize movement.
  5. In the end, your resistor and LED should be attached to the Raspberry Pi like in the example in the photo (place your mouse pointer over the image to zoom in).

Example code

In this experiment I used simple Micropython code to control the LED, check the model of the Raspberry Pi Pico, and fetch data from the Internet. You can find this code here:

Make the LED blink

>>> from machine import Pin
>>> led = Pin(2, Pin.OUT)
>>> led.value(1)
>>> led.value(0)

Get the model of the Raspberry Pi Pico

>>> import sys
>>> sys.implementation
(name='micropython', version=(1, 19, 1), _machine='Raspberry Pi Pico W with RP2040', _mpy=4102)

Connect to Wifi and fetch data from the Internet

import network

ssid = 'wifi-id'
password = 'wifi-password'

wlan = network.WLAN(network.STA_IF)
wlan.connect(ssid, password)

# Make GET request
import urequests
#r = urequests.get("https://www.google.com")
r = urequests.get("http://date.jsontest.com")

Learn MicroPython with the ESP32

With this course, you will learn how to use the MicroPython programming language with the ESP32 microcontroller.

MicroPython is a high-level programming language specifically designed for microcontrollers and resource-limited embedded devices. Think of MicroPython as “Python for Microcontrollers”.

Learn more…


You may also like

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

In this Maker Mind Meld summit presentation, Dal Gemmell talks about a new generation of wireless networks, based on cutting-edge blockchain technology, that delivers a new kind of open, decentralized wireless network built by individuals

Read More
Dal Gemmell – A blockchain-powered decentralized network owned by you

Happy New Year! The turn of a year is an opportunity to reflect (look back) and plan (look forward). 2022 was another challenging year in many respects, and 2023 will be no less challenging. However,

Read More
Start 2023 with Tech Explorations