Skip to content

Instantly share code, notes, and snippets.

@n2o
Created July 14, 2024 21:10
Show Gist options
  • Save n2o/be3745b591b90cb7e4d12391ea69e144 to your computer and use it in GitHub Desktop.
Save n2o/be3745b591b90cb7e4d12391ea69e144 to your computer and use it in GitHub Desktop.
Raspberry Pi Pico W as Wifi Access Point

Pico W as Wifi Access Point

This script spins up the Pico W as a Wifi Access Point. It assigns itself the IP 192.168.4.1 and assigns new Clients some IP starting at 192.168.4.16 or so.

import network
from machine import Pin

led = Pin("LED", Pin.OUT)

ap = network.WLAN(network.AP_IF)
ap.active(0)
ap.config(essid="pico", password="picopicopico", channel=1)
ap.active(1)

print("Connection successful")
print(ap.ifconfig())

if ap.active():
    led.on()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment