Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A Wi-Fi connection and an HTTPS request let a Raspberry Pi Pico W send a project event to your phone. The practical route is to run MicroPython on a Wi-Fi-capable Pico W-series board, connect it to your network, then call a notification service such as Telegram’s Bot API. A standard Pico without the W suffix has no built-in Wi-Fi.

Check that your Pico has Wi-Fi

Use a Pico W, Pico WH, or a supported Pico 2 W-series board. A non-W Pico does not include built-in Wi-Fi, so it cannot connect directly to a wireless network without additional hardware. Raspberry Pi’s Pico documentation describes the board family and its capabilities.

Install MicroPython firmware made for your exact board. The official MicroPython instructions explain how to flash firmware using a UF2 file: typically, hold BOOTSEL while connecting the Pico to USB, then copy the appropriate UF2 file to the drive that appears. Follow the board-specific instructions and use a stable firmware release rather than assuming a preview build has the same features.

Connect the Pico W to your Wi-Fi network

MicroPython exposes Wi-Fi through the network module. In station mode, the Pico joins an existing access point. The sequence is: create a station interface, activate it, connect using the network name and password, then check whether it connected and received network configuration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Pico 2 W with Color Soldered Header Compatible with Raspberry Pi Pico 2 W
  • RPi Pico 2 W Microcontroller Board (pre-soldered header (color-coded)), Based on Official RP2350 Chip, Dual-core & Dual-architecture Design. Upgraded hardware from Pico 2 with wireless communication, onboard antenna, features 2.4GHz 802.11n WIFI and Bluetooth 5.2.
  • Adopts unique dual-core and dual-architecture design: dual-core Arm Cortex-M33 processor and dual-core Hazard3 RISC-V processor, flexible clock running up to 150 MHz.
  • Onboard Infineon CYW43439 wireless chip, supports WIFI 4 wireless and Bluetooth 5.2.
  • 520KB of SRAM, and 4MB of on-board Flash memory.
  • Castellated module allows soldering direct to carrier boards. USB 1.1 with device and host support. Low-power sleep and dormant modes. Drag-and-drop programming using mass storage over USB.
import network
import time

SSID = "your-wifi-name"
PASSWORD = "your-wifi-password"

wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect(SSID, PASSWORD)

timeout_seconds = 20
start = time.ticks_ms()

while not wlan.isconnected():
    if time.ticks_diff(time.ticks_ms(), start) > timeout_seconds * 1000:
        raise RuntimeError("Wi-Fi connection timed out; check credentials and access point")
    time.sleep(1)

print("Connected:", wlan.ifconfig())

The MicroPython RP2 quick reference documents the WLAN operations. Its development documentation may describe features not present in every released firmware. Also, a connection attempt can retry indefinitely by default, including when credentials are wrong or no access point is available, so the finite timeout above prevents a silent, endless wait.

  • If the timeout expires, verify the SSID and password, confirm the access point is in range and operating, and check that the network configuration is supported by the board and firmware.
  • After connection, wlan.ifconfig() provides the assigned IP configuration; wlan.isconnected() is a straightforward check before making an internet request.

Send a phone notification with Telegram

Telegram’s Bot API is one documented option for turning a Pico event into a phone message. Create a bot in Telegram, obtain its bot token, and determine the target chat ID. Your phone needs Telegram installed and signed in to the account or destination receiving the bot’s message.

Rank #2
SunFounder Raspberry Pi Pico W Ultimate Starter Kit with Online Tutorials, RoHS Compliant, 450+ Items, 117 Projects, MicroPython, C/C++ (Compatible with Arduino IDE)
  • IoT Starter Kit for Beginners: The SunFounder Raspberry Pi Pico W Ultimate Starter Kit offers a rich IoT learning experience for beginners aged 8+. With 450+ components, 117 projects, and expert-led video lessons, this kit makes learning microcontroller programming and IoT engaging and accessible, RoHS Compliant
  • Expert-Guided Video Lessons: This kit includes 27 video tutorials by the renowned educator, Paul McWhorter. His engaging style simplifies complex concepts, ensuring an effective learning experience in microcontroller programming
  • Wide Range of Hardware: The kit includes a diverse array of components like sensors, actuators, LEDs, LCDs, and more, enabling you to experiment and create a variety of projects with the Raspberry Pi Pico W
  • Supports Multiple Languages: The kit offers versatility with support for three programming languages - MicroPython, C/C++, and Piper Make, providing a diverse programming learning experience
  • Dedicated Support: Benefit from our ongoing assistance, including a community forum and timely technical help for a seamless learning experience

The API uses HTTPS endpoints in the form https://api.telegram.org/bot<token>/METHOD_NAME. For a message, call sendMessage with the destination chat_id and message text. Telegram documents GET and POST requests and multiple parameter formats, including JSON. The message text limit is 1–4096 characters after entity parsing. See the Telegram Bot API documentation for the current API details.

Once Wi-Fi works, your MicroPython program can make an HTTPS request to that endpoint. Raspberry Pi’s connectivity guide demonstrates using urequests and closing the response. The following is an implementation outline; confirm the request library and TLS behavior on your installed firmware before relying on it:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
EC Buying Pi Pico W Dual-core Arm Cortex-M0+ 133MHz RPI Pico W Built-in WiFi,Supports 2.4/5 GHZ Wi-Fi 2MB BLE
  • With a large on-chip memory, symmetric dual-core processor complex, deterministic bus fabric, and rich peripheral set augmented with our unique Programmable I/O (PIO) subsystem, RP2040 provides professional users with unrivalled power and flexibility
  • RP2040 is manufactured on a modern 40nm process node, delivering high performance,low dynamic power consumption, and low leakage, with a variety of low-power modes tosupport extended-duration operation on battery power
  • Pi Pico W offers 2.4GHz 802.11 b/g/n wireless LAN support and Bluetooth5.2, with an on-board antenna, and modular compliance certification. It is able to operatein both station and access point modes. Full access to network functionality is available to both C and MicroPython developers
  • Pi Pico W pairs RP2040 with 2MB of flash memory, and a power supply chip supporting input voltages from 1.8 -5.5V. It provides 26 GPIO pins, three of which can function as analogue inputs, on 0.1"-pitch through-hole pads with castellated edges
  • A polished MicroPython port, and a UF2 bootloader inROM, it has the lowest possible barrier to entry for beginner and hobbyist users; Pi Pico W is available as an individual unit, or in 480-unit reels for automated assembly
import urequests

BOT_TOKEN = "store-this-outside-public-code"
CHAT_ID = "your-chat-id"
MESSAGE = "The sensor event occurred"

url = "https://api.telegram.org/bot{}/sendMessage".format(BOT_TOKEN)
payload = {"chat_id": CHAT_ID, "text": MESSAGE}
response = None

try:
    response = urequests.post(url, json=payload)
    result = response.json()
    if not result.get("ok"):
        raise RuntimeError("Telegram did not accept the message: {}".format(result))
    print("Telegram accepted the message")
finally:
    if response is not None:
        response.close()

A successful API response indicates Telegram accepted the request; it is not a guarantee that a person has read the notification. For a reliable project, decide how to report failures and whether to retry, and avoid retrying indefinitely without a limit.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Protect credentials and account for HTTPS behavior

Keep both the Wi-Fi password and Telegram bot token out of code you publish or share. A bot token grants authority to use that bot; if it leaks, regenerate it. For personal projects, keep secrets in a separate local configuration file or provide them through a private setup process.

Rank #4
Freenove Raspberry Pi Pico W Board Pre-Soldered Header, Dual-core Arm Cortex-M0+ Microcontroller, Development Board, Python C Java Code, Tutorial Example Projects
  • Raspberry Pi Pico W: A tiny, fast, and versatile board built using dual-core Arm Cortex-M0+ processor with wireless LAN and Bluetooth (Comes with pinout card and stickers)
  • Detailed Tutorial: Provides step-by-step guide with MicroPython, C and Processing (Java) Code (The download link can be found on the product box) (No paper tutorial)
  • Example Projects: Each project has schematics, wiring diagrams, complete code and detailed explanations (Need extra items)
  • Easy to Use: Just connect the board to your computer (installed IDE) with the USB cable to program it
  • Get Support: Our technical support team is always ready to answer your questions

Raspberry Pi’s connectivity guide notes that SSL certificate verification is disabled in its documented HTTPS example. That means the example should not be treated as proof that the Pico verified the server’s identity. HTTPS behavior depends on the firmware and HTTP library in use, so check their current TLS and certificate-verification support before sending credentials or depending on secure delivery. Test DNS lookup, HTTPS connection, request encoding, response parsing, timeout handling, and certificate validation on the exact board and software combination.

Troubleshoot the connection and message separately

  • Wi-Fi never connects: Check the board model, firmware selection, SSID, password, and access-point availability. Use a finite timeout and print WLAN status or the resulting configuration for diagnostics.
  • Wi-Fi connects but Telegram fails: Check that the device has working internet and DNS, then verify HTTPS/TLS support and the request library behavior on that firmware.
  • The API responds with an error: Inspect the returned JSON, confirm the bot token and chat ID, and ensure the destination is available to the bot. The ok field indicates whether Telegram accepted the API operation.
  • The message is too long: Keep text within Telegram’s documented 1–4096 character range after entity parsing.

MicroPython is a natural fit for this approach, but a Pico is a microcontroller rather than a Linux computer. Raspberry Pi’s overview states: “A Raspberry Pi Pico is programmed using MicroPython, C, or C++ and, unlike other Raspberry Pi devices, doesn’t run Linux or support removable storage.” That matters when adapting instructions written for a Raspberry Pi computer: use the Pico’s MicroPython APIs and resource-appropriate libraries instead.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.