Pin as string doesn't work
Posted: Tue Jul 12, 2022 6:05 pm
Hello,
I have Raspberry Pi Pico W with:
When I am trying to run the following:
I get an error:
I can't specify integer value for the LED, because on Pico W it's not pin 25 any more. I have no idea what integer number is the LED on. But everywhere in the google I see people are using string values as well as in documentation it says as id I can use string.
Any idea?
I have Raspberry Pi Pico W with:
Code: Select all
Python version
3.4.0; MicroPython v1.19.1 on 2022-06-18
Version info.
(3, 4, 0)
Code: Select all
from machine import Pin
led = Pin( "LED", Pin.OUT )
led.on()
led.off()
Code: Select all
Traceback (most recent call last):
File "<stdin>", line 4, in <module>
TypeError: can't convert str to int
Any idea?