New kid in town : Pico W

This page was last updated : 05-Jul-22 21:23:05

On 30 june 2022 I got a mailing from RaspberryPI  store that the Raspberry PI foundation has released a new PI Pico which also includes a wireless module for Wifi and Bluetooth.

So I ordered 4 of them to get myself familiar with this new microcontroller and to do some experiments with it. And 1 day later postman dropped of a package. 


More info can be found on these links : 

To sum it all up :

The Raspberry PI Pico W is a low-cost, high-performance microcontroller board with flexible digital interfaces. Key features like the PI Pico include:

  • RP2040 microcontroller chip designed by Raspberry Pi in the United Kingdom
  • Dual-core ARM Cortex M0+ processor, flexible clock running up to 133 MHz
  • 264kB of SRAM, and 2MB of on-board Flash memory
  • Castellated module allows soldering direct to carrier boards
  • USB 1.1 Host and Device support
  • Low-power sleep and dormant modes
  • Drag & drop programming using mass storage over USB
  • 26 multi-function GPIO pins
  • 2×SPI, 2×I2C, 2×UART, 3×12-bit ADC, 16×controllable PWM channels
  • Accurate clock and timer on-chip
  • Temperature sensor
  • Accelerated floating point libraries on-chip
  • 8×Programmable IO (PIO) state machines for custom peripheral support
  • CYW43439 wireless chip (supports IEEE 802.11 b/g/n wireless LAN, and Bluetooth 5.2; of these, only wireless LAN is supported at launch.)


Pin diagram (c) Raspberry PI foundation.


TODO : add more findings.

Let try it 

With now the WIFI on board, I had to try something. In the document :  Connecting to the internet with Raspberry Pi Pico W small webserver example program in MicroPython, and although I normally program in C / C++, I thought  it would be great to try some other language. So this was me trying MicroPython for the first time, and have say it works nice.

Maybe I'm going to work more with it. 

import network
import socket
import time
import uasyncio as asyncio
from machine import Pin

led = Pin(15, Pin.OUT)
onboard = Pin("LED", Pin.OUT, value=0)
ssid = 'YOURSSID'
password = 'YOURPASSWD'
html = """<!DOCTYPE html>
    <head> <title>Pico W</title> </head>
    <body> <h1>Pico W</h1>
        <p>Current state : %s</p>
        <p><a href="/light/on">Set LED on<a/><p>
        <p><a href="/light/off">Set LED off<a/><p>
wlan = network.WLAN(network.STA_IF)

def connect_to_network():
    wlan.config(pm = 0xa11140) # Disable power-save mode
    wlan.connect(ssid, password)

    max_wait = 10
    while max_wait > 0:
        if wlan.status() < 0 or wlan.status() >= 3:
        max_wait -= 1
        print('waiting for connection...')

    if wlan.status() != 3:
        raise RuntimeError('network connection failed')
        status = wlan.ifconfig()
        print('ip = ' + status[0])
async def serve_client(reader, writer):
    print("Client connected")
    request_line = await reader.readline()
    print("Request:", request_line)
    # We are not interested in HTTP request headers, skip them
    while await reader.readline() != b"\r\n":

    request = str(request_line)
    led_on = request.find('/light/on')
    led_off = request.find('/light/off')
    print( 'led on = ' + str(led_on))
    print( 'led off = ' + str(led_off))

    stateis = ""
    if led_on == 6:
        print("led on")
        stateis = "LED is ON"

    if led_off == 6:
        print("led off")
        stateis = "LED is OFF"

    response = html % stateis
    writer.write('HTTP/1.0 200 OK\r\nContent-type: text/html\r\n\r\n')

    await writer.drain()
    await writer.wait_closed()
    print("Client disconnected")

async def main():
    print('Connecting to Network...')

    print('Setting up webserver...')
    asyncio.create_task(asyncio.start_server(serve_client, "", 80))
    while True:
        await asyncio.sleep(0.25)
        await asyncio.sleep(5)


 Source code converted to html with  and I have put the source code in this zipfile.