Hi,
I am trying to make the raspberry pi pico w connect to wifi but it is not working.
Below is the code
it keeps saying awaiting connection and doesn't connect.
few points to note:
1. the ssid and password are right
2. 2.4 Ghz frequency is on on router
3. Power supply is ample - 5V 1A through USB
4. tried with mobile hotspot also
5. latest firmware and MicroPython downloaded using inbuilt with thonny
any help is greatly appreciated,
thanks!
I am trying to make the raspberry pi pico w connect to wifi but it is not working.
Below is the code
Code:
import networkdef connect(ssid, password): wlan = network.WLAN(network.STA_IF) wlan.active(True) wlan.connect(ssid, password) while wlan.isconnected() == False: print('Awaiting Connection...') time.sleep(2) print('Wifi Connected!') print(f'SSID: {ssid} \n IP Address: {wlan.ifconfig()[0]}') connect(ssid,password)
few points to note:
1. the ssid and password are right
2. 2.4 Ghz frequency is on on router
3. Power supply is ample - 5V 1A through USB
4. tried with mobile hotspot also
5. latest firmware and MicroPython downloaded using inbuilt with thonny
any help is greatly appreciated,
thanks!
Statistics: Posted by crococoder — Mon Dec 09, 2024 3:37 pm