79219236

Date: 2024-11-24 02:43:01
Score: 1.5
Natty:
Report link

The on-board LED Unlike the original Raspberry Pi Pico, the on-board LED on Pico W is not connected to a pin on RP2040, but instead to a GPIO pin on the wireless chip. MicroPython has been modified accordingly. This means that you can now do:

import machine led = machine.Pin("LED", machine.Pin.OUT) led.off() led.on()

or even:

led.toggle()

to change the current state. However, if you now look at the led object:

led Pin(WL_GPIO0, mode=OUT)

You can also do the following:

led = machine.Pin("LED", machine.Pin.OUT, value=1)

which will configure the led object, associate it with the on-board LED and turn the LED on.  NOTE Full details of the Raspberry Pi Pico W can be found in the Raspberry Pi Pico W Datasheet. WL_GPIO1 is connected to the PS/SYNC pin on the RT6154A to allow selection of different operating modes, while WL_GPIO2 can be used to monitor USB VBUS.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Maiodab