Why my code dont light the led on the protoboard?

I developed this blink code in python to test and it doesn't light the led on the protoboard, but just the Arduino led, the digital entry for the led is 13, what can I do?

import pyfirmata
import time

led = 13

qtd = 0

placa = pyfirmata.Arduino('COM3')

while qtd <= 10 :

placa.digital[led].write(1)

time.sleep(0.3)

placa.digital[led].write(0)

time.sleep(0.3)

qtd = qtd + 1

Change this to the pin where you connected the LED.
Pin 13 is where the built-in LED is connected on a UNO and compatibles.

1 Like

Hello and good morning
show a picture of your protoboard with the wiring in detail.

1 Like

I can turn on the led in C++ when i use arduino IDE but i cant in python XD
Only the RX led turn on, but not the yellow one

How can i do it in python? (i'm still learning...)

I don't know python, lol.

But did you understand my previous post?
Pin 13 is connected to the on-board LED.
Move the wire to another pin and try again.

1 Like

Nothing changed...

You changed the pin number in the code too, right?

Also, how long is this:

Maybe the while loop ends too fast for you to notice the light?

One more thing - could you connect another LED parallel to the first one, but in reverse?

1 Like

Is that a 10k resistor in there ? Far too high , you need about 330 ohm -if it does light you won’t see it !!
Also check the led is the right way around - short leg to negative .

Run the example blink from the IDE to check it works before you play with that weird snake stuff

1 Like

GUYS I FIGURED IT OUT!!!
There's nothing wrong with the connections or the code, the problem is the "StandartFirmata" in the IDE, it needs to be uploaded before i can run the py code.
Thanks a lot for the patience guys, i really apreciate it.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.