snipplets.dev/code/MicroPython/network_ap.py
2024-08-24 15:24:01 +03:00

16 lines
333 B
Python

import time
import network
def connect(essid='ESP', clients=3) -> bool:
print('Starting AP: {0}...'.format(essid))
ap = network.WLAN(network.AP_IF)
ap.active(True)
ap.config(essid=essid, max_clients=clients)
while ap.active() == False:
pass
print('AP "{0}" started'.format(essid))
return True