#from network import WLAN, STA_IF
#from time import sleep_ms
from machine import Pin
from neopixel import Neopixel
np = NeoPixel(Pin(21, Pin.OUT), 1)
np[0] = (255,0,0)
np.write()
print("Hello, Pi Pico W!")
np[0] = (255,255,0)
np.write()
''' def ativaWifi(rede, senha):
# Retorna True se consegue conectar à rede, ou False do contrário
# Faz 10 tentativas, separadas por 1s de tempo
wifi = WLAN(STA_IF)
wifi.active(True)
if not wifi.isconnected():
wifi.connect(rede, senha)
tentativas = 0
while not wifi.isconnected() and tentativas < 10:
sleep_ms(1000)
tentativas += 1
return (wifi, wifi.isconnected())
print (ativaWifi('Wokwi-GUEST','')) '''
Loading
pi-pico-w
pi-pico-w