Hello, I hope you are well.
please can you help me
I have this error when I try to run
1 from machine import Pin
–
–
5 led=(2,Pin.OUT)
–
–
19 led.value(1)
Traceback (most recent call last):
File “<stdin>”, line 19, in <module>
AttributeError: ‘tuple’ object has no attribute ‘value’
Thank you for all your support and shared knowledge.
Hi.
1, 5 and 19 are numbers of the line.
Or, I can´t use the number 2 in the definition?
Thank you
I did it this way, and it worked:
import machine
led = machine.Pin(2, machine.Pin.OUT)
Thank you.
Yes.
Or you can use:
from machine import Pinled = Pin(5, Pin.OUT)
I’ll mark this issue as resolved. If you need further help, you just need to open a new question in our forum.
Regards,
Sara