Skip to content

Instantly share code, notes, and snippets.

@mthri
Created January 10, 2021 17:14
Show Gist options
  • Save mthri/4107c0a96d7b3da9ba9e05b404e2b2a0 to your computer and use it in GitHub Desktop.
Save mthri/4107c0a96d7b3da9ba9e05b404e2b2a0 to your computer and use it in GitHub Desktop.
MicroPython AP and WiFi
import network
# wlan = network.WLAN(network.STA_IF)
# wlan.active(True)
# wlan.connect('mthri', '123456789')
# print('connecting...')
# while not wlan.isconnected():
# pass
# print('connected!')
# print(wlan.ifconfig())
ap = network.WLAN(network.AP_IF)
ap.active(True)
ap.config(essid='Amir', password='123456789')
print('Access Point is ready!')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment